RViz flickering effect when playing rosbag gives TF_OLD_DATA ignoring data from the past. Detected jump back in time clearing TF buffer
I built a simulation of a boat approaching a deck in Gazebo
and show the results on RViz
. The simulation is useful to replicate probable filed conditions.
Right after making sure the simulation works, I went on field and collected point using a lidar VLP-16
.
After switching the simulated environment with the rosbag
I collected on field, RViz
is showing a very strange flickering effect. In case you want to see the RViz
flickering effect I made a small video here you can click and see.
I playes the bag using the following command:
rosbag play --clock wood1_test4.bag /velodyne_points:=/velodyne_points_bag
This is my launch
file:
<?xml version="1.0" ?>
<launch>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="verbose" default="false"/>
<arg name="world_name" default="$(find lidar_deck)/world/lidar_deck.world"/>
<!-- Start gazebo and load the world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch" >
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="headless" value="$(arg headless)"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="verbose" value="$(arg verbose)"/>
<arg name="world_name" value="$(arg world_name)"/>
</include>
<!-- Spawn the lidar_deck_bot robot -->
<arg name="gpu" default="false"/>
<include file="$(find lidar_deck)/launch/boat.launch"/>
<!-- TEST DECK ONLY -->
<param name="robot_description" command="$(find xacro)/xacro '$(find lidar_deck)/urdf/lidar_deck_bot.urdf.xacro' gpu:=$(arg gpu)" />
<node pkg="gazebo_ros" type="spawn_model" name="spawn_model" args="-urdf -param /robot_description -model lidar_deck_bot"/>
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
<!-- TEST BOAT ONLY -->
<!--
<param name="robot_description" command="$(find xacro)/xacro '$(find lidar_deck)/urdf/boat_robot.xacro' gpu:=$(arg gpu)" />
<node pkg="gazebo_ros" type="spawn_model" name="spawn_model" args="-urdf -param /robot_description -model boat_robot"/>
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
-->
<!-- LAUNCH DECK AND BOAT -->
<!-- <include file="$(find lidar_deck)/launch/deck.launch"/> -->
<node pkg="tf" type="static_transform_publisher" name="segment_frame" args="0 0 0 0 0 0 1 base_footprint segment_frame 10"/>
<node pkg="tf" type="static_transform_publisher" name="odom" args="0 0 0 0 0 0 1 base_footprint odom 10"/>
<param name ="/use_sim_time" value="true"/>
<node pkg="lidar_boat_detection" type="process_lidar" name="process_lidar" />
<node pkg="lidar_boat_detection" type="trajectory_preprocessor_node" name="trajectory_preprocessor_node" />
<node pkg="lidar_boat_detection" type="linedrawing" name="linedrawing" />
<!-- RViz -->
<arg name="rviz" default="true"/>
<!-- <node if="$(arg rviz)" pkg="rviz" type="rviz" name="$(anon rviz)" respawn="false" output="screen" args="-d $(find lidar_deck)/rviz/lidar_deck.rviz" />-->
<node if="$(arg rviz)" pkg="rviz" type="rviz" name="$(anon rviz)" respawn="false" output="screen" args="-d $(find lidar_deck)/rviz/config2_all.rviz" />
</launch> ...