Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Robotiq 3F Gripper — ROS 2 Control Guide

Control the Robotiq 3-Finger gripper over Modbus TCP using the ROS 2 action server and service interface.


Table of Contents


Setup & Launch

Launch the driver with your gripper IP

ros2 run robotiq_3f_ros2_driver gripper_action_server \
  --ros-args -p gripper_ip:=<YOUR_GRIPPER_IP>

Example:

ros2 run robotiq_3f_ros2_driver gripper_action_server \
  --ros-args -p gripper_ip:=192.168.1.11

Default IP: 192.168.1.11 · Modbus port: 502 · Unit ID: 9

Or use the launch file

ros2 launch robotiq_3f_description robotiq_3f_gripper.launch.xml

Control via Action: gripper_cmd

Action type: control_msgs/action/GripperCommand
Action name: /gripper_cmd

Blocks until the gripper reaches the target or times out (10 s).

Goal fields

Field Type Range Description
command.position float64 0.0 – 0.155 m 0.0 = fully closed, 0.155 = fully open
command.max_effort float64 0.0 – 70.0 N Max force. 0.0 uses a safe internal default

Result fields

Field Type Description
reached_goal bool true if gripper reached target or detected contact
position float64 Echoes the commanded position

Position reference

position (m) Gripper state
0.0 Fully closed
0.077 Half open
0.155 Fully open

Force reference

max_effort (N) Behaviour
0.0 Gentle (safe default — 50/255 internally)
35.0 Medium force
70.0 Maximum force

Change Grasping Mode Service

Service type: robotiq_3f_interfaces/srv/ChangeGraspingMode
Service name: /change_grasping_mode

Request

Field Type Description
mode.mode int8 Mode integer (see table below)

Response

Field Type Description
success bool true if mode changed successfully

Grasping modes

mode Name Best for
0 BASIC General grasping (default)
1 PINCH Small or thin objects
2 WIDE Large or bulky objects
3 SCISSOR Independent scissor / lateral control

CLI Quick Reference

Gripper movement

# Open fully
ros2 action send_goal /gripper_cmd \
  control_msgs/action/GripperCommand \
  "{command: {position: 0.155, max_effort: 0.0}}"

# Close fully (medium force)
ros2 action send_goal /gripper_cmd \
  control_msgs/action/GripperCommand \
  "{command: {position: 0.0, max_effort: 50.0}}"

# Half open
ros2 action send_goal /gripper_cmd \
  control_msgs/action/GripperCommand \
  "{command: {position: 0.077, max_effort: 30.0}}"

Grasping mode

# Basic (default)
ros2 service call /change_grasping_mode \
  robotiq_3f_interfaces/srv/ChangeGraspingMode "{mode: {mode: 0}}"

# Pinch
ros2 service call /change_grasping_mode \
  robotiq_3f_interfaces/srv/ChangeGraspingMode "{mode: {mode: 1}}"

# Wide
ros2 service call /change_grasping_mode \
  robotiq_3f_interfaces/srv/ChangeGraspingMode "{mode: {mode: 2}}"

# Scissor
ros2 service call /change_grasping_mode \
  robotiq_3f_interfaces/srv/ChangeGraspingMode "{mode: {mode: 3}}"

Inspect

ros2 action list
ros2 service list | grep gripper

Parameter & Value Reference

Modbus connection

Parameter Value
Default IP 192.168.1.11
Port 502
Unit ID 9
Status poll interval 0.1 s

Object detection status (gDTA)

Value Meaning
0 Moving
1 Stopped — contact while opening
2 Stopped — contact while closing ✓
3 Stopped — reached requested position ✓

Action server marks success on gDTA == 2 or gDTA == 3.

GraspingMode constants (Python)

from robotiq_3f_interfaces.msg import GraspingMode

GraspingMode.BASIC    # 0
GraspingMode.PINCH    # 1
GraspingMode.WIDE     # 2
GraspingMode.SCISSOR  # 3

Package Structure

robotiq_3f_modbus/
├── robotiq_3f_interfaces/       # Messages and services
│   ├── msg/
│   │   ├── GraspingMode.msg
│   │   ├── SimpleControlCommand.msg
│   │   ├── IndependentControlCommand.msg
│   │   ├── ObjectDetectionStatus.msg
│   │   └── Status.msg
│   └── srv/
│       └── ChangeGraspingMode.srv
├── robotiq_3f_ros2_driver/      # Driver node
│   └── robotiq_3f_ros2_driver/
│       ├── gripper_action_server.py
│       ├── test_gripper_client.py
│       └── robotiqcontrol/
│           └── GripperController.py
└── robotiq_3f_description/      # URDF and launch files
    └── launch/
        └── robotiq_3f_gripper.launch.xml

Robotiq 3F · ROS 2 · Modbus TCP · BSD-3-Clause

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages