Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to add Velodyne sensor to ardrone robot in Gazebo?

asked 2016-05-20 11:49:59 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am a beginner in ROS and Gazebo. I am using ROS Hydro with Gazebo. I have installed ardrone_autonomy , tum_simulator , tum_ardrone and joystick drivers and the ardrone is working fine in Gazebo. the Velodyne HDL-32 already exist with the Gazebo models. How to add it to the top of my ardrone ? How to make a connection between the velodyne and the ardrone, or how to define the velodyne as one of the ardrone sensors like the camera and the sonar sensor ? Knowing that the Ardrone sensors defined as .urdf.xacro, and the velodyne sensor defined as .sdf I tried to add the .sdf file with the other sensors but it didn't work, when I simulate the world I can see everything is working correctly but the velodyne is missing. Please Help...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-23 00:35:01 -0500

updated 2016-05-23 18:39:19 -0500

I can't answer all of your questions, but I think I can answer how to add the model. We can take advantage of the fact that sdf supports nested models. Make a copy of the ardrone sdf and add the velodyne model to it. Then, all the plugins in the velodyne model should be active as a part of your model, and whatever topics they publish should be there. You can subscribe to them in ROS just like the other sensors on the ardrone.

[EDIT in response to comment] Ahh ok. As is shown in this tutorial, the lidar is simulated using a native gazebo rangefinder sensor. You're using urdf, so you'd have to use the special <gazbeo> tag in sdf. More on that tag can be found here You should be able to place the sdf from the velodyne model (the <sensor> tag the very at least) in <gazebo> tags in your URDF

edit flag offensive delete link more

Comments

Thanks for your comment my friend, Actually the Ardrone and its sensors are .urdf.xacro while the velodyne is .sdf, I tried to add the velodyne directly with the other sensors but it didn't work

max9090 gravatar imagemax9090 ( 2016-05-23 03:58:33 -0500 )edit

I edited my answer

Peter Mitrano gravatar imagePeter Mitrano ( 2016-05-31 14:25:25 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-20 11:49:59 -0500

Seen: 903 times

Last updated: May 23 '16