ian-chuang / OnRobot-RG2FT-ROS

Unofficial ROS driver for the OnRobot RG2-FT Gripper. Control, monitor, and simulate this gripper with ROS. Features force torque sensors, MoveIt integration, and Gazebo simulation.
MIT License
10 stars 4 forks source link

Physical gripper not responding to publishers #4

Closed bleubirb closed 2 months ago

bleubirb commented 4 months ago

Hi, I'm trying to control the gripper via the Publisher-Subscriber interface. I'm currently entering the command like this:

rostopic pub /command onrobot_rg2ft_msgs/RG2FTCommand "TargetForce: 0
TargetWidth: 500
Control: 1"

and I'm getting a response:

publishing and latching message. Press ctrl-C to terminate

But no response is occurring from the gripper. I'm able to successfully move the gripper via RVIZ, making me feel confident in my physical connections, along with being able to ping the gripper. Alongside this, when I sanity check via rostopic echo /command in another terminal, I can see the input is successful.

The other thing is in the log, it says that the subscriber count is 0. image

I'm a bit new to ROS, so any help would be appreciated with this problem!

ian-chuang commented 4 months ago

Hello,

Try increasing the force to 30-400. If the force is 0 the gripper won't move. Also try to see if you can rostopic echo the gripper state topic. If you are receiving values from the state then I think the driver should be working so I'm not sure why the command topic wouldn't work.

bleubirb commented 4 months ago

Hi,

That worked! Thank you. I can rostopic echo the gripper state as well. Would you happen to know why you have to set the TargetForce to >=30? Just out of curiosity.

ian-chuang commented 4 months ago

Sorry it is my mistake for not making clear in code/docs. The gripper force range is 3-40N from what I remember. So too low a value doesn't seem to move the gripper.

bleubirb commented 4 months ago

No worries, that makes sense. The minimum value seems to be 2N from running it on the gripper.

And once again, I appreciate the help!