Skip to content

vruga/marty

Repository files navigation

LeRobot-Kinematics: Simple and Accurate Forward and Inverse Kinematics Examples for the Lerobot SO100 ARM

English中文

Declaration

This project is developed with great respect and reference to the following open-source projects, which have significantly influenced its core design and implementation:

We sincerely appreciate the contributions of these projects to the robotics community.

What's New

  • August 14, 2025: Added kinematic tools for new calibration of so101 robot
  • April 19, 2025: Added Chinese readme

A. Installation

We recommend using conda for python=3.10 installations to be consistent with lerobot.

  # if no lerobot conda env
  # conda create -y -n lerobot python=3.10
  conda activate lerobot

  git clone https://github.com/box2ai-robotics/lerobot-kinematics.git
  cd lerobot-kinematics
  pip install -e .

B. Examples in simulation

We recommended to click on the terminal window with the mouse after startup and then enter the keys, to avoid that the keys in the departure mujoco change the configuration of the scene.

(1) qpos control

Example of joint angle control, when opened the Mucojo visualization will appear and you can use the keyboard to control the corresponding angle change of the robot arm.

python examples/lerobot_keycon_qpos.py
  • 1, 2, 3, 4, 5, 6 Increase the angle.

  • q, w, e, r, t, y Decrease Angle.

Press and hold '0' to return to position

If you encounter error "GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer paraneter out of range for operation)' warnings.warn(nessage,GLFWError) the Mu ERROR: could not create window" and are using ubuntu 21.04, it may be because your computer is using integrated graphics by default and does not support mujoco visualization, please run the following command to switch to discrete graphics.

sudo prime-select nvidia
sudo reboot

(2) gpos Control

Example of Gripper Posture (gpos) control, where you can use the keyboard to control the end-posture changes of Lerobot in mucojo.

python examples/lerobot_keycon_gpos.py

# or for SO101 new calibration
python examples/lerobot_keycon_gpos_101.py
Key Action + Key Action -
w Move Forward s Move Backward
a Move Right d Move Left
r Move Up f Move Down
e Roll + q Roll -
t Pitch + g Pitch -
z Gripper Open c Gripper Close

Press and hold '0' to return to position

(3) Joycon Control

This is an example of using joycon to control Lerobot in mucojo, if you want to use it, please install joycon-robotics repository first!

python examples/lerobot_joycon_gpos.py

C. Examples in Real

NOTE: Before using the robotic arm, you must first bind and calibrate the robotic arm ports using the lerobot-joycon repository. After completing the calibration, copy the resulting calibration file to the /examples directory. For example, you can find the calibration file at lerobot-joycon/.cache/calibration/so100/main_follower.json.

(1) Keyboard Control in Real

Example of gripper posture (gpos) control, where you can use the keyboard to control the Lerobot's end posture changes in mucojo while going from simulation to physical control of a real Lerobot arm.

python examples/lerobot_keycon_gpos_real.py

If you're interested in this, you can try using the keyboard to collect data.

(2) Joycon Control in Real

python examples/lerobot_joycon_gpos_real.py

C. More Info

  1. You can follow the bilibili video account - Box2AI
  2. Join the discussion on the QQ group: 948755626

If this repository was helpful to you, please give us a little star and have a great time! ⭐ ⭐ ⭐ ⭐ ⭐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors