Ask Your Question
1

Fuerte - no transformations published when using spawn_model

asked 2012-04-26 07:01:19 -0500

Angus gravatar image

updated 2012-04-27 02:51:47 -0500

Hello fellow ROSers,

I've recently tried upgrading from Electric to Fuete but I'm getting errors relating to publishing of the transforms after I spawn a model. I started out with the simple spawning of a block in this tutorial, and while the block spawns in Gazebo, no transforms are published. Here's the output I receive:

In first terminal:

$ roslaunch gazebo_worlds empty_world.launch
... [some startup messages, no errors] ...
rosrun gazebo spawn_model -file ~/object.urdf -urdf -z 1 -model my_object
Warning [parser.cc:330] Gazebo SDF has no gazebo element
Warning [parser.cc:269] parse as sdf version 1.0 failed, trying to parse as old deprecated format
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Error [parser_deprecated.cc:1159] Unable to get attribute. Node is null
Warning [parser_deprecated.cc:1146] Node[physical] Has empty key value[static]
Warning [parser_deprecated.cc:1146] Node[empty] Has empty key value[]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[mu1]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[mu2]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[fdir1]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[slip1]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[slip2]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[bounce]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[bounceVel]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[kp]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[kd]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[softCFM]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[maxVel]
Warning [parser_deprecated.cc:1146] Node[box] Has empty key value[minDepth]
Dbg Unable to find element with name[model] return empty

In second terminal:

$ rosrun gazebo spawn_model -file ~/object.urdf -urdf -z 1 -model my_object
loading model xml from file
waiting for service spawn_urdf_model
spawn status:  SpawnModel: successfully spawned model

As I still have Electric installed, I have tried running the same code but with my ROS paths pointing to the Electric installation, and everything ran smoothly with no errors or warnings, and all transforms published.

Any ideas? Thanks for you help!

  • Ubuntu oneiric 11.10

EDIT/UPDATE:

Opps, as hsu reminded me - there aren't supposed to be any transforms published when simply generating Block.urdf ... (more)

edit retag flag offensive close merge delete

Comments

I see, found the object.urdf in the tutorial. What transforms are you referring to?

hsu gravatar image hsu  ( 2012-04-26 08:25:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-04-27 06:33:16 -0500

Angus gravatar image

updated 2012-04-29 23:21:53 -0500

After playing around with it a little more, I've found some answers:

  • other than the errors and warnings shown above, the spawn_model command with Block.urdf does work just the same in Fuerte as in Electric. I got confused because the default graphs for rxgraph in Fuerte are different than in Electric (when I click the option 'show all topics,' however, then the two graphs appear roughly the same).

  • transforms for multi-link models are published normally when using spawn_model. It turns out my problem laid with an improper launch file that wasn't calling the pr2_controller_manager properly and I incorrectly assumed it was a problem related to the string of error and warning messages seen in my original question.

  • the big chunk of parser error and warning messages that you see above in my question remain but appear to be harmless.

Following is a copy of the launch file I successfully used. Note, however, that running Rviz in the launch file seems to still produce an error for me, whereas running it separately, using rosrun, after the launch file is loaded, works fine.

<!-- Sample empty world in which a robot is spawned.
This file is a modified version of empty_world.launch in the gazebo_simulator stack -->
<launch>

  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>

  <!-- set use_sim_time flag -->
  <group if="$(arg use_sim_time)">
    <param name="/use_sim_time" value="true" />
  </group>

  <!-- start empty world -->
  <node name="empty_world_server" pkg="gazebo" type="gazebo" args="$(find project_dir)/worlds/empty.world" respawn="false" output="screen"/>

 <!-- send urdf file to param server -->
  <param name="robot_description" command="$(find xacro)/xacro.py '$(find project_dir)/urdf/robot.urdf.xacro'" />

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="spawn_robot" pkg="gazebo" type="spawn_model" args="-urdf -z 3 -param robot_description -model pr2" respawn="false" output="screen" />

  <!-- start robot state and transform publisher -->
  <include file="$(find pr2_controller_manager)/controller_manager.launch"/>

  <!-- start gui -->
  <group if="$(arg gui)">
    <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>
  </group>


  <!--start Rviz
  <node name="Visualizer" pkg="rviz" type="rviz" />
  -->

</launch>
edit flag offensive delete link more

Comments

I've cleaned up a lot of the parser errors in simulator_gazebo 1.6.7. Thanks for reporting.

hsu gravatar image hsu  ( 2012-04-28 09:21:54 -0500 )edit

might be nice to include the correct launch files you are using so others reading this post can understand how to get the transforms.

hsu gravatar image hsu  ( 2012-04-28 09:22:47 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-04-26 07:01:19 -0500

Seen: 436 times

Last updated: Apr 29 '12