Gazebo | Ignition | Community
Ask Your Question
0

gps sensor in gazebo 1.9

asked 2014-05-19 04:05:22 -0500

arenillas gravatar image

I'm trying to attach a gps sensor to a gazebo model of a robot I have. I use a robot.urdf.xacro file to describe the robot and a robot.gazebo file to describe the sensors. I don't know how to implement the gps. Is there any tutorial or information about it?

Thanks

edit retag flag offensive close merge delete

Comments

peshala gravatar imagepeshala ( 2014-05-20 04:14:38 -0500 )edit

I am trying to use it but I don't know how to implement it in the .gazebo file.

arenillas gravatar imagearenillas ( 2014-05-20 06:28:50 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-05-21 03:13:08 -0500

Francisco gravatar image

You can include it in the URDF model of your robot using the plugin tag like this:

<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>

Here you can find a working example.

edit flag offensive delete link more

Comments

Thanks. It worked perfectly.

arenillas gravatar imagearenillas ( 2014-05-21 04:37:06 -0500 )edit

Could you please mark this answer as already answered by clicking the check button at the left?

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2014-05-21 17:19:57 -0500 )edit
0

answered 2014-05-20 06:34:24 -0500

arenillas gravatar image

I am trying to use it but I don't know how to implement it in the .gazebo file. I have a previous version in which:

<gazebo>
      <controller:hector_gazebo_ros_gps name="novatel_gps_sim" plugin="libhector_gazebo_ros_gps.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>4.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>
      </controller:hector_gazebo_ros_gps>
   </gazebo>

The problem is that I don't know how to adapt this code for gazebo 1.9

edit flag offensive delete link more

Comments

You should update (edit) the original question instead of posting answers

Francisco gravatar imageFrancisco ( 2014-05-21 02:46:18 -0500 )edit

Thanks I'll do it with my following questions.

arenillas gravatar imagearenillas ( 2014-05-21 04:36:33 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-05-19 04:05:22 -0500

Seen: 4,223 times

Last updated: May 21 '14