Tinker-Twins / Husky

ROS Packages for Husky Robot
Other
21 stars 10 forks source link

Move Base Terrain Map Points Which is Behind of Hill #4

Closed kursatkomurcu closed 1 year ago

kursatkomurcu commented 1 year ago

Hello Community,

I am studing autonomous path planning using move_base.launch node and yaml files in this repo. I wrote a slope detector code and coordinate code that takes the gps data from terminal and convert them utm and mappose. The command is here:

rostopic pub --once /move_base_simple/goal_fix sensor_msgs/NavSatFix "header: seq: 0 stamp: {secs: 0, nsecs: 0} frame_id: '' status: {status: 0, service: 0} latitude: 49.900712660524746 longitude: 8.900719770176472 altitude: -1.2020334709814404 position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]"

The problem is the robot goes everywhere in your clearpath_playpen.world and my terrain map. However, When I want to go far points behind the hill, the robot cannot exceed the obstacle and cannot change its path plan. How should I set the parameters? Do you have some suggestions for that problem?

move_base.launch file:

`<?xml version="1.0"?>

`

planner.yaml:

controller_frequency: 5.0 recovery_behaviour_enabled: true

NavfnROS: allow_unknown: true default_tolerance: 0.1

TrajectoryPlannerROS: acc_lim_x: 2.5 acc_lim_theta: 3.2

max_vel_x: 1.0 min_vel_x: -1.0 # default 0.0

max_vel_theta: 1.0 min_vel_theta: -1.0 min_in_place_vel_theta: 0.2

holonomic_robot: false escape_vel: -0.1

yaw_goal_tolerance: 0.1 xy_goal_tolerance: 0.2 latch_xy_goal_tolerance: false

sim_time: 2.0 sim_granularity: 0.02 angular_sim_granularity: 0.02 vx_samples: 6 vtheta_samples: 20 controller_frequency: 20.0

meter_scoring: true occdist_scale: 0.1 pdist_scale: 0.75
gdist_scale: 1.0

heading_lookahead: 0.325
heading_scoring: false
heading_scoring_timestep: 0.8 scoring (double, default: 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: acc_lim_x: 2.5 acc_lim_y: 0 acc_lim_th: 3.2

max_vel_x: 1.0 min_vel_x: -0.5 max_vel_y: 0 min_vel_y: 0

max_trans_vel: 2.0 min_trans_vel: 0.1 max_rot_vel: 1.0 min_rot_vel: 0.2

yaw_goal_tolerance: 0.1 xy_goal_tolerance: 0.2 latch_xy_goal_tolerance: false

costmap_common.yaml:

footprint: [[-0.5, -0.33], [-0.5, 0.33], [0.5, 0.33], [0.5, -0.33]] footprint_padding: 0.01

robot_base_frame: base_link update_frequency: 4.0 publish_frequency: 3.0 transform_tolerance: 3.0

resolution: 0.05

obstacle_range: 5.5 raytrace_range: 6.0

origin_x: -10.0 origin_y: -10.0 width: 800.0 height: 800.0

layer definitions

static: map_topic: /occupancy_grid subscribe_to_updates: true

inflation: inflation_radius: 1.0

costmap_local.yaml:

global_frame: map rolling_window: true

plugins:

costmap_slope_static.yaml:

global_frame: map rolling_window: true track_unknown_space: true map_topic: /occupancy_grid

origin_x: 0.0 origin_y: 0.0 width: 20.0 height: 20.0

plugins:

Tinker-Twins commented 1 year ago

Could you please specify what exactly do you mean by "hill" in the clearpath_playpen.world? A potential resolution if the robot is unable to negotiate any obstacle(s) would be to manually Move the robot beyond the obstacle(s) using Gazebo Simulator GUI and then test the algorithm.

kursatkomurcu commented 1 year ago

I mean the move_base algorithm runs well in clearpath_playpen.world. I have other terrain map that contain hills. The algorithm overcomes obstacles in clearpath_playpen.world, but when it detects the hill as an obstacle in other map, it stops instead of going around it. image image

Tinker-Twins commented 1 year ago

From the image above, it seems that the real culprit is your map, and not the environment or the navigation stack. The problem is that the planner cannot plan a feasible path (which makes the robot stop) since the entire top side of the map is obstructed (black color) while the explored and traversable portion (light grey) is not really good enough (most of the area seems unexplored - in dark grey color, which will not be used by the planner to plan trajectories).

In order for the robot to be able to go around the obstacles/hills (as you desire), you would need to carefully map out the environment such that the hills are obstacles (black color) and the valleys are safely traversable zones (light grey color). Once that is in place, the planner should be able to plan trajectories that avoid the hills (obstacles) and go through the valleys (explored and traversable portions).

kursatkomurcu commented 1 year ago

I set unknown areas (light grey) as white and increased the neighbors parameter of SOR filter. Now, the robot can travel to behind the hill. Also, I made the bigger occupancy grid and put the robot to center to the occ grid. Thanks

Tinker-Twins commented 1 year ago

That's great! Glad it all worked out!