Robotics StackExchange | Archived questions

Long path goals

Hello,

I have a peculiar situation with movebase. I have obtained a map of our lab and I am currently trying to navigate in it. Most of the time, movebase works without problems and short path goals are reached. However I have a peculiar case where I give the robot a goal that is on the other side of a set of obstacles (desks in the middle of the room as you can see from the map). The global path planner plans a perfect path to this goal without any problems, however when the robot attempts to navigate towards it by following this global path, it will simply rotate on its own axis and never attempts to move towards the goal. This is as far as it got towards reaching the goal before it started rotating on its own axis:

Goal not reached

What is weird about this is that if this goal is segmented into two successive and shorter goals, the robot has no problem in navigating towards them and reaches them perfectly as shown below:

Goal reached

Does this have to do with the way that the Trajectory Rollout local planner is forward simulating the possible trajectories? If so, which is the parameter that most probably would need some tuning?

-- UPDATE -- Here's my navigation config:

commoncostmapparams.yaml:

map_type: costmap
transform_tolerance: 0.7
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.5, -0.33], [-0.5, 0.33], [0.5, 0.33], [0.5, -0.33]]

inflation_radius: 0.6

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: laser, 
                    data_type: LaserScan, 
                    topic: /scan, 
                    marking: true, 
                    clearing: true,
                    inf_is_valid: true}

globalcostmapparams.yaml:

global_costmap:
    global_frame: /map
    robot_base_frame: base_link
    update_frequency: 3.0
    publish_frequency: 10.0
    static_map: true
    width: 30.0
    height: 30.0
    resolution: 0.05
    origin_x: 0.0
    origin_y: 0.0

plugins:
  - {name: static,                  type: "costmap_2d::StaticLayer"}
  - {name: inflation,               type: "costmap_2d::InflationLayer"}

localcostmapparams.yaml:

local_costmap:
    global_frame: /odom
    robot_base_frame: base_link
    update_frequency: 3.0
    publish_frequency: 10.0
    static_map: false
    rolling_window: true
    width: 10.0
    height: 10.0
    resolution: 0.05
    origin_x: 0.0
    origin_y: 0.0

plugins:
  - {name: obstacles_laser,           type: "costmap_2d::ObstacleLayer"}
  - {name: inflation,                 type: "costmap_2d::InflationLayer"}

baselocalplanner.yaml:

TrajectoryPlannerROS:
    # Robot Configuration Parameters
    acc_lim_x: 0.2
    acc_lim_y: 0.2
    acc_lim_theta: 0.1
    max_vel_x: 0.7
    min_vel_x: 0.05
    escape_vel: -0.1
    holonomic_robot: true

    # Goal Tolerance Parameters
    xy_goal_tolerance: 0.3
    yaw_goal_tolerance: 0.3
    latch_xy_goal_tolerance: false

    # Forward Simulation Parameters
    sim_time: 2.0
    sim_granularity: 0.025
    vx_samples: 5
    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
    heading_scoring: false
    dwa: false
    global_frame_id: odom

    # Oscillation Prevention Parameters
    oscillation_reset_dist: 0.05

This is the move_base launch file:

<launch>
  <master auto="start"/>

  <arg name="no_static_map" default="false"/>

  <arg name="base_global_planner" default="navfn/NavfnROS"/>
  <!-- <arg name="base_global_planner" default="carrot_planner/CarrotPlanner"/> -->
  <arg name="base_local_planner" default="base_local_planner/TrajectoryPlannerROS"/>
  <!--<arg name="base_local_planner" default="dwa_local_planner/DWAPlannerROS"/> -->

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/costmap_common_params.yaml" command="load" ns="local_costmap" />

    <rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/local_costmap_params.yaml" command="load" />

    <rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/global_costmap_params.yaml" command="load" />

    <rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/base_local_planner_params.yaml" command="load" />

    <param name="base_global_planner" value="$(arg base_global_planner)"/>
    <param name="base_local_planner" value="$(arg base_local_planner)"/>  
    <param name="recovery_behavior_enabled" value="true"/> 
    <param name="recovery_behaviour_enabled" value="true"/> 
    <param name="clearing_rotation_allowed" value="true"/> 
    <param name="controller_frequency" value="3"/> 


    <!-- DWAPlannerROS parameters -->
    <!-- <rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/base_local_planner_params.yaml" command="load" ns="DWAPlannerROS"/> -->
    <!-- <param name="DWAPlannerROS/acc_lim_x" value="0.5"/> -->
    <!-- <param name="DWAPlannerROS/acc_lim_y" value="0.5"/> -->
    <!-- <param name="DWAPlannerROS/acc_lim_th" value="0.35"/> -->
    <!-- <param name="DWAPlannerROS/max_trans_vel" value="0.3"/> -->
    <!-- <param name="DWAPlannerROS/max_vel_x" value="0.3"/> -->
    <!-- <param name="DWAPlannerROS/max_vel_y" value="0.3"/> -->
    <!-- <param name="DWAPlannerROS/min_rot_vel" value="0.3"/> -->
    <!-- <param name="DWAPlannerROS/max_rot_vel" value="0.5"/> -->

    <!-- Remap into namespace for cmd_vel_mux switching -->
    <remap from="cmd_vel" to="/RosAria/cmd_vel" />
  </node>
</launch>

I noticed that when I increased the simtime parameter to a very large value (10.0) while keeping the simgranularity constant at 0.025, I got better performance in that goals that were not reached as explained above, were suddenly reached. Can anyone explain why that happens please?

Thank you very much.

Asked by RND on 2015-06-05 07:00:46 UTC

Comments

In your screenshot of the failed attempt the laserscan topic is showing an error - is it not working even when laserscan ia happy ?

Asked by nickw on 2015-06-05 07:27:52 UTC

The error is due to the fact that i stopped the motor controller "rosaria" so that the robot stops rotating to give me chance to capture the screenshot. Sorry about that. Otherwise I don't get any others from laser, move_base, etc.

Asked by RND on 2015-06-05 07:44:41 UTC

Please post your nav configuration.

Asked by David Lu on 2015-06-07 14:01:33 UTC

@David Lu I have updated my question with the config. I noticed that when I increased the sim_time parameter to a very large value (10.0) while keeping the sim_granularity default, I got better performance in that goals that were not reached as explained above, were suddenly reached. Why is that?

Asked by RND on 2015-06-08 02:46:35 UTC

Do you see better behavior when you use DWAPlannerROS?

Asked by David Lu on 2015-06-09 19:50:47 UTC

No, actually behaviour is much worse with DWAPlannerROS. I find it funny because it's supposed to be more efficient but I cannot get the vehicle to reach certain goals with DWA planner. The parameters I'm setting for it are similar to those of Trajectory Rollout.

Asked by RND on 2015-06-10 03:00:18 UTC

Answers