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

Robot doesn't Follow its path and particle cloud spreads out

asked 2016-02-20 14:17:31 -0500

maciejm gravatar image

updated 2016-02-21 09:15:40 -0500

Hi Everyone,

Has anyone had an experience with the robot following the path and going off it from time to time? It causes my robot to run into the walls and Im struggling with finding the solution to this problem. I should also mention that the robot doesn't see the obstacles and I don't know how to go out this.

Kind regards, Maciej

With the reply to the comment I am posting all my config files below, if code is needed, this will be provided too.

Launch file:


 <node pkg="amcl" type="amcl" name="amcl" output="screen">

  <param name="base_frame" value = "base_link"/>
  <param name="fixed_frame" value = "map"/>
  <param name="use_cloud_input" value="true"/>
  <param name="use_laser_input" value="true"/>
  <param name="publish_tf" value="true"/>
  <param name="publish_odom" value="true"/>
  <param name="use_odom" value="false"/>
  <param name="use_imu" value="false"/>
  <param name="use_alpha_beta" value="true"/>
  <param name="max_iterations" value="10"/>


<node name="map_server" pkg="map_server" type="map_server" args="/home/maciejm/catkin_ws/src/map1.yaml"/>

  <node pkg="my_sensor" type="my_sensor" name="my_sensor" output="screen">
    <param name="sensor_param" value="param_value" />

  <node pkg="my_sensor" type="laser_cloud" name="laser_cloud" output="screen">
    <param name="sensor_param" value="param_value" />

  <node pkg="robot_setup_tf" type="my_odom" name="my_odom" output="screen">
    <param name="odom_param" value="param_value" />

  <node pkg="robot_setup_tf" type="tf_broadcaster" name="broadcaster" output="screen">
    <param name="broadcaster" value="param_value" />

  <node pkg="robot_setup_tf" type="tf_listener" name="listener" output="screen">
    <param name="listener" value="param_value" />

<node pkg="robot_setup_tf" type="pose_publisher" name="pose_publisher" output="screen">
    <param name="pose_publisher" value="param_value" />
<node pkg="robot_setup_tf" type="base_controller" name="base_controller" output="screen">
    <param name="base_controller" value="param_value" />

  <node type="laser_scan_assembler" pkg="laser_assembler" name="my_assembler">
    <remap from="scan" to="tilt_scan"/>
    <param name="max_scans" type="int" value="400" />
    <param name="fixed_frame" type="string" value="base_link" />

  <node type="point_cloud_assembler" pkg="laser_assembler" name="my_assembler2">
    <remap from="cloud" to="my_cloud_in"/>
    <param name="max_clouds" type="int" value="400" />
    <param name="fixed_frame" type="string" value="base_link" />

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/base_local_planner_params.yaml" command="load" />


<node pkg="rviz" type="rviz" name="rviz" output="screen">
    <param name="rviz" value="param_value" />


Base local planner:

  max_vel_x: 0.25
  min_vel_x: 0.1
  max_vel_theta: 1.0
  min_in_place_vel_theta: 0.4

  acc_lim_theta: 10.0
  acc_lim_x: 10.0
  acc_lim_y: 10.0

  holonomic_robot: false
  meter_scoring: true

Global costmap:

  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true

Local costmap:

  global_frame: /odom
  robot_base_frame: /base_link
  update_frequency: 5.0
  publish_frequency: 5.0
  static_map: true
  rolling_window: true
  /*width: 6.0
  /*height: 6.0
  resolution: 0.05
  obstacles: 5.0

Costmap common:

obstacle_range: 1.5
raytrace_range: 1.5
#robot_radius: 0.1
inflation_radius: 0.5
transform_tolerance: 0.3
footprint: [ [0.25, 0.25], [-0.25, 0.25],[-0.25, -0.25], [0.25, -0.25 ...
edit retag flag offensive close merge delete



You should provide more information like packages, launch files, configuration files, parameters you use, and any console outputs (warnings, errors, etc), and screenshots if applicable.

Akif gravatar image Akif  ( 2016-02-21 04:32:40 -0500 )edit

Here you go Akif, I hope this helps!!!

maciejm gravatar image maciejm  ( 2016-02-21 09:04:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-21 09:51:19 -0500

Akif gravatar image

At first, it seems like you have a problem with observation sources configuration;

observation_sources: my_sensor laser_cloud

laser_scan_sensor: {sensor_frame: my_sensor, data_type: LaserScan, topic: scan, marking: true, clearing: true}

point_cloud_sensor: {sensor_frame: laser_cloud, data_type: PointCloud, topic: topic_name, marking: true, clearing: true}

You define your sources as my_sensor and laser_cloud but you name them as laser_scan_sensor and point_cloud_sensor . Therefore try changing to this;

observation_sources: laser_scan_sensor point_cloud_sensor

laser_scan_sensor: {sensor_frame: my_sensor, data_type: LaserScan, topic: scan, marking: true, clearing: true}

point_cloud_sensor: {sensor_frame: laser_cloud, data_type: PointCloud, topic: topic_name, marking: true, clearing: true}
edit flag offensive delete link more


I corrected it but the problem still persists... the local map doesn't update and sometimes flickers should I attach laser scanner and cloud code? is there any way to not use them and still get localisation?

maciejm gravatar image maciejm  ( 2016-02-21 09:56:43 -0500 )edit

Question Tools

1 follower


Asked: 2016-02-20 14:17:31 -0500

Seen: 349 times

Last updated: Feb 21 '16