Robot not navigating well

asked 2021-11-17 02:23:28 -0500

sidharth.jeyabal gravatar image

updated 2021-11-17 08:43:30 -0500

I'm working on running a navigation robot from scratch so far I was able to do produce the map of the environment and load it to the map server and localise the robot. But now when I set the navigation goal for the robot it seems to wander here and there instead of reaching goal.

I use ROS kinetic in Ubuntu 16.4

Below is the link to video on how robot is behaving VIDEO

local_costmap_param

local_costmap:
  global_frame: odom
  robot_base_frame: base_link

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5  

  static_map: false  
  rolling_window: true
  width: 3
  height: 3
  resolution: 0.05

global_costmap_param

global_costmap:
  global_frame: map
  robot_base_frame: base_link

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5

  static_map: true

costmap_common_param

obstacle_range: 3.0
raytrace_range: 3.5

footprint: [[-0.105, -0.105], [-0.105, 0.105], [0.041, 0.105], [0.041, -0.105]]
#robot_radius: 0.105

inflation_radius: 1.0
cost_scaling_factor: 3.0

map_type: costmap
observation_sources: scan
scan: {sensor_frame: hokuyo_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}

base_local_planner_param

TrajectoryPlannerROS:

# Robot Configuration Parameters
  max_vel_x: 0.18
  min_vel_x: 0.08

  max_vel_theta:  1.0
  min_vel_theta: -1.0
  min_in_place_vel_theta: 1.0

  acc_lim_x: 1.0
  acc_lim_y: 0.0
  acc_lim_theta: 0.6

# Goal Tolerance Parameters
  xy_goal_tolerance: 0.10
  yaw_goal_tolerance: 0.05

# Differential-drive robot configuration
  holonomic_robot: false

# Forward Simulation Parameters
  sim_time: 0.8
  vx_samples: 18
  vtheta_samples: 20
  sim_granularity: 0.05

dwa_local_planner_param

DWAPlannerROS:

# Robot Configuration Parameters
  max_vel_x: 0.22
  min_vel_x: -0.22

  max_vel_y: 0.0
  min_vel_y: 0.0

# The velocity when robot is moving in a straight line
  max_vel_trans:  0.22
  min_vel_trans:  0.11

  max_vel_theta: 2.75
  min_vel_theta: 1.37

  acc_lim_x: 2.5
  acc_lim_y: 0.0
  acc_lim_theta: 3.2 

# Goal Tolerance Parametes
  xy_goal_tolerance: 0.05
  yaw_goal_tolerance: 0.17
  latch_xy_goal_tolerance: false

# Forward Simulation Parameters
  sim_time: 1.5
  vx_samples: 20
  vy_samples: 0
  vth_samples: 40
  controller_frequency: 10.0

# Trajectory Scoring Parameters
  path_distance_bias: 32.0
  goal_distance_bias: 20.0
  occdist_scale: 0.02
  forward_point_distance: 0.325
  stop_time_buffer: 0.2
  scaling_speed: 0.25
  max_scaling_factor: 0.2

# Oscillation Prevention Parameters
  oscillation_reset_dist: 0.05

# Debugging
  publish_traj_pc : true
  publish_cost_grid_pc: true

move_base_param

shutdown_costmaps: false
controller_frequency: 10.0
planner_patience: 5.0
controller_patience: 15.0
conservative_reset_dist: 3.0
planner_frequency: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2

amcl

<launch>
  <!-- Arguments -->
  <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"/>

  <!-- AMCL -->
  <node pkg="amcl" type="amcl" name="amcl">

    <param name="min_particles"             value="500"/>
    <param name="max_particles"             value="3000"/>
    <param name="kld_err"                   value="0.02"/>
    <param name="update_min_d"              value="0.20"/>
    <param name="update_min_a"              value="0.20"/>
    <param name="resample_interval"         value="1"/>
    <param name="transform_tolerance"       value="0.5"/>
    <param name="recovery_alpha_slow"       value="0.00"/>
    <param name="recovery_alpha_fast"       value="0.00"/>
    <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)"/>
    <param name="gui_publish_rate"          value="50.0"/>

    <remap from="scan"                      to="$(arg scan_topic)"/>
    <param name="laser_max_range"           value="3.5 ...
(more)
edit retag flag offensive close merge delete

Comments

Can you pls add the navigation parameters not as a link but in the question itself. Links change over time. Also for the video perhaps convert to gif file so it can be uploaded as well, you have enough points. It’s also important to state what you tried so far

Take a look at Support Guidelines

osilva gravatar image osilva  ( 2021-11-17 06:21:02 -0500 )edit

@osilva I did as per the guidelines. I tried uploading the gif file but for some reasons its not uploading

sidharth.jeyabal gravatar image sidharth.jeyabal  ( 2021-11-17 08:45:36 -0500 )edit

thank you @sidharth.jeyabal for updating the question. Please start with this link for Navigation Guide: https://kaiyuzheng.me/documents/navgu.... It's useful to know what parameters you have tried already and the ranges. The guide will help you to do it systematically.

And a link to dwa_plannerwiki to see what each parameter does: http://wiki.ros.org/dwa_local_planner

osilva gravatar image osilva  ( 2021-11-17 11:21:43 -0500 )edit

Suggest to look at your goal tolerances, perhaps is too tight. I observed that the robot is trying to reach destination but might not find a successful path so it tries to do this big loop but then it runs into an obstacle.

osilva gravatar image osilva  ( 2021-11-17 11:26:57 -0500 )edit