Skip to content

Instantly share code, notes, and snippets.

View jeasinema's full-sized avatar
💭
I may be slow to respond.

Xiaojian Ma jeasinema

💭
I may be slow to respond.
View GitHub Profile

Aloha The Demonstrator & Controler

We aim to use only Aloha the Demonstrator to collect demonstrations, train a policy, and control the demonstrator itself. I will walk through the whole process using the official SDK, cobot_magic, provided by Agilex. This note largely follows the official tutorial of Agilex. Here I will focus on things customized for our goal.

cobot_magic

The SDK provides the following modules.

aloha-devel/   # policy learning and inference
camera_ws/     # camera configuration
collect_data/  # demonstration collection

Install ROS1-Noetic and ROS2-Humble from Source on Unubtu 22.04 Jammy

ATTENTION: Please use the default system-wide compiler tools like cmake, gcc, g++, and python, deactivate all conda/mamba environments, and remove all customized $PATH; otherwise, the compiler cmake may complain that necessary headers and libraries are missing, for example, "Could NOT find boost," "Compatibility with CMake < 3.5 has been removed from CMake," and "/usr/include/pybind11/detail/common.h:215:10: fatal error: Python.h: No such file or directory."

ROS2-Humble [REF]

There should not be any issues if you have been following the tutorial on a fresh OS, but there might be some pitfalls casued by your OS setups.

If it complains "Unable to locate package python3-rosdep" when installing development tools and ROS tools, simply change python3-rosdep to python3-rosdep2.

@TengdaHan
TengdaHan / ddp_notes.md
Last active December 4, 2025 16:26
Multi-node-training on slurm with PyTorch

Multi-node-training on slurm with PyTorch

What's this?

  • A simple note for how to start multi-node-training on slurm scheduler with PyTorch.
  • Useful especially when scheduler is too busy that you cannot get multiple GPUs allocated, or you need more than 4 GPUs for a single job.
  • Requirement: Have to use PyTorch DistributedDataParallel(DDP) for this purpose.
  • Warning: might need to re-factor your own code.
  • Warning: might be secretly condemned by your colleagues because using too many GPUs.
@pastleo
pastleo / nm_l2tp_ipsec_vpn.md
Last active November 10, 2025 07:53
setup L2TP IPSEC VPN in archlinux using NetworkManager
@yzh119
yzh119 / st-gumbel.py
Created January 12, 2018 12:25
ST-Gumbel-Softmax-Pytorch
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def sample_gumbel(shape, eps=1e-20):
U = torch.rand(shape).cuda()
return -Variable(torch.log(-torch.log(U + eps) + eps))
@jimfleming
jimfleming / colorize.py
Last active November 25, 2022 19:36
A utility function for TensorFlow that maps a grayscale image to a matplotlib colormap for use with TensorBoard image summaries.
import matplotlib
import matplotlib.cm
import tensorflow as tf
def colorize(value, vmin=None, vmax=None, cmap=None):
"""
A utility function for TensorFlow that maps a grayscale image to a matplotlib
colormap for use with TensorBoard image summaries.
@bgromov
bgromov / ros_kinetic_macos_sierra_10.12.md
Last active January 18, 2021 19:34
ROS Kinetic on macOS Sierra 10.12

Troubleshooting

OpenCV3

  1. Qt5::Core (/usr/local/.//mkspecs/macx-clang does not exist)
CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:17 (message):
  The imported target "Qt5::Core" references the file

"/usr/local/.//mkspecs/macx-clang"
@gyglim
gyglim / tensorboard_logging.py
Last active August 23, 2023 21:29
Logging to tensorboard without tensorflow operations. Uses manually generated summaries instead of summary ops
"""Simple example on how to log scalars and images to tensorboard without tensor ops.
License: BSD License 2.0
"""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
@eriknomitch
eriknomitch / transmission-daemon-quickstart.md
Last active December 22, 2024 04:31
Transmission Daemon (transmission-daemon) Quickstart

Transmission Daemon (transmission-daemon) Quickstart

This should work for Debian or Debian-deriviants (e.g., Ubuntu)

Quickstart

Install transmission-daemon

sudo apt-get install transmission-daemon
@ericclemmons
ericclemmons / example.md
Last active October 13, 2025 15:16
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here