Gazebo | Ignition | Community
Ask Your Question

add sensor in urdf from gazebo model database

asked 2018-02-10 16:11:56 -0500

RoboticRos gravatar image

Hi, In gazebo, there are already available models (insert tab) which you can simply insert in your scene. I am having trouble with using it with my urdf model.

I want to add velodyne to my robot. But the problem is that i cannot do this. I have tried adding it using this link information but NO LUCK as it's for .sdf format models.

Need help with adding available model (velodyne in .sdf) sensor to a urdf robot model...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-15 04:26:37 -0500

Brosseau.F gravatar image

updated 2018-02-15 04:59:22 -0500

You need to set a gazebo tag in your urdf file.

For example, if I have a link safety_lidar to represent my sensor, I will add the following tag :

<gazebo reference="velodyne_${lidarName}">
  <sensor type="ray" name="velodyne_sensor_${lidarName}">
    <pose>0.0 0.0 0.0 0.0 0 0</pose>
    <plugin name="gazebo_ros_velodyne_controller_${lidarName}" filename="">

I am using xacro parameters (${}) to adapt my sensor.

edit flag offensive delete link more



RoboticRos gravatar imageRoboticRos ( 2018-02-16 05:48:11 -0500 )edit

@Brosseau ... It is not publishing any topics. ${lidarName} --> This can be anything (name) i want it to be be ... right??

RoboticRos gravatar imageRoboticRos ( 2018-02-16 07:51:19 -0500 )edit

Yes it can be the name you want. You have to replace all the parameters with the value that you want. This part of urdf is inside a xacro macro, that's why there is some ${parameters}.

Brosseau.F gravatar imageBrosseau.F ( 2018-02-16 11:01:36 -0500 )edit

The plugin needs to be updated to ``, then this works.

Subodh Malgonde gravatar imageSubodh Malgonde ( 2018-08-11 01:42:55 -0500 )edit

Question Tools

1 follower


Asked: 2018-02-10 16:11:56 -0500

Seen: 3,625 times

Last updated: Feb 15 '18