Gazebo | Ignition | Community
Ask Your Question
0

Xacro model spawn issues

asked 2016-05-18 22:09:03 -0600

karthikj219 gravatar image

updated 2016-05-18 22:11:32 -0600

Hey guys,

I need to simulate a custom robot model in Gazebo (I'm using Ubuntu 14.04.4 with ROS Indigo and Gazebo 7.1, which I have manually installed using the osrf repository). The xacro file I have works with Rviz just fine, but despite running without errors, I get nothing in Gazebo. I'm using the xacro files from here.

Also, here is my launch file:

    <launch>
         <include file="$(find gazebo_ros)/launch/empty_world.launch">
              <arg name="world_name" value="$(find yumi_gazebo)/worlds/yumi.world"/>
        </include>

       <param name="robot_description" command="$(find xacro)/xacro.py $(find yumi_description)/urdf/yumi.xacro" />

       <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model yumi" />

</launch>

I'm sorry if this is a repeat question, but I've tried quite a few of the other solutions, and I'm not really sure how to manually convert the xacro in question to SDF.

edit retag flag offensive close merge delete

Comments

Can you add the output from Gazebo when it's run in verbose mode?

nkoenig gravatar imagenkoenig ( 2016-05-19 08:44:40 -0600 )edit

Error [parser_urdf.cc:3408] Unable to call parseURDF on robot model Error [parser.cc:309] parse as old deprecated model file failed. [Err] [Server.cc:380] Unable to read sdf file[src/yumi_gazebo/launch/yumitest.launch] This is what I get.

karthikj219 gravatar imagekarthikj219 ( 2016-05-19 22:12:50 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-05-21 06:43:59 -0600

jwidauer gravatar image

I'm not entirely sure if that is your intention, but you are using "yumi.xacro" as the model.

"yumi.xacro" only has definitions for macros in it and no real models.

I believe you meant to use "yumi.urdf.xacro", which has the actual models in it and not only macro definitions.

edit flag offensive delete link more

Comments

Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py /home/karthik/ws/src/yumi_description/urdf/yumi.urdf.xacro] returned with code [1]. Param xml is The traceback for the exception was written to the log file. If I use the urdf.xacro, I get the above error, Which means I cant use it.

karthikj219 gravatar imagekarthikj219 ( 2016-05-22 22:47:50 -0600 )edit

Well that looks like your xacro files are not well formed. Try running the following command and post the results: "rosrun xacro xacro.py $(find yumi_description)/urdf/yumi.urdf.xacro" If you get an error message read through it and it should tell you where you have the problem in the model description.

jwidauer gravatar imagejwidauer ( 2016-05-24 16:16:43 -0600 )edit

Thanks for your help, I managed to create a SDF file for my robot manually. I'm using that now.

karthikj219 gravatar imagekarthikj219 ( 2016-05-25 02:58:52 -0600 )edit
0

answered 2016-05-18 23:53:47 -0600

nkoenig gravatar image

You can pass your xacro file through the xacro.py script to produce a urdf file. This urdf file can be passed to gazebo, which will internally convert urdf to sdf.

edit flag offensive delete link more

Comments

1

@nkoenig, if you see the launch file above, I've done that, as was done in the tutorial, but still the same result.

karthikj219 gravatar imagekarthikj219 ( 2016-05-19 05:17:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-18 22:09:03 -0600

Seen: 7,759 times

Last updated: May 21 '16