Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to use included models with plugins (ROS Hydro and stand alone Gazebo)

asked 2013-08-29 19:05:37 -0500

JuDiNiSi gravatar image

Hi!,

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

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:

/pioneer_description/models/pioneer2dx

/pioneer_description/models/camera

/pioneer_description/models/hokuyo

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?

Thanks!,

Juan-Diego

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-09-10 08:38:40 -0500

psei gravatar image

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.

Regards

psei

edit flag offensive delete link more

Comments

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 gazeborospkgs for connecting ROS (in catkinws) with the new version of Gazebo. I have my own gazebo models file too which was referenced to the corresponding gazebo models path (GAZEBOMODEL_PATH) as it is explained in some links that I have above in my question.

JuDiNiSi gravatar imageJuDiNiSi ( 2013-09-13 07:43:44 -0500 )edit

The plugins path are also referenced to the corresponding gazebo plugins path (GAZEBOPLUGINPATH).

JuDiNiSi gravatar imageJuDiNiSi ( 2013-09-13 07:45:05 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-08-29 19:05:37 -0500

Seen: 599 times

Last updated: Sep 10 '13