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.
Did you try
rostopic list
, to see, whether your model publishes any GPS data?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
Hi! Did you find any solution? Does it need a map of the environment first?