Part II: Teleoperation and data collection · §29 of 43

# ---------- host, once per login ----------
xhost +SI:localuser:root
docker start openarm
docker exec -it openarm bash
 
# ---------- in container ----------
source /opt/ros/jazzy/setup.bash && source /root/ros2_ws/install/setup.bash
 
# sim
bash /root/scripts/openarm_launch.sh sim
ros2 launch openarm_bimanual_moveit_config demo.launch.py arm_type:=v10
 
# real (CAN up on the host + zero verified + area clear + power switch in reach + BOTH arms powered and hanging)
sudo ip link set can0 type can bitrate 1000000 dbitrate 5000000 fd on && sudo ip link set can0 up   # host, same for can1
openarm-can-cli -i can0 discover && openarm-can-cli -i can1 discover                                # host, optional
bash /root/scripts/openarm_launch.sh real            # wait ~30 s, for joint_state_broadcaster
python3 /root/scripts/openarm_jmove.py left 7 0.1    # identification: the robot's LEFT wrist moves; then "left 7 0"
python3 /root/scripts/openarm_jsweep.py both         # test every joint (safe directions)
python3 /root/scripts/openarm_demo.py 1.5            # the demo
bash /root/scripts/openarm_stop.sh                   # arms at zero first; then motor power off
ros2 launch openarm_bimanual_moveit_config demo.launch.py arm_type:=v10 use_fake_hardware:=false right_can_interface:=can1 left_can_interface:=can0
 
# command
ros2 action send_goal /left_joint_trajectory_controller/follow_joint_trajectory control_msgs/action/FollowJointTrajectory \
 '{trajectory: {joint_names: [openarm_left_joint1, openarm_left_joint2, openarm_left_joint3, openarm_left_joint4, openarm_left_joint5, openarm_left_joint6, openarm_left_joint7],
   points: [{positions: [0, 0, 0, 0.3, 0, 0, 0], time_from_start: {sec: 5}}]}}'
ros2 action send_goal /left_gripper_controller/follow_joint_trajectory control_msgs/action/FollowJointTrajectory \
 '{trajectory: {joint_names: [openarm_left_finger_joint1], points: [{positions: [0.022], time_from_start: {sec: 2}}]}}'
 
# observe
ros2 control list_controllers
ros2 topic echo /joint_states --field position
 
# ---------- LeRobot (host; ROS must NOT be running on the follower buses; base clamped) ----------
bash ~/Documents/openarm_lerobot/setup_openarm_lerobot.sh                  # config + calibration checks (re-runnable)
python ~/Documents/openarm_lerobot/compare_mini_follower.py                # no-torque check: hanging -> all ~0
python ~/Documents/openarm_lerobot/safe_teleop.py --arms right --max-vel 30   # guarded teleop, one arm, slow
python ~/Documents/openarm_lerobot/safe_teleop.py                          # both arms
# Ctrl+C = hold, Enter = torque off.  Never Ctrl+Z.
# run a trained policy (arms in the training start pose first; Ctrl+C ONCE to stop). Full walkthrough: Part III (§30-§43)
lerobot-rollout --strategy.type=base --policy.path=outputs/train/<job>/checkpoints/last/pretrained_model \
  --robot.type=bi_openarm_follower --robot.id=my_bimanual_follower \
  --robot.left_arm_config.port=can0 --robot.left_arm_config.side=left --robot.left_arm_config.max_relative_target=10.0 \
  --robot.right_arm_config.port=can1 --robot.right_arm_config.side=right --robot.right_arm_config.max_relative_target=10.0 \
  --robot.cameras='<same as recording>' --task="<task>" --duration=30 --device=cuda
ThingLeftRight
CAN bus (zeus cabling, ROS default is the reverse)can0 (PCAN Ch1)can1 (PCAN Ch2)
Arm action/left_joint_trajectory_controller/follow_joint_trajectory/right_joint_trajectory_controller/follow_joint_trajectory
Gripper action/left_gripper_controller/follow_joint_trajectory/right_gripper_controller/follow_joint_trajectory
Arm jointsopenarm_left_joint1…7openarm_right_joint1…7
Gripper joint (m, 0 closed – 0.044 open)openarm_left_finger_joint1openarm_right_finger_joint1
MoveIt groupsleft_arm, left_gripperright_arm, right_gripper
HW componentopenarm_left_hardware_interfaceopenarm_right_hardware_interface
LeRobot keys (bimanual)left_joint_1.pos … left_gripper.pos (deg)right_joint_1.pos … right_gripper.pos (deg)
LeRobot follower calibration file…/robots/openarm_follower/<id>_left.json…/robots/openarm_follower/<id>_right.json
OpenArm Mini (zeus)…Serial_5876043720-if00…Serial_5876043592-if00
Mini calibration file…/teleoperators/openarm_mini/my_mini_left.json…/my_mini_right.json