nalt / wsg50-ros-pkg

ROS package for Schunk WSG-50 gripper with high-rate feedback, closed-loop control, up to two FMF finger. Based on https://code.google.com/p/wsg50-ros-pkg/.
11 stars 41 forks source link

Attach weiss gripper model to robot urdf #7

Closed radhen closed 6 years ago

radhen commented 6 years ago

Is there a way I can attach the Weiss gripper model to the robot urdf in RViz and read the finger tip link transform in real time? In short I want to know where the finger tip of the gripper is in real time w.r.t to the base of the robot.

radhen commented 6 years ago

I think the answer lies within the wsg_50_simulation folder. I see it launches the gripper model and necessary joint state publishers which should be reading the current position of the gripper and publishing it back into RViz. I launched the wsg_50.launch

roslaunch wsg_50_simulation wsg_50.launch

but no success. It breaks at certain point. Currently debugging into this to see what exactly is going on. If someone has tried this in the past and got it working then please comment below. It will save a good amount of my time.

radhen commented 6 years ago

So I looked at the wsg_50.launch file properly. Unfortunately that is not what I am trying to achieve. If I understand it properly the file launches fake joint controllers or a simulated gripper in RViz. I wish to read the gripper status in real time.

Fortunately I managed to get a work around this. Currently I am using the send_urdf_fragment.py file to attach the gripper urdf fragment to the robot urdf and publish it in RViz. I set the gripper parameters (finger_length, finger_tip etc) in wsg_50.urdf.xacro file according to my needs and run the python file and I can now visualize the gripper attached to the robot urdf in RViz.