ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As John mentioned in his comment, there is no notion of geo-referenced coordinates in Gazebo. Some world files from Willow Garage contain a <geo:origin> Tag with latitude and longitude of the Gazebo world, but there is no interface in the Gazebo API for controller plugins.
You can take a look at our GPS plugin in the hector_gazebo_plugins package. It publishs sensor_msgs/NavSatFix messages with the robot's position in WGS84. Documentation in the wiki is still missing and will be completed during the next days. For that plugin we use a simple equirectangular projection to convert gazebo coordinates to geo coordinates, which is accurate enough if you do not go far away from the configured reference point (the origin of the Gazebo coordinate system) and if you do not want to use it in the polar regions.
Another option might be to use the geographic_info stack which provides conversion functions between GeoPoints in WGS84 and UTM coordinates. UTM coordinates are metric and can be derived directly from Gazebo coordinates.