Robotics StackExchange | Archived questions

Navigation can't reach max speed

First of all I'm going to let you guys know I'm new to ROS and gazebo. And I have been playing around with it for a few weeks now doing tutorials and my own experiments. And I finally have a working robot, except...

My problem is that I haven't found any proper way to raise the maximum speed of my robot when it is using move base navigation. If I manually control the robot I can make it go according to whatever speed I want, but when I issue it a location to go to in RViz I can't get it to go over 4 m/s. And I have raised all the velocity, acceleration limits that I could find (planner, control config) to ridiculous values all together and one by one in order to try to get it to go beyond the 4 m/s with navigation. I have also tweaked the simtime, vxsample, pdistscale and gdistscale values around to no avail.

My robot has 3 wheels, so it's using differential drive and the third wheel is just a free moving caster wheel. And I'm using Ubuntu 14.04 with ros Indigo. For the planner I'm currently using the DWA planner and I have tried to use the trajectory one as well. My main reference besides the tutorials for the robot has been Husky.

Here is my control.yaml:

 testi:
    joint_state_controller:
        type: "joint_state_controller/JointStateController"
        publish_rate: 50

    gmi_drive:
      type: "diff_drive_controller/DiffDriveController"
      publish_rate: 50

      left_wheel: 'base_to_WheelL'
      right_wheel: 'base_to_WheelR'

      wheel_separation: 0.9
      wheel_radius: 0.26

      enable_odom_tf: false

      pose_covariance_diagonal: [0.001, 0.001, 1.0, 1.0, 1.0, 1.0]
      twist_covariance_diagonal: [0.001, 0.001, 1.0, 1.0, 1.0, 1.0]

      base_frame_id: base_link

      linear:
        x:
          has_velocity_limits    : true
          max_velocity           : 75.0   # m/s
          has_acceleration_limits: true
          max_acceleration       : 5.0   # m/s^2
      angular:
        z:
          has_velocity_limits    : true
          max_velocity           : 5.0   # rad/s
          has_acceleration_limits: true
          max_acceleration       : 1.5   # rad/s^2

And here is my planner.yaml:

controller_frequency: 5.0
recovery_behaviour_enabled: true

NavfnROS:
  default_tolerance: 0.1 

TrajectoryPlannerROS:
  # Robot Configuration Parameters
  acc_lim_x: 25.0
  acc_lim_theta:  32.0

  max_vel_x: 55.0
  min_vel_x: 0.0

  max_vel_theta: 10.0
  min_vel_theta: -10.0
  min_in_place_vel_theta: 0.2

  holonomic_robot: false
  escape_vel: -0.5

  yaw_goal_tolerance: 6.0
  xy_goal_tolerance: 0.8
  latch_xy_goal_tolerance: false

  # Forward Simulation Parameters
  sim_time: 4.0
  sim_granularity: 0.02
  angular_sim_granularity: 0.02
  vx_samples: 10
  vtheta_samples: 20
  controller_frequency: 20.0

  # Trajectory scoring parameters
  meter_scoring: true 
  occdist_scale:  0.1  
  pdist_scale: 0.8
  gdist_scale: 1.0

  heading_lookahead: 0.325  
  heading_scoring: false  
  heading_scoring_timestep: 0.8   
  dwa: true 
  simple_attractor: false
  publish_cost_grid_pc: true  

  oscillation_reset_dist: 0.25 
  escape_reset_dist: 0.1
  escape_reset_theta: 0.1

DWAPlannerROS:

  # Robot configuration parameters  
  acc_lim_x: 25.0
  acc_lim_y: 2.5
  acc_lim_th: 32.0

  max_vel_x: 55.0 
  min_vel_x: 0.1 
  max_vel_y: 0.0
  min_vel_y: -0.0

  max_trans_vel: 75.0
  min_trans_vel: 0.1 
  max_rot_vel: 5.0
  min_rot_vel: 0.4 

  # Goal Tolerance Parameters
  yaw_goal_tolerance: 6.0
  xy_goal_tolerance: 0.8
  latch_xy_goal_tolerance: false

All help is much appriciated

I also have no idea why the code blocks aren't working correctly.

Asked by enricot on 2017-07-25 02:16:16 UTC

Comments

I also have no idea why the code blocks aren't working correctly

because we don't use <code></code> for them, but indentation.

Just select whatever should be formatted as code and click the Preformatted Text button (the one with 101010 on it).

Asked by gvdhoorn on 2017-07-25 09:06:18 UTC

Have you solve this problem? I met the same problem like you. My robot navigation only output the 0.1m/s even if I set the max speed to 5 m/s.

Asked by Dragon on 2017-07-25 22:19:41 UTC

Nope, I have yet to solve this issue.

Asked by enricot on 2017-08-03 02:59:55 UTC

I found that the navigation stack need the current speed info of robot. So we should publish the Twist data to special topic to ensure that the navigation stack can solve the plan. So my solution for question is publish the twist to topic.

Asked by Dragon on 2017-08-03 03:08:05 UTC

Answers

dwa planner subscribes the odom for sampling the current running velocity, if user failed to offer the correct topic of odom it would use zero as the current. Then this zero current is used to initializes the velocity limits as "min(velocity limit, 0 * acc_lim * duration of controller)" for the logic of finding the best trajectory. Under this case, taking the max_vel_x as an example: the max_vel_x would be 0.25 if acc_lim_x is set as 2.5 and controller frequency is 10Hz

so please check if your dwa yaml file has parameter "odom_topic" and it meets the topic of published one

For example:

DWAPlannerROS:
  odom_topic: /NaviBOT/controller/base_controller/odom
  ...

Asked by Xinjue on 2023-03-13 08:10:05 UTC

Comments