A Python client library for interacting with I2RT products, designed with simplicity and extensibility in mind.
- Plug and play python interface for I2RT robots
- Real-time robot control via CAN bus communication
- Support for directly communicating with motor (DM series motors)
- Visualization and gravity compensation using MuJoCo physics engine
pip install -e .Plug in the CAN device and run the following command to check the available CAN devices.
ls -l /sys/class/net/can*This should give you something like this
lrwxrwxrwx 1 root root 0 Jul 15 14:35 /sys/class/net/can0 -> ../../devices/platform/soc/your_can_device/can0Where can0 is the CAN device name.
You need to bring up the CAN interface with
sudo ip link set can0 up type can bitrate 1000000We have provided a convenience script to reset all CAN devices. Simply run
sh scripts/reset_all_can.shSee set_persist_id_socket_can.md if you want to set persistent CAN device names
python i2rt/robots/motor_chain_robot.py --model yam --channel can0 --operation_mode gravity_compfrom i2rt.robots.motor_chain_robot import get_yam_robot
# Get a robot instance
robot = get_yam_robot(channel="can0")
# Get the current joint positions
joint_pos = robot.get_joint_pos()
# Command the robot to move to a new joint position
target_pos = np.array([0, 0, 0, 0, 0, 0, 0])
# Command the robot to move to the target position
robot.command_joint_pos(target_pos)To launch the follower robot run.
python scripts/minimum_gello.py --mode followerTo launch the robot mujoco visualizer run
python scripts/minimum_gello.py --mode visualizerThis requires 2 robot arms.
To launch the follower robot run
python scripts/minimum_gello.py --mode follower --can_channel can0To launch the leader robot run
python scripts/minimum_gello.py --mode leader --can_channel can0You can control your flow base using a game controller. To run the joystick demo, run the following command.
python i2rt/flow_base/flow_base_controller.pyfrom i2rt.flow_base.flow_base_controller import Vehicle
# Get a robot instance
vehicle = Vehicle()
vehicle.start_control()
# move forward slowly for 1 second
start_time = time.time()
while time.time() - start_time < 1:
user_cmd = (0.1, 0, 0)
vehicle.set_target_velocity(user_cmd, frame="local")We welcome contributions! Please make a PR.
This project is licensed under the MIT License - see the LICENSE file for details.
- Contact: support@i2rt.com
