Skip to content

andreasHovaldt/robotiq_3f_gripper_ros2_stack

Repository files navigation

robotiq_3f_gripper_ros2_stack

Used in the 5th semester Robotics LLM-Planner-for-Bimanual-object-mnipulation project. Package stack provides functionalities for controlling a Robotiq 3 Finger Adaptive Gripper using ROS2.

Required libraries

Python3

pip install pymodbus

Quick Start

Install colcon, then build this repository:

mkdir -p ~/ros_ws/src && cd ~/ros_ws/src
git clone https://github.com/andreasHovaldt/robotiq_3f_gripper_ros2_stack.git
cd ~/ros_ws
colcon build --symlink-install
source ~/ros_ws/install/setup.bash

Functionalities

For controlling the gripper, the custom interfaces used are based on the msg types Robotiq3FGripperInputRegisters.msg and Robotiq3FGripperOutputRegisters.msg, found in the folder /robotiq_3f_gripper_ros2_interfaces/msg. More can be read about the Modbus registers and their contents in Robotiq's own documentation. It is worth noting that this current implementation only uses the simplified control mode, which can also be read about in Robotiq's documentation.

The gripper is able to be controlled in 3 different ways:

Gripper topic subscription

ros2 run robotiq_3f_gripper_ros2_control gripper_control_listener_node

Using gripper_control_listener_node the gripper is subscribed to the topic /Robotiq3FGripper/OutputRegisters Additionally this node also publishes the input registers (status of gripper) to the topic /Robotiq3FGripper/InputRegisters

Helper command for interacting with the topic subscriber

ros2 topic pub --once /Robotiq3FGripper/OutputRegisters robotiq_3f_gripper_ros2_interfaces/msg/Robotiq3FGripperOutputRegisters "{r_act: 1, r_mod: 1, r_gto: 1, r_atr: 0, r_pra: 80, r_spa: 255, r_fra: 0}"

Gripper service server

ros2 run robotiq_3f_gripper_ros2_control gripper_control_service_server

This starts a service server for the gripper. Check the custom interface Robotiq3FGripperOutputService.srv for more information on how to interact with the service server.

Helper command for interacting with the service server

ros2 service call /Robotiq3FGripper/OutputRegistersService robotiq_3f_gripper_ros2_interfaces/srv/Robotiq3FGripperOutputService "{output_registers: {r_act: 1, r_mod: 1, r_gto: 1, r_atr: 0, r_pra: 255, r_spa: 255, r_fra: 0}}"

Gripper action server

ros2 run robotiq_3f_gripper_ros2_control gripper_control_action_server

This starts an action server for the gripper. Check the custom interface Robotiq3FGripperOutputGoal.action for more information on how to interact with the action server. Currently, the action server has a bug, where, if you leave it without sending a goal for a while, the gripper has to run through its activation initialization again.

Helper command for interacting with the action server

ros2 action send_goal -f /gripper_position robotiq_3f_gripper_ros2_interfaces/action/Robotiq3FGripperOutputGoal "{output_registers_goal: {r_act: 1, r_mod: 1, r_gto: 1, r_atr: 0, r_pra: 0, r_spa: 255, r_fra: 0}}"

About

ROS2 Stack for controlling the Robotiq 3F Gripper

Topics

Resources

License

Stars

Watchers

Forks