Skip to content

Instantly share code, notes, and snippets.

View JeanElsner's full-sized avatar
🤖

Jean Elsner JeanElsner

🤖
View GitHub Profile
@JeanElsner
JeanElsner / add_extra_url.sh
Created June 8, 2023 09:37
Single-line shell command to add extra-index-url to pip if it's not added already
extra_url=`pip config get global.extra-index-url 2>/dev/null`; url="<new-extra-url>"; if [[ ! $extra_url =~ $url ]]; then pip config set global.extra-index-url "$extra_url $url"; fi
@JeanElsner
JeanElsner / install_libfranka.sh
Created June 1, 2023 09:29
libfranka install script for Ubuntu
#!/bin/bash
LIBFRANKA_VER="0.9.1"
sudo apt install build-essential cmake git libpoco-dev libeigen3-dev
# For legacy versions, use my patched repository
repo="https://github.com/frankaemika/libfranka.git"
if [[ "$LIBFRANKA_VER" == "0.7.1" || "$LIBFRANKA_VER" == "0.8.0" ]]; then
repo="https://github.com/JeanElsner/libfranka.git"
@JeanElsner
JeanElsner / install_ethercat.sh
Last active June 1, 2023 19:26
Ethercat install script for Ubuntu
#!/bin/bash
master0_device="94:c6:91:ae:d1:f5"
device_modules="generic"
sudo apt-get install -y git cmake build-essential autoconf libtool kmod
git clone https://gitlab.com/etherlab.org/ethercat.git
cd ethercat
git checkout stable-1.5
@JeanElsner
JeanElsner / mujoco_qt.py
Last active April 10, 2024 01:40
MuJoCo scene rendered in QT (PySide6) with mouse navigation
#!/usr/bin/env python3
from collections import deque
import time
import mujoco
import numpy as np
from PySide6.QtWidgets import (QApplication, QWidget, QMainWindow,
QVBoxLayout, QCheckBox, QGroupBox, QHBoxLayout)
from PySide6.QtCore import QTimer, Qt
from PySide6.QtOpenGLWidgets import QOpenGLWidget
from PySide6.QtOpenGL import QOpenGLWindow