Fixed frame does not exist

asked 2017-07-10 10:58:40 -0500

bryanby gravatar image

I use rviz to visualize some moving objects with rviz Markers. All of the Markers' frame_id is "/my_frame". I also use map_server to load a map with frame_id "/map". I use static_transform_publisher to build up the relation between /map and /my_frame.

Here is the Launch file:


<param name="use_sim_time" value="true"/>

<node pkg="rviz" type="rviz" name="rviz" output="screen" args="-d $(find Simulation)/src/simulator.rviz" />

<node name="map2frame" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 1 map my_frame 100"/>

<node name="map_server" pkg="map_server" type="map_server" args="$(find Simulation)/src/map.yaml"/>

<!--Publish the Marker pose-->
<node name="DESPOT" pkg="Simulation" type="DESPOT" respawn="true"/>

<node name="MultipolicyMPC" pkg="Simulation" type="MultipolicyMPC" respawn="true"/>

<node name="DriverModel" pkg="Simulation" type="DriverModel" respawn="true"/>


In simulator.rviz, I set the fixed frame in global options as /map.

But it gives a warning in rviz that the fixed frame does not exist and there is no objects showing in the rviz. I am new in ROS. Appreciate someone's kind help!

edit retag flag offensive close merge delete


Try with use_sim_time=false

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-07-11 00:42:44 -0500 )edit

Oh! It works fine now. What a surprise. Thank you! Could you please tell me why the error comes from use_sim_time?

bryanby gravatar imagebryanby ( 2017-07-11 02:40:45 -0500 )edit

No idea, that is why this was not an answer. I have observed problems with tf when sim time is set. Have not understood yet why.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-07-11 05:49:23 -0500 )edit