ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Why not use Gazebo's API to do this? If your robot's end-effector is moving obviously you need a constant need for distance measurement?
You can write a World Plugin for Gazebo, then get the world position of end-effector, as well as world position of the object, then simply calculate the Eucledean between these two.
You can find an example where I did something similar here;