Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Tune move_base.launch params for successful sim run.
Browse files Browse the repository at this point in the history
The param files associated with move_base.launch were modified to (mostly) match teb_local_planner_tutorials' param files as the simulated kart needed to 'fit' on the simulation track we took from teb_local_planner_tutorials. Create Issue #19 for determine a way to modify the params to meet our karts physical params while also maintaining our ability to test in simulation.
  • Loading branch information
zghera committed Apr 6, 2021
1 parent 48a152b commit ebd2377
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 51 deletions.
27 changes: 0 additions & 27 deletions src/kart_2dnav/launch/sim_autocross_track.launch
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,7 @@
<!-- ROS NAVIGATION STACK -->
<!-- Configure and run move_base to set up the ROS Navigation Stack. -->
<!-- More details on inputs/outputs can be found in move_base.launch -->
<!--
<include file="$(find kart_2dnav)/launch/move_base.launch" />
-->
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/costmap_common_params.yaml"
command="load" ns="global_costmap" />
<!-- Modified teb_local_planner_tutorials version to set laserscan input
to move_base come from top/scan -->
<rosparam file="$(find kart_2dnav)/params/sim_params/costmap_common_params.yaml"
command="load" ns="local_costmap" />
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/local_costmap_params.yaml"
command="load" />
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/global_costmap_params.yaml"
command="load" />
<rosparam
file="$(find teb_local_planner_tutorials)/cfg/carlike/teb_local_planner_params.yaml"
command="load" />
<param name="base_global_planner" value="global_planner/GlobalPlanner" />
<param name="planner_frequency" value="1.0" />
<param name="planner_patience" value="5.0" />

<param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />
<param name="controller_frequency" value="5.0" />
<param name="controller_patience" value="15.0" />
<!-- Our carlike robot is not able to rotate in place -->
<param name="clearing_rotation_allowed" value="false" />
</node>


<!-- MICROCONTROLLER COMM -->
<!-- Run the communication script to enable and start communicating with the
Expand Down
24 changes: 14 additions & 10 deletions src/kart_2dnav/params/costmap_common_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@
# See http://wiki.ros.org/costmap_2d for details.

# TODO(Issue #8): Correct this values for our kart's specific physical attr/sensors.
footprint: [ [0.7112, 0.4064], [0.7112, -1.524], [-0.7112, -1.524], [-0.7112, 0.4064] ]
# robot footprint in meters
# 1. (maybe) footprint of our go-kart
# footprint: [ [0.7112, 0.4064], [0.7112, -1.524], [-0.7112, -1.524], [-0.7112, 0.4064] ]
# 2. footprint used by teb_local_planner tutorials. Use this for simulation as of now
footprint: [ [-0.1,-0.125], [0.5,-0.125], [0.5,0.125], [-0.1,0.125] ]

transform_tolerance: 0.2
map_type: costmap

obstacle_layer:
enabled: true
# TODO(Issue #8): Correct this values for our kart's specific physical attr/sensors.
obstacle_range: 2.5
# TODO(Issue #8): Correct this values for our kart's specific physical attr/sensors.
max_obstacle_height: 2.0
obstacle_range: 3.0
# TODO(Issue #8): Will likely change in tandem with obstacle_range above.
raytrace_range: 3.0
inflation_radius: 0.5
raytrace_range: 3.5
# TODO(Issue #8): Correct this values for our kart's specific physical attr/sensors.
max_obstacle_height: 2.0
min_obstacle_height: 0.0
# ------------------------
inflation_radius: 0.2
track_unknown_space: false
combination_method: 1
observation_sources: laser_scan_sensor point_cloud_sensor
Expand All @@ -26,10 +32,8 @@ obstacle_layer:

inflation_layer:
enabled: true
cost_scaling_factor: 10.0 # exponential rate at which the obstacle
# cost drops off [default]
inflation_radius: 0.5 # max distance from an obstacle at which costs
# are incurred for planning paths [default]
cost_scaling_factor: 10.0
inflation_radius: 0.5

static_layer:
enabled: true
Expand Down
7 changes: 4 additions & 3 deletions src/kart_2dnav/params/global_costmap_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ global_costmap:
global_frame: "map"
robot_base_frame: "base_link"
update_frequency: 5.0
public_frequency: 2.5
static_map: false
public_frequency: 0.5 # match teb_local_planner_tutorials
static_map: false # we are not using a map server / existing map

transform_tolerance: 0.5
transform_tolerance: 0.2
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}

7 changes: 3 additions & 4 deletions src/kart_2dnav/params/local_costmap_params.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# All parameters are set to default values unless otherwise noted.
# See http://wiki.ros.org/costmap_2d for details.


local_costmap:
global_frame: "map"
robot_base_frame: "base_link"
Expand All @@ -11,9 +10,9 @@ local_costmap:
rolling_window: true
# TODO: Revisit width, height, resolution, etc. here once we start looking
# at creating a map from first lap.
width: 6.0
height: 6.0
resolution: 0.05
width: 5.5
height: 5.5
resolution: 0.1
transform_tolerance: 0.5

plugins:
Expand Down
18 changes: 11 additions & 7 deletions src/kart_2dnav/params/teb_local_planner_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ TebLocalPlannerROS:

odom_topic: "odom"

# Trajectory of the kart
# Trajectory

teb_autosize: True
dt_ref: 1
dt_hysteresis: 0.1
global_plan_overwrite_orientation: True
allow_init_with_backwards_motion: True
max_global_plan_lookahead_dist: 5.0
max_global_plan_lookahead_dist: 3.0
global_plan_viapoint_sep: -0.1
global_plan_prune_distance: 1
exact_arc_length: False
Expand All @@ -32,14 +32,18 @@ TebLocalPlannerROS:
acc_lim_x: 0.5
acc_lim_theta: 0.5

min_turning_radius: 0.51
wheelbase: 1.0541
min_turning_radius: 0.5 # (maybe) phyiscal val: 0.51
wheelbase: 0.4 # (maybe) phyiscal val: 1.0541
cmd_angle_instead_rotvel: True

footprint_model:
type: "polygon"
vertices: [ [0.7112, 0.4064], [0.7112, -1.524],
[-0.7112, -1.524], [-0.7112, 0.4064] ]
# 1. (maybe) footprint of our go-kart
#vertices: [ [0.7112, 0.4064], [0.7112, -1.524],
# [-0.7112, -1.524], [-0.7112, 0.4064] ]
# 2. footprint used by teb_local_planner tutorials.
# Use this for simulation as of now
vertices: [[-0.1,-0.125], [0.5,-0.125], [0.5,0.125], [-0.1,0.125]]
# ---------------------------------

# Goal Tolerance
Expand All @@ -51,7 +55,7 @@ TebLocalPlannerROS:

# Obstacles

min_obstacle_dist: 0.5
min_obstacle_dist: 0.25
inflation_dist: 0.6
include_costmap_obstacles: True
costmap_obstacles_behind_robot_dist: 1.0
Expand Down

0 comments on commit ebd2377

Please sign in to comment.