ros-planning / navigation

ROS Navigation stack. Code for finding where the robot is and how it can get somewhere else.
2.31k stars 1.79k forks source link

Global and local costmaps #1222

Closed federista closed 1 year ago

federista commented 1 year ago

I am working on a bunker robot from Agilex. Below are my localization parameters. I have mapped the environment using Hector_slam package. I am working in outdoor environment and using Rplidar for scanning.

Base_local_planner_params.yaml

TrajectoryPlannerROS: max_vel_x: 1.12 min_vel_x: 1.11 max_vel_theta: 0.05 min_vel_theta: -0.05 min_in_place_vel_theta: 0.05

acc_lim_theta: 0.07 acc_lim_x: 0.25 acc_lim_Y: 0.25

holonomic_robot: false

meter_scoring: true

xy_goal_tolerance: 0.15 yaw_goal_tolerance: 0.25

Costmap_common_params.yaml

obstacle_range: 3.0 raytrace_range: 3.5 publish frequency: 2.0

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 transform_tolerance: 0.5

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

Global_costmap_params.yaml

global_costmap: global_frame: odom robot_base_frame: base_link update_frequency: 0.5 static_map: true

Local_costmap_params.yaml

local_costmap: global_frame: odom robot_base_frame: base_link update_frequency: 2.0 publish_frequency: 2.0 rolling_window: true width: 5.0 height: 5.0 resolution: 0.05

Move_base_params.yaml

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

Questions: 1) Robot only moves in a circle and is unable to decide the path where to go, as the path to the goal also changes very frequently Error: [ WARN] [1667220609.416243921]: Rotate recovery behavior started. 2) Is it a good idea to set the global frame to Odom instead of the map as I receive the following error too [ERROR] [1667220589.016412417]: The goal pose passed to this planner must be in the Odom frame. It is instead in the map frame. 3) As soon as the robot starts spinning(after i send the 2d nav goal), the map doesn't remain stationary and it weirdly moves all around the viz

Kindly guide me on where I am coming short of achieving this autonomous driving of a robot using a navigation stack Below I am attaching the rviz window Screenshot from 2022-10-31 14-13-19

mikeferguson commented 1 year ago

This looks to be a configuration error - please try posting to answers.ros.org - there is a much larger community of folks there to respond