Ask Your Question

Gazebo_ros spawn_model reference_frame not working

asked 2016-03-22 12:38:04 -0500

Hi there,

I am launching the following world with the empty_world.launch file:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name"   value="$(find my_pkg)/" />

Where is:

<sdf version="1.5">
  <world name="default">

    <!-- Extra objects -->
    <model name='unit_cylinder_1'>
        <pose>0 0 2 3.141592 0 1.57</pose>

I am also launching the following:

<node ns="alpha" name="spawn_robot" pkg="gazebo_ros" type="spawn_model" output="screen"
      args="-param robot_description
            -urdf -model alpha
            -robot_namespace alpha
            -reference_frame unit_cylinder_1
            -x 2
            -y 4
            -z 0"/>

But I keep getting this error: Spawn status: SpawnModel: reference reference_frame not found, did you forget to scope the link by model name? Parameter robot_description is in the alpha namespace and it is a valid URDF (it works if I remove the -reference_frame).

Basically, my question is: is there a bug on the -reference_frame argument or is there something else I am missing? Maybe is related with namespaces or something.


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-09-07 20:19:39 -0500

mrjogo gravatar image

(cross-answered in )

From experimentation, the -reference_frame option in spawn_model must be relative to a link in a model in the world. So in your case, the following modifications should work:

<!-- Extra objects -->
<model name='unit_cylinder_1'>
    <pose>0 0 2 3.141592 0 1.57</pose>
    <link name='my_link'>

And in your node args -reference_frame unit_cylinder_1::my_link

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: 2016-03-22 12:38:04 -0500

Seen: 3,888 times

Last updated: Sep 07 '16