Fixed frame does not exist
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:
<launch>
<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"/>
</launch>
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!
Try with use_sim_time=false
Oh! It works fine now. What a surprise. Thank you! Could you please tell me why the error comes from use_sim_time?
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.