Skip to content

Feature Request: Python API Access to Gripper Joint States #148

@dwaitbhatt

Description

@dwaitbhatt

Description

With ROS2, it is possible to read the joint states of the xArm gripper using the /joint_states topic. However, there does not appear to be an equivalent method exposed in the Python API for accessing these same joint values.

Access to gripper joint states is important for use cases such as estimating whether an object has been successfully grasped without relying on tactile sensors. This functionality is especially valuable for sim-to-real transfer of manipulation policies trained in simulation, where access to all joint angles (arm + gripper) is typically available.

ROS Example

Below is an example output from ros2 topic echo /joint_states, showing the relevant gripper joint names and positions:

header:
  stamp:
    sec: 1760532778
    nanosec: 756502537
  frame_id: gripper-joint-state data
name:
- drive_joint
- left_finger_joint
- left_inner_knuckle_joint
- right_outer_knuckle_joint
- right_finger_joint
- right_inner_knuckle_joint
position:
- 0.009999999776482582
- 0.009999999776482582
- 0.009999999776482582
- 0.009999999776482582
- 0.009999999776482582
- 0.009999999776482582
velocity:
- .nan
- .nan
- .nan
- .nan
- .nan
- .nan
effort:
- .nan
- .nan
- .nan
- .nan
- .nan
- .nan

Feature Request

Please consider adding support to the Python API for retrieving gripper joint states, ideally exposing the same data that is available via ROS. This would allow users to:

  • Monitor gripper joint positions directly from Python
  • Implement custom feedback logic for grasp verification
  • Improve sim-to-real transfer of learning-based manipulation policies

Additional Context

  • Hardware: xArm6 robot, xArm gripper
  • ROS Version: ROS2
  • Python SDK Version: 1.17.0

If this functionality already exists in the Python SDK and I have missed it, please point me in the right direction - any guidance would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions