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 September 11, 2024 10:02
Ethercat install script for Ubuntu
#!/bin/bash
# Check if the correct number of arguments are passed
if [ "$#" -eq 0 ] || [ "$#" -gt 2 ]; then
echo "Usage: $0 <master0_device> [device_modules]"
exit 1
fi
# Assign command-line arguments to variables
master0_device="$1"
@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