ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

If you spawned the robots from urdf/xacro files through gazebo_ros_pkgs the two robots should have positions in tf that you can query with standard tf transform lookups, you can get an xyz distance to one robot in the frame of the other robot, and then you can get the L2 norm to get the distance.

An easy way to see if the tfs exist is to launch rviz and start a tf plugin.

If the robots aren't brought up through ros try http://answers.gazebosim.org .