Rosanswers logo

I have this launch file in order to use nagigation stack. I follower a tutorial on robotigniteacademy path planning but he used husky robots to simulate path planning on gazebo,i want to do the same thing with turtlebot3 on gazebo simulation but there isn't on turtlebot3 manual the chance to simulate path planning (only if you have real robot)


 <!-- Turtlebot3 -->
 <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch" />

 <!-- Run the map server -->
 <arg name="map_file" default="$(find my_move_base_launcher)/maps/map.yaml"/>

 <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

 <!--- Run AMCL -->
 <include file="$(find my_move_base_launcher)/launch/amcl.launch.xml" />

 <!--- Run Move Base -->
 <include file="$(find my_move_base_launcher)/launch/turtlebot3_navigation_path_planning_2.launch" />

When i launch this file i have this error :


/ amcl (amcl/amcl) map_server (map_server/map_server) move_base (move_base/move_base) robot_state_publisher (robot_state_publisher/robot_state_publisher)


process[robot_state_publisher-1]: started with pid [25865]
process[map_server-2]: started with pid [25866]
process[amcl-3]: started with pid [25868]
process[move_base-4]: started with pid [25880]
[ INFO] [1526983048.924109442]: Subscribed to map topic.
[map_server-2] process has died [pid 25866, exit code 255, cmd /opt/ros/kinetic/lib/map_server/map_server /home/bera/catkin_ws/src/my_move_base_launcher/maps/map.yaml __name:=map_server __log:=/home/bera/.ros/log/17326908-5da3-11e8-afab-9c2a7033abfa/map_server-2.log].
log file: /home/bera/.ros/log/17326908-5da3-11e8-afab-9c2a7033abfa/map_server-2*.log
[ WARN] [1526983054.004897998]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1015 timeout was 0.1.

Obv i have a maps folder with map.pgm and map.yaml files and inside yaml file i have to right path of the image file. Suggestion?

------------EDIT:UPDATE --------------

this is my amcl.launch.xml that i call inside turtlebot3_navigation_path_planning_1.launch

<param name="use_map_topic" value="$(arg use_map_topic)"/>

<param name="min_particles"             value="500"/>
<param name="max_particles"             value="3000"/>
<param name="kld_err"                   value="0.02"/>
<param name="kld_z" value="0.99"/>
<param name="update_min_d"              value="0.20"/>
<param name="update_min_a"              value="0.20"/>
<param name="resample_interval"         value="1"/>
<param name="transform_tolerance"       value="0.5"/>
<param name="recovery_alpha_slow"       value="0.00"/>
<param name="recovery_alpha_fast"       value="0.00"/>
<param name="initial_pose_x"            value="$(arg initial_pose_x)"/>
<param name="initial_pose_y"            value="$(arg initial_pose_y)"/>
<param name="initial_pose_a"            value="$(arg initial_pose_a)"/>
<param name="gui_publish_rate"          value="50.0"/>

<remap from="scan"                      to="$(arg scan_topic)"/>
<param name="laser_max_range"           value="3.5"/>
<param name="laser_max_beams"           value="180"/>
<param name="laser_z_hit"               value="0.5"/>
<param name="laser_z_short"             value="0.05"/>
<param name="laser_z_max"               value="0.05"/>
<param name="laser_z_rand"              value="0.5"/>
<param name="laser_sigma_hit"           value="0.2"/>
<param name="laser_lambda_short"        value="0.1"/>
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="laser_model_type"          value="likelihood_field"/>

<param name="odom_model_type"           value="diff"/>
<param name="odom_alpha1"               value="0.1"/>
<param name="odom_alpha2"               value="0.1"/>
<param name="odom_alpha3"               value="0.1"/>
<param name="odom_alpha4"               value="0.1"/>
<param name="odom_frame_id"             value="odom"/>
<param name="base_frame_id"             value="base_footprint"/>
<remap from="scan" to="$(arg scan_topic)"/>

This is my turtlebot3_navigation_path_planning_2.launch file called inside the first launch file

                    <!-- controllare qui se mettere default="odom" oppure default="/odom" -->
<rosparam file="$(find my_move_base_launcher)/params/my_move_base_params.yaml" command="load"/>

<rosparam file="$(find my_move_base_launcher)/params/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" />
<rosparam file="$(find my_move_base_launcher)/params/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" />
<rosparam file="$(find my_move_base_launcher)/params/local_costmap_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find my_move_base_launcher)/params/global_costmap_params.yaml" command="load" ns="global_costmap" unless="$(arg no_static_map)" />

<!-- dwa_local_planner_params.yaml sarebbe il mio my_move_base_params.yaml per cui devo toglierlo -->
<!-- <rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params.yaml" command="load" /> -->
<rosparam file="$(find my_move_base_launcher)/params/costmap_global_laser.yaml" command="load" ns="global_costmap" if="$(arg no_static_map)" />
<param name="global_costmap/width" value="100.0" if="$(arg no_static_map)"/>
<param name="global_costmap/height" value="100.0" if="$(arg no_static_map)"/>

<remap from="cmd_vel" to="$(arg cmd_vel_topic)"/>
<remap from="odom" to="$(arg odom_topic)"/>

Originally posted by kenhero on ROS Answers with karma: 31 on 2018-05-22

Post score: 0

Original comments

Comment by R. Tellez on 2018-05-22:
Just to let you know, as a subscriber of Robot Ignite Academy, you can do the course on programming T3 which explains how to do navigation: http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/mastering-with-ros-turtl

Comment by kenhero on 2018-05-22:
link is corrupted. Btw i just followed the navigation course in the Academy and i just want to simulate path planning with turtlebot3 because it's the robot that i use to program in C++

Comment by R. Tellez on 2018-05-22:
The link was cutted: http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/mastering-with-ros-turtlebot3/


1 Answer 1


Rosanswers logo

Ok I solved. I made several errors : 1)I didn't generate map with gmapping node 2)Error of localization , in the amcl.launch.xml file there were an error about initial pose of turtlebot3 , it was different from the initial coordinates of turtlebot3_house.launch coordinates,so local map wasn't around my turtlebot so 3)I didn't kill gmapping node before start simulation so i wasn't able to see the entire map on rviz

I'm using relaxed A* algorithm to find the best map (plugin found on github) There are 2 issues now,with this algorithm 1)When turtlebot3 is close to goal it starts to call rotate behaviour recovery (basically turtlebot start to rotate in loop) 2)the second issue is that it's not able to find a path in gazebo house world,probably because map is too big. It works only for short distances. It says : " The planner failed to find a path ,choose other goal position" or "Not valid start or goal" "Clearing costap to unstuck robot(0.100000m) "Rotate recovery behavior started" Is there a way to set some parameters or a way to test C++ code? I'd like to discover if this package has some type of limitations, like memory or staff like that Thanks

Originally posted by kenhero with karma: 31 on 2018-05-25

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.