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

how does ROS GAZEBO handle GPS coordinates?

asked 2012-02-05 08:46:11 -0600

baseballmvp27 gravatar image

I have a program which causes my robot to to go to a specific global position. How do I make this work in Gazebo?

Within Gazebo, specifically, I have a map from a .png. Basically, I want my robot to go across the board to some position while avoiding obstacles. How do I find out the "global position" (or the equivalently handled position within Gazebo) of a spot across the map to send my robot?

edit retag flag offensive close merge delete

Comments

Although some Willow Garage world files contain a <geo:origin> Tag which contains lat and lon of the Gazebo world, I am not aware of a interface in the gazebo API for controllers. We have a GPS plugin in our hector_gazebo_plugins package since last week: http://www.ros.org/wiki/hector_gazebo_plugins
Johannes Meyer gravatar image Johannes Meyer  ( 2012-02-05 23:56:45 -0600 )edit
@Johannes Your observation is correct, Gazebo do not support GPS internally right now. Please move your comment to an answer. Thanks.
hsu gravatar image hsu  ( 2012-02-09 05:41:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-02-17 08:56:33 -0600

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-02-05 08:46:11 -0600

Seen: 5,038 times

Last updated: Feb 17 '12