Ask Your Question
0

Navigation ignores obstacles

asked 2011-08-29 01:54:05 -0500

svenr gravatar image

hi,

I am trying to run a navigation-stack on my robot.I am currently using a hokuyo laser scanner to generate a map. i have ROS running on a laptop on the robot mainly for data acquisition, i also have a desktop pc with ROS for running most of the nodes.

At the moment i am able to make a map of the environment.I also can send my robot nav-goals. The only problem i am facing right now is that when the robot is moving toward its goal, it ignores all objects that are not on the static map. I think something is wrong with my costmap parameters. because if i set static_map to true the costmap_2d node dies with:

terminate called after throwing an instance of 'std::bad_alloc' what():  std::bad_alloc

nodes that are running:

costmap_node (costmap_2d/costmap_2d_node)
map_server (map_server/map_server)
amcl (amcl/amcl)
move_base (move_base/move_base)
move_platform (rosbee_control/move_platform)
tfbroadcaster (rosbee_tf/tfBroadcaster)
hokuyo_node (hokuyo_node/hokuyo_node)
openni_node1 (openni_camera/openni_node)
kinect_base_link (tf/static_transform_publisher)
kinect_base_link1 (tf/static_transform_publisher)
kinect_base_link2 (tf/static_transform_publisher)
kinect_base_link3 (tf/static_transform_publisher)
openni_manager (nodelet/nodelet)
pointcloud_throttle (nodelet/nodelet)
kinect_laser (nodelet/nodelet)

parameters (yaml files):

global_frame: /map
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0

#set to true if you want to initialize the costmap from a static map
static_map: true

transform_tolerance: 0.3
obstacle_range: 2.5
max_obstacle_height: 2.0
raytrace_range: 3.0
robot_radius: 0.31
footprint_padding: 0.01
inflation_radius: 0.75
cost_scaling_factor: 10.0
lethal_cost_threshold: 100
observation_sources: scan 

scan: {data_type: LaserScan, expected_update_rate: 0.4,
  observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}
map_type: "costmap"

 TrajectoryPlannerROS:
  max_vel_x: 2.0
  min_vel_x: 2.0
  max_rotational_vel: 2.0
  min_in_place_rotational_vel: 2.0
  xy_goal_tolerance: 0.3
  yaw_goal_tolerance: 0.2
  acc_lim_th: 1.0
  acc_lim_x: 1.0
  acc_lim_y: 1.0
  controller_frequency: 5.0
  holonomic_robot: false
  escape_vel: -1.0
  path_distance_bias: 1.0

launch files i am using:

Desktop PC:

<launch>
<!-- set a default value for the map -->
<arg name="map" default="/home/mechatronica/rosbee/bagfiles/Fontyslaser.yaml" />

<!-- load the parameters for the navigation stack/costmap -->
<node name="costmap_node" pkg="costmap_2d" type="costmap_2d_node" >
    <rosparam file="$(find rosbee_param)/config/costmap.yaml" command="load" ns="costmap" />
    <param name="/use_sim_time" value="false"/>
  </node>

<!-- start the map_server with the map parameter -->
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map)" />

<!-- launch amcl for differential drive robots -->
<include file="$(find amcl)/examples/amcl_diff.launch" />

<node name="move_base" pkg="move_base" type="move_base" >
  <rosparam file="$(find rosbee_param)/config/base_local_planner_params.yaml" command="load"  />
</node>

<!-- start rviz -->
<node name="rviz" pkg="rviz" type="rviz" args="-d /home/mechatronica/rosbee/bagfiles/rosbee_config.vcg" />

</launch>

Robot:

 <launch>
    <!-- start the platform and tfbroadcaster -->
    <node name="move_platform" pkg="rosbee_control" type="move_platform" respawn="true" />
    <node name="tfbroadcaster" pkg="rosbee_tf" type="tfBroadcaster"/>

    <!-- start the laser -->    
    <node name="hokuyo_node" pkg="hokuyo_node" type="hokuyo_node" />

    <!-- start the kinect -->
    <include file="$(find pointcloud_to_laserscan)/launch/kinext_laser_2.launch" />
</launch>
edit retag flag offensive close merge delete

Comments

If you solved your problem, do you know how I can on purpose have the robot ignore the obstacles with the navigation stack ? I'm using a turtlebot and I've built an obstacle avoidance algorithm, so I would like the robot to use my strategy, not the default one.

Yannis gravatar imageYannis ( 2012-06-07 18:29:37 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-09-02 03:58:45 -0500

DimitriProsser gravatar image

I believe that your problem is that you're not specifying the correct namespaces for your parameters. TrajectoryPlannerROS will be in the correct namespace, but your costmaps have no idea where to look for their parameters.

The local planner is typically sourced with the rolling_window parameter set to true, and the global planner's is static. Additionally, it might be wise to specify the sensor frame of your laser scanner so that the robot can do the necessary transforms for the incoming data.

I would suggest looking at an example such as the erratic robot to get an idea of how to set it up more clearly. That way, you can be sure all of the parameters are specified and in the correct namespaces.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-08-29 01:54:05 -0500

Seen: 1,800 times

Last updated: Sep 02 '11