Hello,
I wanted to know how turn on the arm gripper and command it to open and close on ros2.
Thanks
Hello,
I wanted to know how turn on the arm gripper and command it to open and close on ros2.
Thanks
Hello!
You can turn on the gripper by publishing a message to the /dynamic_joint_commands topic, using the torque interface value:
ros2 topic pub --once /dynamic_joint_commands control_msgs/msg/DynamicJointState \
"{joint_names: [l_hand], interface_values: [{interface_names: [torque], values: [1.0]}]}"
Set joint_names to:
l_hand for the left gripperr_hand for the right gripperSet the torque value to:
You can use a single command to turn them both on:
ros2 topic pub --once /dynamic_joint_commands control_msgs/msg/DynamicJointState \
"{joint_names: [l_hand, r_hand], interface_values: [{interface_names: [torque], values: [1.0]}, {interface_names: [torque], values: [1.0]}]}"
Opening and closing the gripper works similarly, but you must use the position interface instead of torque. Note that the joints names are slightly different in this case:
l_hand_fingerr_hand_fingerFor example, to open the right gripper:
ros2 topic pub --once /dynamic_joint_commands control_msgs/msg/DynamicJointState \
"{joint_names: [r_hand_finger], interface_values: [{interface_names: [position], values: [1.0]}]}"
Set the value to:
You can retrieve the ROS calls made by the Python SDK functions by inspecting the reachy2_sdk_server!