0
$\begingroup$

Rosanswers logo

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?


Originally posted by baseballmvp27 on ROS Answers with karma: 31 on 2012-02-05

Post score: 1


Original comments

Comment by hsu on 2012-02-09:
@Johannes Your observation is correct, Gazebo do not support GPS internally right now. Please move your comment to an answer. Thanks.

Comment by Johannes Meyer on 2012-02-06:
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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Johannes Meyer with karma: 1266 on 2012-02-17

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.