Ask Your Question
0

Gazebo simulation GPS fix

asked 2017-03-30 22:50:40 -0500

cho gravatar image

updated 2017-04-24 12:53:27 -0500

tfoote gravatar image

Hi, I am getting warning [warn] FP: NO GPS FIX while running the gazebo simulation for the ground rover. I am trying to move the rover based on the input waypoint lists. However, I cannot get the GPS fix data for the rover in simulation. How can I fix this problem? Any helps will be appreciated! I am using the Erlerobot's rover model and ardupilot

edit retag flag offensive close merge delete

Comments

Did you try rostopic list, to see, whether your model publishes any GPS data?

Andre Volk gravatar imageAndre Volk ( 2017-04-03 13:07:39 -0500 )edit

Yes I did. And it was publishing the gps data but it just keep showing the same value even if the rover starts to travel. Sorry for the late reply

cho gravatar imagecho ( 2017-04-05 21:05:14 -0500 )edit

Hi! Did you find any solution? Does it need a map of the environment first?

moshimojo gravatar imagemoshimojo ( 2018-01-30 16:16:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-06 15:51:03 -0500

updated 2018-09-19 13:40:10 -0500

I could not find out quickly, how the rover model from Erlerobot generates GPS data, but you could try to use the simulated GPS device from hector_gazebo_plugins instead. That one works pretty well.

To install hector_gazebo_plugins use:

$ sudo apt-get install ros-DISTRIBUTION-hector-gazebo-plugins

Afterwards add the following lines inside your <robot><gazebo> </gazebo></robot> tags of your URDF file (or <model> </model>, if you are using SDF):

<plugin name="gps_controller" filename="libhector_gazebo_ros_gps.so">
    <alwayson>true</alwayson>
    <updaterate>1.0</updaterate>
    <bodyname>base_link</bodyname>
    <topicname>/fix</topicname>
    <velocitytopicname>/fix_velocity</velocitytopicname>
    <drift>5.0 5.0 5.0</drift>
    <gaussiannoise>0.1 0.1 0.1</gaussiannoise>
    <velocitydrift>0 0 0</velocitydrift>
    <velocitygaussiannoise>0.1 0.1 0.1</velocitygaussiannoise>
</plugin>

The hector plugin above generates sensor_msgs/NavSatFix messages. If ardupilot really requires gps_common/GPSFix messages, you can use the fix_translator script in the gps_common package to do the conversion. The best way to use the translator ist to adapt the fix_tanslator.launch file to the topic names on your system.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-03-30 22:50:40 -0500

Seen: 1,329 times

Last updated: Sep 19 '18