ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Have you set the Fixed Frame to base_link after RViz has started?

Have you set the Fixed Frame to base_link after RViz has started?


Edit:

I don't understand your question. I posted all my code. As you can see, I have a base_link defined.

The question is whether you have configured RViz correctly. I can see you have a base_link, but if you don't set the Fixed Frame configuration option to base_link, RViz will not know 'where' your TF tree starts, to put it like that.

It renders fine in Rviz when I run the tutorial's other roslaunch examples like roslaunch urdf_tutorial xacrodisplay.launch model:='$(find myrobot_description)/urdf/myrobot.urdf.xacro'

Yes, and that is because the xacrodisplay.launch file instructs RViz to load the urdf_tutorial/urdf.rviz file, which sets the Fixed Frame configuration option to base_link. From urdf_tutorial/urdf.rviz:

...
  Global Options:
    Background Color: 48; 48; 48
    Fixed Frame: /base_link
...

That option is shown under Global Options in the tree on the left in the main RViz window.

Have you set the Fixed Frame to base_link after RViz has started?


Edit:

I don't understand your question. I posted all my code. As you can see, I have a base_link defined.

The question is whether you have configured RViz correctly. I can see you have a base_link, but if you don't set the Fixed Frame configuration option to base_link, RViz will not know 'where' your TF tree starts, to put it like that.

It renders fine in Rviz when I run the tutorial's other roslaunch examples like roslaunch urdf_tutorial xacrodisplay.launch model:='$(find myrobot_description)/urdf/myrobot.urdf.xacro'

Yes, and that is because the xacrodisplay.launch file instructs RViz to load the urdf_tutorial/urdf.rviz file, which sets the Fixed Frame configuration option to base_link. From (from xacrodisplay.launch):

<launch>
    ...
    <arg name="rvizconfig" default="$(find urdf_tutorial)/urdf.rviz" />
    ...
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
</launch>

And from urdf_tutorial/urdf.rviz:

...
  Global Options:
    Background Color: 48; 48; 48
    Fixed Frame: /base_link
...

That option is shown under Global Options in the tree on the left in the main RViz window.

Have you set the Fixed Frame to base_link after RViz has started?


Edit:

I don't understand your question. I posted all my code. As you can see, I have a base_link defined.

The question is whether you have configured RViz correctly. I can see you have a base_link, but if you don't set the Fixed Frame configuration option to base_link, RViz will not know 'where' your TF tree starts, to put it like that.

It renders fine in Rviz when I run the tutorial's other roslaunch examples like roslaunch urdf_tutorial xacrodisplay.launch model:='$(find myrobot_description)/urdf/myrobot.urdf.xacro'

Yes, and that is because the xacrodisplay.launch file instructs RViz to load the urdf_tutorial/urdf.rviz file, which sets the Fixed Frame configuration option to base_link (from xacrodisplay.launch):

<launch>
    ...
    <arg name="rvizconfig" default="$(find urdf_tutorial)/urdf.rviz" />
    ...
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
</launch>

And from urdf_tutorial/urdf.rviz:

...
  Global Options:
    Background Color: 48; 48; 48
    Fixed Frame: /base_link
...

That option is shown under Global Options in the tree on the left in the main RViz window.


Edit2:

When I changed my rviz tag to point to urdf.rviz, that fixed that error. [..]

Note that you could've just as easily used the dropdown next to Fixed Frame in the RViz window.

Now I see the model, but I still don't see the "Joint State Publisher" dialog shown here. Why is that?

Note that this is unrelated to your initial issue(s). I'm not sure, but it could be a parameter resolution issue. Try making the use_gui parameter private to the joint_state_publisher node (it is the only node using that parameter anyway).