Turtlebot path planner fails with added plugin
EDIT: After recent trials, this question which my coworker has posted more fully describes this situation.
Hello,
I am working on navigation with a Turtlebot and have added a costmap layer that adds a lethal obstacle at all points that have been 1 metre in front of the robot. I added the plugin for this layer in the turtlebotnavigation package parameters, such that when AMCL runs, this layer is added to the costmap. I then launch AMCL (`roslaunch turtlebotnavigation amcldemo.launch mapfile:=(path to map)/map.yaml`, and Rviz displays the costmap with the added lethal obstacle. However, when I try to send a 2d nav goal (using either a node or with Rviz), it plans a path but does not execute the path. When I run a node to send a goal, I get "waiting for result" until I cancel it. In Rviz, the path is displayed, but the robot does not move (neither the real robot nor the Rviz robot). How can I successfully send 2d nav goals with this layer added?
The code for the layer I added is from this tutorial.
ROS Hydro, Ubuntu 12.04, Turtlebot 2
Thank you.
costmapcommonparams.yaml:
max_obstacle_height: 0.60 # assume something like an arm is mounted on top of the robot
obstacle_range: 2.5
raytrace_range: 3.0
robot_radius: 0.1875
inflation_radius: 0.50
# voxel map configuration; z-voxels 0 are filled by bumpers and 1 by laser scan (kinect)
map_type: voxel
origin_z: 0.0
z_resolution: 0.2
z_voxels: 2
publish_voxel_map: false
observation_sources: scan bump
scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}
localcostmapparams.yaml:
local_costmap:
global_frame: /map
robot_base_frame: /base_footprint
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 4.0
height: 4.0
resolution: 0.05
transform_tolerance: 0.5
robot_radius: 0.1875
globalcostmapparams.yaml:
global_costmap:
global_frame: /map
robot_base_frame: /base_footprint
update_frequency: 1.0
publish_frequency: 0.5
static_map: true
transform_tolerance: 0.5
robot_radius: 0.1875
movebaseparams.yaml:
shutdown_costmaps: false
controller_frequency: 5.0
controller_patience: 3.0
planner_frequency: 1.0
planner_patience: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2
baselocalplanner_params.yaml:
TrajectoryPlannerROS:
# Robot Configuration Parameters
max_vel_x: 0.3
min_vel_x: 0.1
max_vel_theta: 1.0
min_vel_theta: -1.0
min_in_place_vel_theta: 0.6
acc_lim_x: 0.5
acc_lim_theta: 1.0
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.3
xy_goal_tolerance: 0.15
# Forward Simulation Parameters
sim_time: 3.0
vx_samples: 6
vtheta_samples: 20
# Trajectory Scoring Parameters
meter_scoring: true
pdist_scale: 0.6
gdist_scale: 0.8
occdist_scale: 0.01
heading_lookahead: 0.325
dwa: true
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05
# Differential-drive robot configuration
holonomic_robot: false
max_vel_y: 0.0
min_vel_y: 0.0
acc_lim_y: 0.0
vy_samples: 0
amcl_demo.launch:
<launch>
<include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
<arg name="rgb_processing" value="false" />
<arg name="depth_registration" value="false" />
<arg name="depth_processing" value="false" />
<arg name="scan_topic" value="/scan" />
</include>
<!-- Map server -->
<arg name="map_file" default="$(find turtlebot_navigation)/maps/willow-2010-02-18-0.10.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml">
<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>
<include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml"/>
</launch>
move_base.launch.xml:
<launch>
<include file="$(find turtlebot_navigation)/launch/includes/velocity_smoother.launch.xml"/>
<include file="$(find turtlebot_navigation)/launch/includes/safety_controller.launch.xml"/>
<arg name="odom_topic" default="odom" />
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find turtlebot_navigation)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find turtlebot_navigation)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find turtlebot_navigation)/param/local_costmap_params.yaml" command="load" />
<rosparam file="$(find turtlebot_navigation)/param/global_costmap_params.yaml" command="load" />
<rosparam file="$(find turtlebot_navigation)/param/base_local_planner_params.yaml" command="load" />
<rosparam file="$(find turtlebot_navigation)/param/move_base_params.yaml" command="load" />
<remap from="cmd_vel" to="navigation_velocity_smoother/raw_cmd_vel"/>
<remap from="odom" to="$(arg odom_topic)"/>
</node>
</launch>
amcl.launch.xml:
<launch>
<arg name="use_map_topic" default="false"/>
<arg name="scan_topic" default="scan"/>
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic" value="$(arg use_map_topic)"/>
<!-- Publish scans from best pose at a max of 10 Hz -->
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha5" value="0.1"/>
<param name="gui_publish_rate" value="10.0"/>
<param name="laser_max_beams" value="60"/>
<param name="laser_max_range" value="12.0"/>
<param name="min_particles" value="500"/>
<param name="max_particles" value="2000"/>
<param name="kld_err" value="0.05"/>
<param name="kld_z" value="0.99"/>
<param name="odom_alpha1" value="0.2"/>
<param name="odom_alpha2" value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3" value="0.2"/>
<param name="odom_alpha4" value="0.2"/>
<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_model_type" value="likelihood_field"/>
<!-- <param name="laser_model_type" value="beam"/> -->
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d" value="0.25"/>
<param name="update_min_a" value="0.2"/>
<param name="odom_frame_id" value="odom"/>
<param name="base_frame_id" value="base_footprint"/>
<param name="resample_interval" value="1"/>
<!-- Increase tolerance because the computer can get quite busy -->
<param name="transform_tolerance" value="1.0"/>
<param name="recovery_alpha_slow" value="0.0"/>
<param name="recovery_alpha_fast" value="0.0"/>
<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)"/>
<remap from="scan" to="$(arg scan_topic)"/>
</node>
</launch>
Asked by kmb11 on 2014-04-09 08:52:53 UTC
Comments
I think that your
map_file:=map.yaml
is careless miss. This isn't an true solution. is it? I mean the correct description is for example,map_file:= /tmp/map.yaml
.Asked by Ken_in_JAPAN on 2014-04-09 20:26:12 UTC
Thank you for your reply, but "map.yaml" was just an example, I was using the command with the absolute path to the map.
Asked by kmb11 on 2014-04-10 04:30:27 UTC
I can't tell you a clear answer, because I have not tried the plugin yet. I think you should check a part of "waiting for result" in a source and It is a clue.
Asked by Ken_in_JAPAN on 2014-04-10 05:13:43 UTC
You are working with the costmaps in move_base, right? Could you update your question with all the configuration files (yaml and launch) relating to move_base.
Asked by demmeln on 2014-04-10 23:46:43 UTC
I've added all the files I thought to be relevant, please let me know if there are any others. Also, I have noticed that sometimes the goals work if I reboot the laptop and robot, but not always.
Asked by kmb11 on 2014-04-11 07:00:19 UTC
It is move_base related question. please update the tags. So the navigation and move_base experts can see.
Asked by jihoonl on 2014-04-12 19:26:54 UTC
So do you still want this question answered, or are you pursuing a solution at the other question you linked to?
Asked by demmeln on 2014-04-15 07:24:32 UTC
This question incorrectly models my situation, I will therefore close it.
Asked by kmb11 on 2014-04-15 07:41:13 UTC
shouldn't your local costmap global_frame be "/odom" instead of "/map"?
Asked by dneuhold on 2014-04-15 08:24:12 UTC
^ @dneuhold, the default yaml file seems to have /map as the global frame and things worked fine before with this same yaml file too. https://github.com/turtlebot/turtlebot_apps/blob/hydro/turtlebot_navigation/param/local_costmap_params.yaml
Asked by oswinium on 2014-04-15 09:02:03 UTC