Robotics StackExchange | Archived questions

How to add Velodyne sensor to ardrone robot in Gazebo?

I am a beginner in ROS and Gazebo. I am using ROS Hydro with Gazebo. I have installed ardroneautonomy , tumsimulator , 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...

Asked by max9090 on 2016-05-20 11:49:59 UTC

Comments

Answers

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

Asked by Peter Mitrano on 2016-05-23 00:35:01 UTC

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

Asked by max9090 on 2016-05-23 03:58:33 UTC

I edited my answer

Asked by Peter Mitrano on 2016-05-31 14:25:25 UTC