Skip to content

Latest commit

 

History

History
90 lines (66 loc) · 3.71 KB

File metadata and controls

90 lines (66 loc) · 3.71 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build and Run

This is a ROS 1 (Noetic) catkin workspace. Packages must be built within a catkin workspace:

# Build all packages
catkin_make

# Build with isolated packages (if dependency issues arise)
catkin_make_isolated

# Source the workspace
source devel/setup.bash

Launch the gripper driver with hardware:

roslaunch robotiq_85_bringup robotiq_85.launch
roslaunch robotiq_85_bringup robotiq_85.launch run_test:=true   # with test node
roslaunch robotiq_85_bringup robotiq_85.launch comport:=/dev/ttyUSB0 baud:=115200
roslaunch robotiq_85_bringup robotiq_85.launch dual_gripper:=true

Visualize the URDF:

roslaunch robotiq_85_description display.launch

MoveIt demo:

roslaunch robotiq_85_moveit_config demo.launch

Architecture

Package Structure

Seven packages in a catkin metapackage:

  • robotiq_85_gripper — Metapackage that depends on all others
  • robotiq_85_msgs — Custom messages: GripperCmd.msg (position/speed/force commands) and GripperStat.msg (status feedback)
  • robotiq_85_driver — Python driver nodes and action servers (the core logic)
  • robotiq_85_description — URDF/Xacro models and meshes (DAE visual, STL collision)
  • robotiq_85_bringup — Launch files for system startup
  • robotiq_85_moveit_config — MoveIt planning configuration (SRDF, controllers, OMPL)
  • robotiq_85_simulation — Gazebo mimic joint plugin (C++)

Driver Variants (robotiq_85_driver)

Three driver implementations exist for different hardware setups:

  1. Standard serial (robotiq_85_driver.py + robotiq_85_gripper.py) — Direct USB serial via Modbus RTU at 115200 baud, 100Hz polling. Default.
  2. Remote serial (robotiq_85_driver_remote_serial.py + robotiq_85_gripper_remote_serial.py) — For UR Official Driver; adds timing delays and lower polling rate for bandwidth management.
  3. URScript (urscript_gripper_action_server.py) — Generates URScript Modbus commands published to /ur_driver/URScript. Requires ur_modern_driver. Incomplete: no feedback from UR robot.

There is also a fake driver (fake_robotiq_85_driver.py) for testing without hardware.

Communication Stack

GripperCommandAction (control_msgs)  ←  MoveIt / client code
        ↓
Action Server (gripper_action_server.py)
        ↓
GripperCmd / GripperStat topics       ←  /gripper/cmd, /gripper/stat
        ↓
Driver node (robotiq_85_driver.py)
        ↓
Robotiq85Gripper → GripperIO          ←  Modbus RTU over serial

The action servers convert control_msgs/GripperCommandAction goals into GripperCmd messages. The driver node handles serial communication and publishes joint states for robot_state_publisher.

Key Technical Details

  • Gripper range: 0.0–0.085m position, 0.013–0.1 m/s speed, 5.0–220.0 N force
  • URDF knuckle joint range: 0.0–0.804 rad (driver converts between 0.085m gripper space and 0.804 rad joint space)
  • Modbus device ID: Must be set to 9 for single/left grippers
  • Default serial: /dev/ttyUSB0 at 115200 baud
  • Dual gripper mode: Uses /left_gripper/ and /right_gripper/ namespaces
  • MoveIt group: gripper with single actuated joint robotiq_85_left_knuckle_joint; all other finger joints are passive/mimic
  • Python 3: Codebase was migrated to Python 3 (Noetic)

Low-Level Protocol

Serial communication uses Modbus RTU implemented in src/robotiq_85/gripper_io.py with CRC validation in modbus_crc.py. The GripperIO class constructs/parses Modbus messages and maintains internal state. Robotiq85Gripper wraps this with higher-level activate/goto/stop methods.