0

Rosanswers logo

I am new in working with Turtlebot 3 and ROS.

I am working with TurtleBot 3-Burger (Rasberry Pi 3) and ROS Kinetic.

I have a lunch file to lunch all my necessary nodes. When I run the lunch file in the workstation PC, I will get this error:

Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 26.5 according to authority unknown_publisher
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
     at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.16/src/buffer_core.cpp

I run roscore on the workstation PC and run roslaunch turtlebot3_bringup turtlebot3_robot.launch on robot PC. Then, I launch mt launch file.

My launch file code:

<!-- PC: roscore-->
<!-- ROBOT: roslaunch turtlebot3_bringup turtlebot3_robot.launch-->

<!-- PC-run this launcher: roslaunch tb3Navigation mapNavigation.launch !!!!!--> <!-- PC-run the code: rosrun tb3Navigation map_navigation !!!!!-->

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

<!-- roslaunch turtlebot3_bringup turtlebot3_model.launch--> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger]"/> <include file="$(find turtlebot3_bringup)/launch/includes/description.launch.xml"> <arg name="model" value="$(arg model)" /> </include>

<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> <param name="publish_frequency" type="double" value="50.0" /> </node>

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"> <param name="use_gui" value="true"/> </node>

<!--<node name="rviz1" pkg="rviz" type="rviz" args="-d $(find turtlebot3_description)/rviz/model.rviz"/>-->

<!-- Map --> <!-- call Map and World file --> <arg name="map_file" default=" $(find tb3Navigation)/maps/mapFloor01.yaml"/> <arg name="world_file" default=" $(find tb3Navigation)/maps/stage/mapFloor01.world"/>

<!-- Stage --> <node pkg="stage_ros" type="stageros" name="stageros" args="$(arg world_file)"> <param name="base_watchdog_timeout" value="0.5"/> <remap from="odom" to="odom"/> <remap from="base_pose_ground_truth" to="base_pose_ground_truth"/> <remap from="cmd_vel" to="mobile_base/commands/velocity"/> <remap from="base_scan" to="scan"/> </node>

<node pkg="nodelet" type="nodelet" name="mobile_base_nodelet_manager" args="manager"/> <node pkg="nodelet" type="nodelet" name="cmd_vel_mux" args="load yocs_cmd_vel_mux/CmdVelMuxNodelet mobile_base_nodelet_manager"> <param name="yaml_cfg_file" value="$(find turtlebot_bringup)/param/mux.yaml"/> <remap from="cmd_vel_mux/output" to="mobile_base/commands/velocity"/> </node>

<!-- Map server --> <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"> <param name="frame_id" value="/map"/> </node>

<!-- need to change --> <arg name="initial_pose_x" default="3.31"/> <arg name="initial_pose_y" default="4.20"/> <arg name="initial_pose_a" default="0.0"/>

<!-- AMCL - the first location --> <include file="$(find turtlebot3_navigation)/launch/amcl.launch.xml"> <arg name="scan_topic" value="scan"/> <!--<arg name="use_map_topic" value="true"/>--> <arg name="initial_pose_x" value="$(arg initial_pose_x)"/> <arg name="initial_pose_y" value="$(arg initial_pose_y)"/> <arg name="initial_pose_a" value="$(arg initial_pose_a)"/> </include>

<!-- Move_base --> <arg name="cmd_vel_topic" default="/cmd_vel" /> <arg name="odom_topic" default="odom" /> <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">

&lt;param name=&quot;base_local_planner&quot; value=&quot;dwa_local_planner/DWAPlannerROS&quot; /&gt;

&lt;rosparam file=&quot;<span class="math-container">$(find turtlebot3_navigation)/param/costmap_common_params_$</span>(arg model).yaml&quot; command=&quot;load&quot; ns=&quot;global_costmap&quot; /&gt;
&lt;rosparam file=&quot;<span class="math-container">$(find turtlebot3_navigation)/param/costmap_common_params_$</span>(arg model).yaml&quot; command=&quot;load&quot; ns=&quot;local_costmap&quot; /&gt;
&lt;rosparam file=&quot;<span class="math-container">$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" /&gt;
&lt;rosparam file="$</span>(find turtlebot3_navigation)/param/global_costmap_params.yaml&quot; command=&quot;load&quot; /&gt;
&lt;rosparam file=&quot;<span class="math-container">$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" /&gt;
&lt;rosparam file="$</span>(find turtlebot3_navigation)/param/dwa_local_planner_params.yaml&quot; command=&quot;load&quot; /&gt;

&lt;remap from=&quot;cmd_vel&quot; to=&quot;<span class="math-container">$(arg cmd_vel_topic)"/&gt;
&lt;remap from="odom" to="$</span>(arg odom_topic)&quot;/&gt;

</node>

<!-- Load rViz 3D: rosrun rviz rviz -d rospack find turtlebot3_navigation/rviz/turtlebot3_nav.rviz--> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_nav.rviz"/>

<!-- PC: run the code--> <node name="map_navigation" pkg="tb3Navigation" type="map_navigation" output="screen" /> </launch>


Originally posted by maziarser on ROS Answers with karma: 68 on 2017-09-08

Post score: 0

1 Answers1

0

Rosanswers logo

This line

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

in your launch file means that all nodes within the launch file (and all others started after the launch file has been run) try to use simulation time. This feature is intended mainly for simulation (see the Clock wiki page) and mis-using can lead to all sorts of problems. There's a good chance that removing that line will make things work (if you remove it, make sure you start new roscore, as otherwise the param stays on the parameter server).


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2017-09-08

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by maziarser on 2017-09-08:
Thank you for your answer. It was part of the problem. The other mistake was about the "stage" part and also the "world" file that we do not need them.

Comment by Stefan Kohlbrecher on 2017-09-11:
Obviously :) I stopped further looking at the launch file when I saw the "use_sim_time" as that alone doesn't make sense on a real system (in 99.9% of cases). Starting simulation does not, either :)

Stefan Kohlbrecher
  • 8,949
  • 1
  • 1
  • 2