### Install I2RT Python Library Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Clone the repository, install the uv environment manager, and install the I2RT library in a virtual environment. ```bash git clone https://github.com/i2rt-robotics/i2rt.git && cd i2rt curl -LsSf https://astral.sh/uv/install.sh | sh source $HOME/.local/share/uv/env uv venv --python 3.11 source .venv/bin/activate ``` ```bash sudo apt update sudo apt install build-essential python3-dev linux-headers-$(uname -r) uv pip install -e . ``` -------------------------------- ### Configure Different Arm and Gripper Combinations in Simulation Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Demonstrates how to specify different arm and gripper assemblies when running the example in simulation mode. ```bash python examples/minimum_gello/minimum_gello.py --arm big_yam --gripper linear_4310 --sim ``` ```bash python examples/minimum_gello/minimum_gello.py --arm yam_pro --gripper flexible_4310 --sim ``` -------------------------------- ### Run Minimum Gello in Simulation Mode Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Executes the example in simulation mode, which does not require any hardware. This is useful for testing and development. ```bash python examples/minimum_gello/minimum_gello.py --sim ``` -------------------------------- ### Run Minimum Gello as Local Visualizer Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Launches the example as a local visualizer, which mirrors the live robot state using the MuJoCo viewer. ```bash python examples/minimum_gello/minimum_gello.py --mode visualizer_local ``` -------------------------------- ### Leader-Follower Setup with Specific Gripper and CAN Channel Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Sets up the follower in a specific configuration with a linear gripper and CAN channel, and the leader with a teaching handle and bilateral force feedback. ```bash python examples/minimum_gello/minimum_gello.py \ --gripper linear_4310 --mode follower --can-channel can0 ``` ```bash python examples/minimum_gello/minimum_gello.py \ --gripper yam_teaching_handle --mode leader --can-channel can1 --bilateral-kp 0.2 ``` -------------------------------- ### Run Record Replay Trajectory Script Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/record_replay_trajectory/README.md Execute the main script to start the record and replay functionality. ```bash python record_replay_trajectory.py ``` -------------------------------- ### Run Viser Control in Simulation Mode Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_viser/README.md Starts the Viser control interface in simulation mode, which does not require hardware. Useful for testing and development. ```bash python examples/control_with_viser/control_with_viser.py --sim ``` -------------------------------- ### Run Viser Control with Specific Arm and Gripper Variants Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_viser/README.md Launches the Viser control interface with custom arm and gripper configurations, in simulation mode. This allows testing with different hardware setups. ```bash python examples/control_with_viser/control_with_viser.py --arm big_yam --gripper linear_4310 --sim ``` -------------------------------- ### Run Minimum Gello in Follower Mode Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Starts the robot in follower mode, serving its state over the portal. Requires specifying the CAN channel. ```bash python examples/minimum_gello/minimum_gello.py --can-channel can0 ``` -------------------------------- ### Run Single Motor PD Control Script Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/single_motor_position_pd_control/README.md Execute the Python script to start the interactive motor control interface. Specify the CAN channel, motor ID, and PD control gains (KD is shown here). ```bash python i2rt/scripts/single_motor_pd_pos_control.py --channel can1 --motor_id 1 --kd 5 ``` -------------------------------- ### Get Linear Rail State on Flow Base Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Retrieves the current state of the linear rail on the Flow Base using the client script. ```bash python i2rt/flow_base/flow_base_client.py --command get_linear_rail_state --host 172.6.2.20 ``` -------------------------------- ### Run MuJoCo Control with Real Hardware (Default) Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_mujoco/README.md Launches the MuJoCo control interface for real hardware, connecting via the default 'can0' CAN interface. ```bash python examples/control_with_mujoco/control_with_mujoco.py --channel can0 ``` -------------------------------- ### Create SD Card Image Source: https://github.com/i2rt-robotics/i2rt/blob/main/devices/pi_setup.md Create a disk image from your SD card. Replace `/dev/sdX` with your actual SD card device (e.g., `/dev/sdc`). ```bash sudo dd if=/dev/sdX of=pi_system.img bs=4M status=progress sync ``` -------------------------------- ### Run Flow Base Joystick Demo Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Executes the joystick demonstration for the Flow Base. ```bash python i2rt/flow_base/flow_base_controller.py ``` -------------------------------- ### Launch Bimanual Lead-Follower System Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/bimanual_lead_follower/README.md Launch the bimanual lead-follower system using the provided Python script after ensuring the virtual environment is activated. ```bash python bimanual_lead_follower.py ``` -------------------------------- ### List Block Devices Source: https://github.com/i2rt-robotics/i2rt/blob/main/devices/pi_setup.md Use this command to identify the mounting location of your SD card before creating an image. ```bash lsblk ``` -------------------------------- ### Run MuJoCo Control in Simulation (Default Arm/Gripper) Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_mujoco/README.md Launches the MuJoCo control interface in simulation mode using the default YAM arm and linear_4310 gripper. ```bash python examples/control_with_mujoco/control_with_mujoco.py --sim ``` -------------------------------- ### Record Replay Trajectory Script Options Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/record_replay_trajectory/README.md Command-line arguments for configuring the record and replay trajectory script, such as CAN channel, gripper type, and file operations. ```bash --channel can0 # CAN bus channel --gripper linear_4310 # Yam gripper type so the gravity compensation can load the correct model --output file.npy # Output filename --load file.npy # Load trajectory at startup ``` -------------------------------- ### Flash Image to New SD Card Source: https://github.com/i2rt-robotics/i2rt/blob/main/devices/pi_setup.md Wipe the new SD card and flash the previously created image onto it. Ensure `/dev/sdX` is the correct device for the new SD card. ```bash sudo wipefs -a /dev/sdX sudo dd if=pi_system.img of=/dev/sdX bs=4M status=progress sync ``` -------------------------------- ### Run MuJoCo Control in Simulation (Arm Only) Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_mujoco/README.md Launches the MuJoCo control interface in simulation mode, configuring it to use the 'yam' arm without any gripper. ```bash python examples/control_with_mujoco/control_with_mujoco.py --arm yam --gripper no_gripper --sim ``` -------------------------------- ### Run MuJoCo Control with Real Hardware (Big YAM Arm) Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_mujoco/README.md Launches the MuJoCo control interface for real hardware, specifying the 'big_yam' arm and 'linear_4310' gripper, and connecting via the 'can0' CAN interface. ```bash python examples/control_with_mujoco/control_with_mujoco.py --arm big_yam --gripper linear_4310 --channel can0 ``` -------------------------------- ### Verify CAN Interfaces Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/bimanual_lead_follower/README.md After setting up CAN IDs, verify that all four CAN interfaces are correctly mapped and in an UP state using the 'ip a' command. ```bash i2rt@ioheart-dev03:~/i2rt$ ......... ......... 9: can_follower_r: mtu 16 qdisc pfifo_fast state UP group default qlen 10 link/can 10: can_follower_l: mtu 16 qdisc pfifo_fast state UP group default qlen 10 link/can 11: can_leader_r: mtu 16 qdisc pfifo_fast state UP group default qlen 10 link/can 12: can_leader_l: mtu 16 qdisc pfifo_fast state UP group default qlen 10 link/can ``` -------------------------------- ### Initialize and Control YAM Robot with Python API Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Initializes a YAM robot using the Python API and demonstrates reading joint positions and commanding a target configuration. ```python from i2rt.robots.motor_chain_robot import get_yam_robot import numpy as np robot = get_yam_robot(channel="can0", gripper_type="linear_4310") # Read joint positions (radians) q = robot.get_joint_pos() # shape: (6,) # Command a target configuration robot.command_joint_pos(np.zeros(6)) ``` -------------------------------- ### Configure CAN Bus Interface Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Commands to check, bring up, and auto-enable CAN bus interfaces for robot communication. ```bash # Check detected CAN devices ls -l /sys/class/net/can* # Bring up interface at 1 Mbit/s sudo ip link set can0 up type can bitrate 1000000 # Auto-enable on boot sudo sh devices/install_devices.sh # Reset unresponsive adapter sh scripts/reset_all_can.sh ``` -------------------------------- ### Leader-Follower Teleoperation for YAM Arm Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Sets up leader-follower teleoperation for a YAM arm. The follower arm tracks the leader, and the `--bilateral_kp` parameter controls resistance on the leader. ```bash # Follower arm python examples/minimum_gello/minimum_gello.py --gripper linear_4310 --mode follower --can-channel can0 --bilateral_kp 0.2 # Leader arm (teaching handle) python examples/minimum_gello/minimum_gello.py --gripper yam_teaching_handle --mode leader --can-channel can1 --bilateral_kp 0.2 ``` -------------------------------- ### Run MuJoCo Control in Simulation (Big YAM Arm) Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_mujoco/README.md Launches the MuJoCo control interface in simulation mode, specifying the 'big_yam' arm and 'linear_4310' gripper. ```bash python examples/control_with_mujoco/control_with_mujoco.py --arm big_yam --gripper linear_4310 --sim ``` -------------------------------- ### Run Viser Control with Real Robot on CAN Bus Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/control_with_viser/README.md Connects the Viser control interface to a real robot using a specified CAN bus interface. Ensure the robot is properly connected and the CAN interface is available. ```bash python examples/control_with_viser/control_with_viser.py --channel can0 ``` -------------------------------- ### Run Minimum Gello in Leader Mode Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Operates the robot in leader mode, reading input from a teaching handle to drive a remote follower. Requires specifying the CAN channel for the leader. ```bash python examples/minimum_gello/minimum_gello.py --mode leader --can-channel can1 ``` -------------------------------- ### Initialize Robot Without Zero Gravity Mode Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Initializes the robot without zero gravity mode, which is recommended when the motor timeout is disabled. This ensures a PD target is always set. ```python robot = get_yam_robot(channel="can0", zero_gravity_mode=False) ``` -------------------------------- ### Inspect Leader Arm Output Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Runs a script to inspect the output of the YAM leader arm. ```bash python scripts/run_yam_leader.py --channel $CAN_CHANNEL ``` -------------------------------- ### Interactive Motor Control Panel Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/single_motor_position_pd_control/README.md The output panel displays real-time motor status including current and target position, velocity, torque, temperatures, and error codes. It also shows the current step size and PD gains (KP/KD), and lists available keyboard controls. ```bash Arrow-key PD teleop (q to quit) Current pos : -1.64359 rad Target pos : -1.49720 rad Velocity : -0.00244 rad/s Torque : +11.65812 Nm (or driver units) Temp rotor : 45.0 °C Temp MOS: 35.0 °C Error code : 0x1 Step size : 0.01000 rad (↑ bigger / ↓ smaller) KP=80.00 KD=3.00 Controls: ←/→ move • r reset-to-current • SPACE hold • q quit ``` -------------------------------- ### Control Flow Base Velocity with Python API Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Connects to the Flow Base client and sets a target linear and angular velocity in the local frame. ```python from i2rt.flow_base.flow_base_client import FlowBaseClient client = FlowBaseClient(host="172.6.2.20") client.set_target_velocity([0.1, 0.0, 0.0], frame="local") ``` -------------------------------- ### Override Handle Weight for Gravity Compensation Source: https://github.com/i2rt-robotics/i2rt/blob/main/examples/minimum_gello/README.md Compensates for the mass of different 3D-printed teaching handles by specifying the `--ee-mass` flag. This is crucial for accurate gravity compensation. ```bash python examples/minimum_gello/minimum_gello.py --ee-mass 0.350 --can-channel can0 ``` -------------------------------- ### Test Linear Rail Movement on Flow Base Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Executes a test command for the linear rail on the Flow Base. Warning: The linear rail will move. ```bash python i2rt/flow_base/flow_base_client.py --command test_linear_rail --host 172.6.2.20 ``` -------------------------------- ### Linear Rail API Methods Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Control and query the state of the FlowBase's linear rail module. Initialization requires `FlowBaseClient(host="172.6.2.20", with_linear_rail=True)`. ```APIDOC ## Linear Rail API ### Description Provides methods to get the current state of the linear rail and to set its velocity. ### Methods #### `get_linear_rail_state()` - **Description**: Retrieves the current position, velocity, and limit switch states of the linear rail. - **Usage**: Call this method to monitor the rail's status. #### `set_linear_rail_velocity(velocity)` - **Description**: Sets the target velocity for the linear rail. - **Parameters**: - `velocity` (float) - Required - The desired velocity in units per second. - **Usage**: Use this to command the rail to move at a specific speed. #### `set_target_velocity([x, y, theta, rail_vel], frame)` - **Description**: Enables combined control of the base and the linear rail, allowing for 4-dimensional movement. - **Parameters**: - `[x, y, theta, rail_vel]` (list of floats) - Required - A list containing the desired velocities for the base's x, y, and theta, and the linear rail's velocity. - `frame` (string) - Required - The coordinate frame in which the velocities are defined. - **Usage**: For integrated control of the robot's base and linear rail movement. ``` -------------------------------- ### Control YAM Arm in Zero-Gravity Mode Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Launches a YAM arm in zero-gravity mode using the specified CAN channel and gripper type. ```bash python i2rt/robots/motor_chain_robot.py --channel can0 --gripper_type linear_4310 ``` -------------------------------- ### Reduce Image Size with PiShrink Source: https://github.com/i2rt-robotics/i2rt/blob/main/devices/pi_setup.md Optionally, use PiShrink to reduce the size of your Raspberry Pi image file. This is useful for saving storage space. ```bash sudo ./pishrink.sh pi_system.img pi_system_shrunk.img ``` -------------------------------- ### Test Movement Command on Flow Base Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Executes a test movement command on the Flow Base. Warning: The base will move. ```python python i2rt/flow_base/flow_base_client.py --command test_command --host 172.6.2.20 ``` -------------------------------- ### Read Odometry from Flow Base Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Retrieve the current odometry data (translation and rotation) from the Flow Base using the client script. Requires the base to be accessible on the network. ```python python i2rt/flow_base/flow_base_client.py --command get_odometry --host 172.6.2.20 ``` ```bash [Client] Connecting to 172.6.2.20:11323 [Client] Connection established {'translation': array([-6.59153544e-07, -3.79215432e-04]), 'rotation': array(-0.00022068)} ``` -------------------------------- ### Reset Odometry on Flow Base Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Resets the odometry of the Flow Base to zero using the client script. This is useful for recalibrating the robot's position. ```python python i2rt/flow_base/flow_base_client.py --command reset_odometry --host 172.6.2.20 ``` -------------------------------- ### Zero Motor Offset Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Zeros the offset for a specific motor. Run this command for each motor ID (1-6 for a standard YAM robot). ```bash python i2rt/motor_config_tool/set_zero.py --channel can0 --motor_id 1 ``` -------------------------------- ### Re-enable Motor Safety Timeout Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Re-enables the motor safety timeout. This is the recommended setting for normal operation. ```bash python i2rt/motor_config_tool/set_timeout.py --channel can0 --timeout ``` -------------------------------- ### Eject SD Card Source: https://github.com/i2rt-robotics/i2rt/blob/main/devices/pi_setup.md Safely eject the SD card after flashing to prevent data corruption. ```bash eject /dev/sdX ``` -------------------------------- ### SSH Access to Flow Base Source: https://github.com/i2rt-robotics/i2rt/blob/main/i2rt/flow_base/README.md Connect to the Flow Base via SSH using its static IP address. Ensure your development machine is on the same network segment. ```bash ssh i2rt@172.6.2.20 -J $USER_NAME@$YOUR_DEV_MACHINE_IP ``` -------------------------------- ### Disable Motor Safety Timeout Source: https://github.com/i2rt-robotics/i2rt/blob/main/README.md Disables the motor safety timeout. This should be run twice. Use with caution as it can lead to uncontrolled torque if the gravity compensation loop fails. ```bash python i2rt/motor_config_tool/set_timeout.py --channel can0 python i2rt/motor_config_tool/set_timeout.py --channel can0 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.