同构人形双臂FACTR AR5快速上手
拷贝FactrDouAr5_ws代码到~目录
终端1:MuJoCo终端
cd ~/FactrDouAr5_ws
source .mujoco_venv/bin/activate
启动mujoco仿真
python tools/dual_ar5_zmq_server.py \ --left-home=1.570796327,1.531832730,0,0.102776712,0,0,0 \ --right-home=-1.570796327,1.508823018,0,0.213223329,0,0,0
终端 2:保持双臂节点运行
就是当前这个:
cd ~/FactrDouAr5_ws
source /opt/ros/humble/setup.bash
source ./install/setup.bash
启动RViz2可视化节点:
ros2 launch factr_teleop dual_hanging_grav_comp_viz.launch.py
出现这个:TEST PHASE STARED - GAIN = 1.00
测试重力补偿
可以重新开个终端,输入以下指令,确认两个话题都有数据:
ros2 topic hz /left/joint_states
ros2 topic hz /right/joint_states
若测试纯遥操,不带重力补偿,加teleop_only:=true
ros2 launch factr_teleop dual_hanging_grav_comp_viz.launch.py teleop_only:=true

终端 3:启动双臂映射
ros2 launch factr_teleop dual_mujoco_ar5_mapping.launch.py
注意:可以指定从臂仿真遥操速度,指令为:
ros2 launch factr_teleop dual_mujoco_ar5_mapping.launch.py diagnostics:=true max_joint_speed:=1.0
预期输出:
left ... indices=[0, 1, 2, 3, 4, 5, 6]
right ... indices=[7, 8, 9, 10, 11, 12, 13]
MuJoCo mapping starts PAUSED
终端 4:分别接合
先让两只实物臂和 MuJoCo 臂处于大致对应姿态,再依次执行:
ros2 service call /left/set_enabled std_srvs/srv/SetBool "{data: true}"
成功后:
success=True
message='engaged and anchors captured'
再接合右臂:
ros2 service call /right/set_enabled std_srvs/srv/SetBool "{data: true}"
缓缓移动机械臂进行重力补偿测试。
