ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

svenr's profile - activity

2012-08-30 17:57:45 -0500 received badge  Famous Question (source)
2012-08-14 03:50:34 -0500 received badge  Notable Question (source)
2012-04-12 12:35:59 -0500 received badge  Popular Question (source)
2011-08-29 01:54:05 -0500 asked a question Navigation ignores obstacles

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>