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

Simulate GPS sensor via ROS plugins (Hector_Plugins)

asked 2017-11-19 04:30:25 -0500

Salahuddin_Khan gravatar image

updated 2017-12-10 12:56:22 -0500

jayess gravatar image

Hi, I am new to ROS I'm trying to simulate some realistic sensors with noise, drift and bias on a DBW car. I have used the following code to simulate an IMU .

<gazebo reference="${name}">
<gravity>true</gravity>
<sensor name="imu_sensor" type="imu">
  <always_on>true</always_on>
  <update_rate>100</update_rate>
  <visualize>true</visualize>
  <topic>__default_topic__</topic>
  <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin">
    <topicName>imu</topicName>
    <bodyName>imu_link</bodyName>
    <updateRateHZ>10.0</updateRateHZ>
    <gaussianNoise>0.0</gaussianNoise>
    <xyzOffset>0 0 0</xyzOffset>
    <rpyOffset>0 0 0</rpyOffset>
    <frameName>imu_link</frameName>
  </plugin> 

</sensor>
</gazebo>

and I'd be grateful if someone could help me out with GPS , I've already downloaded the Hector Plugins ( http://wiki.ros.org/hector_gazebo_plu... ) but I'm not sure how to modify the code to use those plugins.

Thank You, Sal.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-12-10 09:01:11 -0500

moshimojo gravatar image

I tried hector gps too but i had some errors. But when i simply added this plugin in my URDF:

      <!-- GPS Sensor -->
  <gazebo>
    <plugin name="novatel_gps_sim" filename="libhector_gazebo_ros_gps.so">
      <alwaysOn>1</alwaysOn>
      <updateRate>10.0</updateRate>
      <bodyName>base_footprint</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>
  </gazebo>

my problem solved. Base_footprint is a link that the gps is attached to in this users URDF file. Hope this helps.

edit flag offensive delete link more

Comments

I am working on hector gps too.. do you have a published journal or repo of your work?

siddharthcb gravatar image siddharthcb  ( 2021-05-27 05:14:03 -0500 )edit

Question Tools

Stats

Asked: 2017-11-19 04:30:25 -0500

Seen: 2,614 times

Last updated: Dec 10 '17