Gazebo Answers logo


I am creating my own Gazebo-ROS Package using SDF specifications for a pioneer2dx model including the camera and hokuyo models.

For moving the pioneer2dx (with camera and hokuyo included but without their plugins) I used the gazebo_ros_diff_drive.cpp plugin from /gazebo_ros_pkgs/gazebo_plugins. This was tested with a publisher to deal with the /cmd_vel topic. Until there everything is good working and displaying the debug information in a normal way by the rostopic list in the terminal.

Now, my problem is when I try to implement the camera and the hokuyo models included in the pioneer2dx model with their respective plugins of /gazebo_ros_pkgs/gazebo_plugins, gazebo_ros_camera.cpp and gazebo_ros_laser.cpp which should be filled by the experience of each one because some of their sections are blank (my next step). This is mentioned in Tutorial ROS_Motor_and_Sensor_Plugins.

So, I would like to be sure of including the plugins correctly before writing them.

I got some ideas from this answer considering there the example of the dr_vehicle (model.config and model.sdf) and also following the latest SDF specification, but there is still an error on my model.

In the Tutorial, there is a robot's model and description hierarchy explained without plugins implementation in a SDF model. I am following this hierarchy of MYROBOT_description and MYROBOT_gazebo and it works correctly while not including camera and hokuyo plugins.

Should I create each model separatly within the /pioneer_description file with their respective plugins? so:




each one with a plugins file and this also means changes for my .world file located in /pioneer_gazebo. And also setting the paths as mentioned in this answer.

Does anyone have some recommendations, examples or information about using included models with plugins and maybe some experience with the camera and hokuyo plugins mentioned above for ROS Hydro and stand alone Gazebo?



Originally posted by JuDiNiSi on Gazebo Answers with karma: 3 on 2013-08-29

Post score: 0


1 Answer 1


Gazebo Answers logo

Hi Juan,

I think there is no "correct" way to do this. For myself I like to separate my robot parts into different files, which are included in a central masterfile. This way, I am able to enable/disable robot parts very quickly. If you choose to put the different parts into different subfolders or not depends on your own taste.

Further more, I used the mesh files that come with gazebo to visualize my sensor (e.g. model://hokuyo/meshes/hokuyo.dae), but since I wanted to use ROS messages, I needed to modify the used plugin "libRayPlugin.so" to "libgazebo_ros_laser.so" anyways, and therefore I wrote my own version of the hokuyo laser scan.

Since I dont use Hydro and standalone gazebo, but groovy and gazebo 1.5, i cant provide any SDF code, because I coded in URDF.



Originally posted by psei with karma: 166 on 2013-09-10

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by JuDiNiSi on 2013-09-13:
Hi! Psei, thank you for your answer! I think so as well. In any case, I also had to do it separately. In the pioneer2dx model.sdf , I included the links for a camera and a hokuyo laser with their ROS plugins given by the gazebo_ros_pkgs for connecting ROS (in catkin_ws) with the new version of Gazebo. I have my own gazebo models file too which was referenced to the corresponding gazebo models path (GAZEBO_MODEL_PATH) as it is explained in some links that I have above in my question.

Comment by JuDiNiSi on 2013-09-13:
The plugins path are also referenced to the corresponding gazebo plugins path (GAZEBO_PLUGIN_PATH).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.