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

How to up speed? (Navigation2)

asked 2021-11-30 04:16:18 -0600

hamada gravatar image

updated 2021-11-30 17:11:57 -0600

miura gravatar image

How to up speed?
OP: Ubuntu 18.04
ROS: Eloquent
branch: eloquent

I am running a robot using navigation2.
When the robot runs in a straight line, the speed does not increase to the maximum speed.
What should I do?
The maximum speed now is 0.6 m/s.
To increase this speed to 1.2m/s, we need to make the following changes

amcl:   ros__parameters:
    use_sim_time: False
    alpha1: 0.1
    alpha2: 0.1
    alpha3: 0.2
    alpha4: 0.1
    alpha5: 0.2
    base_frame_id: "base_footprint"
    beam_skip_distance: 0.5
    beam_skip_error_threshold: 0.9
    beam_skip_threshold: 0.3
    do_beamskip: false
    global_frame_id: "map"
    set_initial_pose: True
    lambda_short: 0.1
    laser_likelihood_max_dist: 2.0
    laser_max_range: 20.0
    laser_min_range: -1.0
    laser_model_type: "likelihood_field"
    max_beams: 200
    max_particles: 2000
    min_particles: 500
    odom_frame_id: "odom"
    scan_topic: scan
    pf_err: 0.05
    pf_z: 0.99
    recovery_alpha_fast: 0.0
    recovery_alpha_slow: 0.0
    resample_interval: 1
    robot_model_type: "differential"
    save_pose_rate: 0.5
    sigma_hit: 0.2
    tf_broadcast: True
    transform_tolerance: 1.0
    update_min_a: 0.2
    update_min_d: 0.25
    z_hit: 0.95
    z_max: 0.05
    z_rand: 0.05
    z_short: 0.05

amcl_map_client:   ros__parameters:
    use_sim_time: False

amcl_rclcpp_node:   ros__parameters:
    use_sim_time: False

bt_navigator:   ros__parameters:
    use_sim_time: False
    bt_xml_filename: "navigate_w_replanning_and_recovery.xml"
    plugin_lib_names:
    - nav2_compute_path_to_pose_action_bt_node
    - nav2_follow_path_action_bt_node
    - nav2_back_up_action_bt_node
    - nav2_spin_action_bt_node
    - nav2_wait_action_bt_node
    - nav2_clear_costmap_service_bt_node
    - nav2_is_stuck_condition_bt_node
    - nav2_goal_reached_condition_bt_node
    - nav2_initial_pose_received_condition_bt_node
    - nav2_reinitialize_global_localization_service_bt_node
    - nav2_rate_controller_bt_node
    - nav2_recovery_node_bt_node
    - nav2_pipeline_sequence_bt_node
    - nav2_round_robin_node_bt_node

bt_navigator_rclcpp_node:   ros__parameters:
    use_sim_time: False

controller_server:   ros__parameters:
    use_sim_time: False
    debug_trajectory_details: True
    min_vel_x: 0.0
    min_vel_y: 0.0
    max_vel_x: 1.1
    max_vel_y: 0.0
    max_vel_theta: 1.0
    min_speed_xy: 0.0
    max_speed_xy: 1.1
    min_speed_theta: 0.0
    min_x_velocity_threshold: 0.001
    # Add high threshold velocity for turtlebot 3 issue.
    # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75
    min_y_velocity_threshold: 0.5
    min_theta_velocity_threshold: 0.001
    acc_lim_x: 2.5
    acc_lim_y: 0.0
    acc_lim_theta: 3.2
    decel_lim_x: -2.5
    decel_lim_y: 0.0
    decel_lim_theta: -3.2
    vx_samples: 100
    vy_samples: 5
    vtheta_samples: 20
    sim_time: 1.8
    linear_granularity: 0.05
    xy_goal_tolerance: 0.25
    transform_tolerance: 0.2
    critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
    BaseObstacle.scale: 0.02
    PathAlign.scale: 0.0
    GoalAlign.scale: 0.0
    PathDist.scale: 32.0
    GoalDist.scale: 24.0
    RotateToGoal.scale: 32.0

controller_server_rclcpp_node:   ros__parameters:
    use_sim_time: False

local_costmap:   local_costmap:
    ros__parameters:
      use_sim_time: False
      global_frame: odom
      plugin_names: ["obstacle_layer", "voxel_layer", "inflation_layer"]
      plugin_types: ["nav2_costmap_2d::ObstacleLayer", "nav2_costmap_2d::VoxelLayer", "nav2_costmap_2d::InflationLayer"]
      rolling_window: true
      width: 3
      height: 3
      resolution: 0.05
      robot_radius: 0.1
      inflation_layer:
        cost_scaling_factor: 3.0
      obstacle_layer:
        enabled: True
        observation_sources: scan
        scan:
          topic: /scan
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "LaserScan"
      voxel_layer:
        enabled: True
        publish_voxel_map: True
        origin_z: 0.0
        z_resolution: 0.2
        z_voxels: 10
        max_obstacle_height: 2.0
        mark_threshold: 0
        observation_sources: pointcloud
        pointcloud:
          topic: /intel_realsense_r200_depth/points
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "PointCloud2"
      static_layer:
        map_subscribe_transient_local: True
      always_send_full_costmap: True   local_costmap_client:
    ros__parameters:
      use_sim_time: False   local_costmap_rclcpp_node:
    ros__parameters:
      use_sim_time: False

global_costmap:   global_costmap:
    ros__parameters:
      use_sim_time: False
      plugin_names: ["static_layer", "obstacle_layer", "voxel_layer", "inflation_layer"]
      plugin_types: ["nav2_costmap_2d::StaticLayer", "nav2_costmap_2d::ObstacleLayer", "nav2_costmap_2d::VoxelLayer", "nav2_costmap_2d::InflationLayer"]
      robot_radius: 0.27
      obstacle_layer:
        enabled: True
        observation_sources: scan
        scan:
          topic: /scan
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "LaserScan"
      voxel_layer:
        enabled: True
        publish_voxel_map: True
        origin_z: 0.0
        z_resolution: 0.2
        z_voxels: 10
        max_obstacle_height: 2.0
        mark_threshold: 0
        observation_sources: pointcloud
        pointcloud:
          topic: /intel_realsense_r200_depth/points
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "PointCloud2"
      static_layer:
        map_subscribe_transient_local ...
(more)
edit retag flag offensive close merge delete

Comments

Can you clarify pls, I am bit confused. After you change max_vel_x: 1.1 still runs at 0.6 m/s? Have you tested the speed with teleop to see the robot achieves desired speed?

osilva gravatar image osilva  ( 2021-11-30 06:50:16 -0600 )edit

I have confirmed that I can get more than 1.0 m/s with teleop.

hamada gravatar image hamada  ( 2021-12-01 00:17:23 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-11-30 07:47:27 -0600

Dragonslayer gravatar image

updated 2021-11-30 07:49:30 -0600

Sound like this

  • 3x3 costmap (from center is 1.5)
  • 1.8 sim_time
  • 0.6 x 1.8 + footprint = indicate to work out to this behavior. Trajectory overshooting costmap size at higher speed.
edit flag offensive delete link more

Comments

I expanded the cost map to 8x8. But the speed did not change. When I shortened the sim_time to 1.0, the speed increased. However, it crashes into walls.

hamada gravatar image hamada  ( 2021-12-01 00:18:50 -0600 )edit

What local planner do you use? Regarding the crashing, that shouldnt have anything to do with the changes. How does it crash, ignoring obstacles, or a lack of deceleration...? Any video, and what does the rviz show?

Dragonslayer gravatar image Dragonslayer  ( 2021-12-01 04:13:56 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-11-30 04:16:18 -0600

Seen: 374 times

Last updated: Nov 30 '21