Ask Your Question

How append a new plugin to Gazebo from a different package?

asked 2011-10-07 02:19:33 -0500

Hello All: My name is Ivan, I'm working on a project with ROS and Gazebo. but I have the following problem:

I have a package (wam_description) where is the file urdf the robot, and in another package I created the plugin for gazebo (wam_gazebo), where I have a library and a small urdf where where ls declare variables for use in the plugin (and all, obviously, within the label <gazebo>)

My question is how I can tell the plugin Gazebo to use?, Before I had no problems and it was all in one package, but now we defragmented the packet and do not know how to solve the problem

Thanks for your time

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted

answered 2011-10-10 20:58:37 -0500

@DimitriProsser is right, but you need to use xacro for this to work. Your urdf file should look like this (let's say it's called wam_description/wam.urdf.xacro):


  <include filename="$(find wam_gazebo)/urdf/your_file.urdf" />

Now you can load the URDF file into the robot_description parameter using this launch file:

    <param name="robot_description" command="$(find xacro)/ '$(find wam_description)/wam.urdf.xacro'" />
edit flag offensive delete link more


That's right, I forgot that xacro is needed. Thanks for catching that error.
DimitriProsser gravatar image DimitriProsser  ( 2011-10-11 01:13:54 -0500 )edit

answered 2011-10-07 04:23:09 -0500

DimitriProsser gravatar image

In the main urdf file, use the following line to include your <gazebo> tags and information:

<include filename="$(find wam_gazebo)/urdf/your_file.urdf" />
edit flag offensive delete link more

answered 2011-10-12 23:10:54 -0500

updated 2011-10-13 22:52:12 -0500

Thanks Martin for your answer.

I have a handmade urdf file,But I made a xacro file and I must have something wrong because it does not work. throw an error when you run this:

<param name="robot_description" coomand="$(find xacro)/ '$(find iri_wam_description)/ xacro/wam.urdf.xacro'"

Could you help me ,please?

The error is:

irojas@iri103:~$ roslaunch iri_wam_gazebo iri_wam_gazebo.launch  ... logging to /home/irojas/.ros/log/752610e6-f58b-11e0-ac95-00219b18a57a/roslaunch-iri103-12665.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):   File "/opt/ros/electric/stacks/xacro/", line 35, in <module>
    xacro.main()   File "/opt/ros/electric/stacks/xacro/src/", line 558, in main
    eval_self_contained(doc)   File "/opt/ros/electric/stacks/xacro/src/", line 499, in eval_self_contained
    eval_all(doc.documentElement, macros, symbols)   File "/opt/ros/electric/stacks/xacro/src/", line 452, in eval_all
    eval_all(body, macros, scoped)   File "/opt/ros/electric/stacks/xacro/src/", line 437, in eval_all
    eval_all(cloned, macros, symbols)   File "/opt/ros/electric/stacks/xacro/src/", line 452, in eval_all
    eval_all(body, macros, scoped)   File "/opt/ros/electric/stacks/xacro/src/", line 451, in eval_all
    str(node.tagName)) xacro.XacroException: Some parameters were not set for macro visual 
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/electric/stacks/xacro/ '/home/irojas/ros/iri-ros-pkg/trunk/stacks/iri_wam/iri_wam_description/xacro/wam.urdf.xacro'] returned with code [1]. 

Param xml is <param command="$(find xacro)/ '$(find iri_wam_description)/xacro/wam.urdf.xacro'" name="robot_description"/>

Thanks For All!!!

edit flag offensive delete link more


Xacro told you precisely what the error is: "Some parameters were not set for macro visual". Your URDF is invalid. Consult the URDF reference: and make sure that all visual tags have all missing elements.
Martin Günther gravatar image Martin Günther  ( 2011-10-13 22:54:19 -0500 )edit
Problem Resolt!!!, Thanks for All!!!
Ivan Rojas Jofre gravatar image Ivan Rojas Jofre  ( 2011-10-16 22:45:23 -0500 )edit

answered 2011-10-10 20:05:32 -0500

Thanks for you answer But I included the line in my main urdf, but still doesn't work. any other ideas? thanks for everything! Ivan

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-10-07 02:19:33 -0500

Seen: 1,035 times

Last updated: Oct 13 '11