grayson-arendt / Lunabotics-2025

Official repository for the College of DuPage 2024-2025 NASA Lunabotics competition.
MIT License
5 stars 1 forks source link

Controller server randomly aborts handle while using DWB #15

Closed grayson-arendt closed 1 week ago

grayson-arendt commented 1 week ago

Sometimes while navigating, the robot will stop moving and the controller_server node will give the error: [WARN] [1728501527.163380633] [controller_server]: [follow_path] [ActionServer] Aborting handle. This issue with Navigation2 has been documented here, however, the CPU I have been testing on is relatively powerful (AMD® Ryzen 7 7435hs with 16 threads) so it should be able to handle Gazebo and Navigation2 at the same time.

grayson-arendt commented 1 week ago

Current parameters for the controller_server that are leading to this issue:

controller_server:
  ros__parameters:
    use_sim_time: true
    message_queue_size: 100
    controller_frequency: 20.0
    min_x_velocity_threshold: -0.3
    min_y_velocity_threshold: 0.5
    min_theta_velocity_threshold: 0.1
    failure_tolerance: 0.3
    progress_checker_plugin: "progress_checker"
    goal_checker_plugins: ["general_goal_checker"]
    controller_plugins: ["FollowPath"]
    progress_checker:
      plugin: "nav2_controller::SimpleProgressChecker"
      required_movement_radius: 0.1
      movement_time_allowance: 30.0
    general_goal_checker:
      stateful: true
      plugin: "nav2_controller::SimpleGoalChecker"
      xy_goal_tolerance: 0.5
      yaw_goal_tolerance: 0.7
    FollowPath:
      plugin: "dwb_core::DWBLocalPlanner"
      debug_trajectory_details: true
      prune_plan: true
      min_vel_x: -0.35
      min_vel_y: 0.0
      max_vel_x: 0.35
      max_vel_y: 0.0
      max_vel_theta: 0.35
      min_speed_xy: 0.0
      max_speed_xy: 0.1
      min_speed_theta: 0.1
      acc_lim_x: 1.0
      acc_lim_y: 0.0
      acc_lim_theta: 1.5
      decel_lim_x: -1.0
      decel_lim_y: 0.0
      decel_lim_theta: -1.5
      vx_samples: 10
      vy_samples: 10
      vtheta_samples: 20
      sim_time: 2.0
      linear_granularity: 0.05
      angular_granularity: 0.025
      transform_tolerance: 1.0
      xy_goal_tolerance: 0.25
      trans_stopped_velocity: 0.25
      short_circuit_trajectory_evaluation: true
      limit_vel_cmd_in_traj: true
      stateful: true
      critics: ["RotateToGoal", "Oscillation", "ObstacleFootprint", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
      Oscillation.scale: 5.0
      Oscillation.reset_dist: 0.2
      ObstacleFootprint.scale: 2.0
      PathAlign.scale: 32.0
      GoalAlign.scale: 24.0
      PathDist.scale: 64.0
      RotateToGoal.scale: 1.0
      RotateToGoal.slowing_factor: 1.0
      RotateToGoal.lookahead_time: 1.0
grayson-arendt commented 1 week ago

Figured out the issue, it was aborting handle due to not seeing any progress. I set a large value for progress_checker to prevent this from happening.

    progress_checker:
      plugin: "nav2_controller::SimpleProgressChecker"
      required_movement_radius: 0.1
      movement_time_allowance: 120.0