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

Controller server parameters for an omnidirectional robot

asked 2022-03-10 13:12:54 -0600

Pedro Leal gravatar image

updated 2022-03-10 13:14:18 -0600

Hello,

I have a mecanum robot that's using Nav2. Right now, I'm using 2D Goal Pose to move the robot around the map. I currently have two main problems:

  1. I can't seem to increase the velocity and
  2. It tends to move diagonally (positive x and y and at a 45º angle) whenever there are no objects around.

I've played around with many parameters, from costmap height/width to controller frequency, to max_vel, etc.. but I haven't been able to confidently say something like: Increasing this parameter X resulted in velocity increasing, or something similar (other than costmap size matters to velocity). I've also noticed how some changes that I made to increase the speed have made it less nimble and smart when passing through a "track" full of obstacles that I have.

Things I've already tried: Read Navigation Tuning Guide paper, read several git issues/ros answers (most are due to costmap being small or other stuff that doesn't apply). What's the best course of action, is there a god blessed configuration guide I'm missing, or should I just read in depth about the DWB algorithm and everything will make sense? I'm not looking for a step by step, just point me somewhere!

Here's the config file: context: I'm using a Jetson Xavier NX which might explain why parameters such as controller_frequency might be low. The max/min_vel values may also be wild, that's because I haven't seen any difference after changing them, since it never goes over ~0.4 m/s anyways. My current logic is to have a high max_vel of X compared to Y so it prefers to move forward.

controller_server:
  ros__parameters:
    use_sim_time: False
    controller_frequency: 2.0
    min_x_velocity_threshold: 0.001
    min_y_velocity_threshold: 0.001 
    #0.5
    min_theta_velocity_threshold: 0.001
    failure_tolerance: 0.3
    progress_checker_plugin: "progress_checker"
    goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker"
    controller_plugins: ["FollowPath"]
    # Progress checker parameters
    progress_checker:
      plugin: "nav2_controller::SimpleProgressChecker"
      required_movement_radius: 0.5
      movement_time_allowance: 10.0
    # Goal checker parameters
    #precise_goal_checker:
    #  plugin: "nav2_controller::SimpleGoalChecker"
    #  xy_goal_tolerance: 0.25
    #  yaw_goal_tolerance: 0.25
    #  stateful: True
    general_goal_checker:
      stateful: True
      plugin: "nav2_controller::SimpleGoalChecker"
      xy_goal_tolerance: 0.25
      yaw_goal_tolerance: 0.25
    # DWB parameters
    FollowPath:
      plugin: "nav2_rotation_shim_controller::RotationShimController"
      primary_controller: "dwb_core::DWBLocalPlanner"
      angular_dist_threshold: 0.785
      forward_sampling_distance: 0.5
      rotate_to_heading_angular_vel: 0.8
      max_angular_accel: 1.0
      simulate_ahead_time: 1.0
      debug_trajectory_details: True
      min_vel_x: -1.
      min_vel_y: -0.2
      max_vel_x: 1.5
      max_vel_y: 0.2
      max_vel_theta: 0.4
      min_speed_xy: -1.5
      max_speed_xy: 1.5
      min_speed_theta: -0.4
      # Add high threshold velocity for turtlebot 3 issue.
      # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75
      acc_lim_x: 0.5
      acc_lim_y: 0.5
      acc_lim_theta: 0.2
      decel_lim_x: -0.5
      decel_lim_y: -0.5
      decel_lim_theta: -1.0
      vx_samples: 15
      vy_samples: 15
      vtheta_samples: 20
      sim_time: 3.0 #1.7
      linear_granularity: 0.05
      angular_granularity: 0.025
      transform_tolerance: 0.2
      xy_goal_tolerance: 0.25
      trans_stopped_velocity: 0.25
      short_circuit_trajectory_evaluation: True
      stateful: True
      critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist", "ObstacleFootprintCritic", "Twirling"]
      BaseObstacle.scale: 0.02
      PathAlign.scale: 32.0
      PathAlign.forward_point_distance: 0.1
      GoalAlign.scale: 24.0
      GoalAlign.forward_point_distance: 0.1
      PathDist.scale ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-03-11 12:05:55 -0600

Pedro Leal gravatar image

I changed "shorten_transformed_plan" to false and the velocity increased taking into account max_vel parameters. Also, to prevent the robot from moving diagonally, I've defined max_vel_x the same as max_vel_xy, and reduced max_vel_y to a small value. This means that, when unconstrained, it mostly moves forward (y close to zero) but when there's many obstacles it is still able to benefit from the omnidirectionality to get out of tough spots.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-03-10 13:12:54 -0600

Seen: 683 times

Last updated: Mar 11 '22