Skip to content

Commit

Permalink
Update documentation (#101)
Browse files Browse the repository at this point in the history
* Update documentation

* Resize image
  • Loading branch information
ToshikiNakamura0412 authored Apr 28, 2024
1 parent 0245595 commit 53a8e22
Show file tree
Hide file tree
Showing 71 changed files with 2,342 additions and 1,880 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The API documentation is available at [https://amslabtech.github.io/dwa_planner/

**Note: This simulator is not provided.**

![demo1](docs/images/demo_dwa.gif)
![demo 1](docs/images/dwa_planner_demo_1.gif)

## Environment
- Ubuntu 20.04
Expand Down Expand Up @@ -53,14 +53,13 @@ export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_navigation turtlebot3_navigation.launch
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch dwa_planner local_planner.launch use_scan_as_input:=True
roslaunch dwa_planner local_planner.launch use_scan_as_input:=True v_path_width:=0.02
```
![demo3](docs/images/demo_dwa_3.gif)
![demo 2](docs/images/dwa_planner_demo_2.gif)


## Node I/O

![dwa_planner I/O diagram](docs/images/dwa_planner_io.png)
![Node I/O](docs/images/dwa_planner_io.png)

### Published/Subscribed Topics
Access [here](docs/Topics.md)
Expand Down
41 changes: 24 additions & 17 deletions config/dwa_param.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
TARGET_VELOCITY: 0.55
PREDICT_TIME: 3.0
OBSTACLE_COST_GAIN: 1.0
TO_GOAL_COST_GAIN: 0.8
# If path cost is used, setting the param "SPEED_COST_GAIN" to a value close to the param "PATH_COST_GAIN" may indicate better behavior
SPEED_COST_GAIN: 0.4
# If path cost is used, set the param "USE_PATH_COST" to true
PATH_COST_GAIN: 0.4
ANGLE_RESOLUTION: 0.087
GOAL_THRESHOLD: 0.1
TURN_DIRECTION_THRESHOLD: 0.1
ANGLE_TO_GOAL_TH: pi
SIM_DIRECTION: 1.57
SLOW_VELOCITY_TH: 0.1
OBS_RANGE: 2.5
# Target Parameters
TARGET_VELOCITY: 0.55 # [m/s]

# Simulation Parameters
PREDICT_TIME: 3.0 # [s]
SIM_TIME_SAMPLES: 10
SIM_PERIOD: 0.1 # [s]
SIM_DIRECTION: 1.57 # [rad]
SLOW_VELOCITY_TH: 0.1 # [m/s]
VELOCITY_SAMPLES: 3
YAWRATE_SAMPLES: 20
SIM_TIME_SAMPLES: 10
SIM_PERIOD: 0.1

# Cost Parameters
OBSTACLE_COST_GAIN: 1.0
TO_GOAL_COST_GAIN: 0.8
SPEED_COST_GAIN: 0.4 # If path cost is used, setting the param "SPEED_COST_GAIN" to a value close to the param "PATH_COST_GAIN" may indicate better behavior
PATH_COST_GAIN: 0.4 # If path cost is used, set the param "USE_PATH_COST" to true
ANGLE_RESOLUTION: 0.087 # [rad]
OBS_RANGE: 2.5 # [m]

# Goal Tolerance Parameters
GOAL_THRESHOLD: 0.1 # [m]
TURN_DIRECTION_THRESHOLD: 0.1 # [rad]

# Other Parameters
ANGLE_TO_GOAL_TH: pi # [rad]
27 changes: 16 additions & 11 deletions config/robot_param.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
## Frame Parameters
ROBOT_FRAME: "base_link"
MAX_VELOCITY: 1.0
MIN_VELOCITY: 0.0
MAX_YAWRATE: 1.0
MIN_YAWRATE: 0.05
MAX_IN_PLACE_YAWRATE: 0.6
MIN_IN_PLACE_YAWRATE: 0.3
MAX_ACCELERATION: 0.5
MAX_DECELERATION: 2.0
MAX_D_YAWRATE: 3.2
ROBOT_RADIUS: 0.1 # If param "USE_FOOTPRINT" is set to true, this param is not used
FOOTPRINT_PADDING: 0.01

# Robot Size Parameters
ROBOT_RADIUS: 0.1 # [m], If param "USE_FOOTPRINT" is set to true, this param is not used
FOOTPRINT_PADDING: 0.01 # [m], If localmap contains padding, you should set this param to 0.0

# Robot Configuration Parameters
MAX_VELOCITY: 1.0 # [m/s]
MIN_VELOCITY: 0.0 # [m/s]
MAX_YAWRATE: 1.0 # [rad/s]
MIN_YAWRATE: 0.05 # [rad/s]
MAX_IN_PLACE_YAWRATE: 0.6 # [rad/s]
MIN_IN_PLACE_YAWRATE: 0.3 # [rad/s]
MAX_ACCELERATION: 0.5 # [m/s^2]
MAX_DECELERATION: 2.0 # [m/s^2]
MAX_D_YAWRATE: 3.2 # [rad/s^2]
52 changes: 30 additions & 22 deletions docs/Parameters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# Parameters
## Planner Parameters
(config/dwa_param.yaml)
### Target Parameters
- ~\<name>/<b>TARGET_VELOCITY</b> (double, default: `0.55` [m/s]):<br>
The max target velocity of robot

### Simulation Parameters
- ~\<name>/<b>PREDICT_TIME</b> (double, default: `3.0` [s]):<br>
The amount of time to simulate trajectories
- ~\<name>/<b>SIM_TIME_SAMPLES</b> (int, default: `10`):<br>
The number of samples to use when simulating trajectories
- ~\<name>/<b>SIM_PERIOD</b> (double, default: `0.1` [s]):<br>
The simulation time related to the dynamic window. The product of this parameter and the acceleration is the amount of movement of the dynamic window.
- ~\<name>/<b>SIM_DIRECTION</b> (double, default: `1.57` [rad]):<br>
The simulated turning angle when turning on the spot
- ~\<name>/<b>SLOW_VELOCITY_TH</b> (double, default: `0.1` [m/s]):<br>
The threshold for slow velocity. If the robot's velocity is less than this value, yawrate less than `MIN_YAWRATE` are not sampled.
- ~\<name>/<b>VELOCITY_SAMPLES</b> (int, default: `3`):<br>
The number of samples to use when searching for the best velocity
- ~\<name>/<b>YAWRATE_SAMPLES</b> (int, default: `20`):<br>
The number of samples to use when searching for the best yawrate

### Cost Parameters
- ~\<name>/<b>OBSTACLE_COST_GAIN</b> (double, default: `1.0`):<br>
The weighting for how large the obstacle cost should be. Multiplied by the normalized obstacle cost. When the robot is far from obstacles, the cost is low.
Expand All @@ -10,27 +30,11 @@
The weighting for how large the speed cost should be. Multiplied by the normalized speed cost. When the robot is fast, the cost is low.
- ~\<name>/<b>PATH_COST_GAIN</b> (double, default: `0.4`):<br>
The weighting for how large the path cost should be. Multiplied by the normalized path cost. When the robot is close to the path, the cost is low.
- ~\<name>/<b>TARGET_VELOCITY</b> (double, default: `0.55` [m/s]):<br>
The max target velocity of robot
- ~\<name>/<b>ANGLE_RESOLUTION</b> (double, default: `0.087` [rad]):<br>
Search obstacle by this resolution
- ~\<name>/<b>OBS_RANGE</b> (double, default: `2.5` [m]):<br>
The maximum measurement distance to be considered when calculating obstacle cost

### Simulation Parameters
- ~\<name>/<b>PREDICT_TIME</b> (double, default: `3.0` [s]):<br>
The amount of time to simulate trajectories
- ~\<name>/<b>DT</b> (double, default: `0.1` [s]):<br>
The simulation time-step
- ~\<name>/<b>SIM_DIRECTION</b> (double, default: `1.57` [rad]):<br>
The simulated turning angle when turning on the spot
- ~\<name>/<b>SLOW_VELOCITY_TH</b> (double, default: `0.1` [m/s]):<br>
The threshold for slow velocity. If the robot's velocity is less than this value, yawrate less than `MIN_YAWRATE` are not sampled.
- ~\<name>/<b>VELOCITY_SAMPLES</b> (double, default: `3`):<br>
The number of samples to use when searching for the best velocity
- ~\<name>/<b>YAWRATE_SAMPLES</b> (double, default: `20`):<br>
The number of samples to use when searching for the best yawrate

### Goal Tolerance Parameters
- ~\<name>/<b>GOAL_THRESHOLD</b> (double, default: `0.1` [m]):<br>
The tolerance for the robot in position when achieving its goal
Expand Down Expand Up @@ -77,14 +81,14 @@

## Other Parameters
(launch/local_planner.launch)
### Frame Parameter
- ~\<name>/<b>GLOBAL_FRAME</b> (string, default: `map`):<br>
The coordinate frame of map

### Main Loop Parameter
- ~\<name>/<b>HZ</b> (double, default: `20` [Hz]):<br>
The rate of main loop

### Frame Parameter
- ~\<name>/<b>GLOBAL_FRAME</b> (string, default: `map`):<br>
The coordinate frame of map

### Topic Parameter
- ~\<name>/<b>SUBSCRIBE_COUNT_TH</b> (double, default: `3`):<br>
The allowable number of control loops if topic is not reached. If the number exceeds this value, set velocity and yawrate to 0.0.
Expand All @@ -93,10 +97,14 @@
- ~\<name>/<b>SLEEP_TIME_AFTER_FINISH</b> (double, default: `0.5` [s]):<br>
The sleep time after reaching the goal. Prevent bugs that occur on other nodes by not continuously publishing the finish flag when the goal is reached.

### Visualization Parameter
- ~\<name>/<b>V_PATH_WIDTH</b> (double, default: `0.05` [m]):<br>
The width of the local path visualization. The selected trajectory's width is this value. The candidate trajectories's width is 0.4 times this value. The footprint frame visualization's width is 0.2 times this value.

### Option
- ~\<name>/<b>USE_SCAN_AS_INPUT</b> (bool, default: `false`):<br>
If scan is used instead of localmap, set to true.
- ~\<name>/<b>USE_FOOTPRINT</b> (bool, default: `false`):<br>
If footprint is used, set to true.
- ~\<name>/<b>USE_PATH_COST</b> (bool, default: `false`):<br>
If path cost is used, set to true.
- ~\<name>/<b>USE_SCAN_AS_INPUT</b> (bool, default: `false`):<br>
If scan is used instead of localmap, set to true.
2 changes: 1 addition & 1 deletion docs/Parameters_8md.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/README_8md.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/Topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
## Necessary topics
- /local_map (`nav_msgs/OccupancyGrid`)
- robot-centered costmap
- the cells with an occupancy probability of 100 are considered as obstacles
- /move_base_simple/goal (`geometry_msgs/PoseStamped`)
- goal pose
- /odom (`nav_msgs/Odometry`)
Expand All @@ -33,7 +34,7 @@
- /footprint (`geometry_msgs/PolygonStamped`)
- robot footprint
- If robot footprint is used, set `USE_FOOTPRINT` to `true`
- `footprint_publisher` node in `amsl_navigation_utils` repository publishes rectangular footprint
- `footprint_publisher` node in [amsl_navigation_utils](https://github.com/amslabtech/amsl_navigation_utils.git) repository publishes rectangular footprint
- /path (`nav_msgs/Path`)
- a part of the global path (edge)
- for path cost
Expand Down
2 changes: 1 addition & 1 deletion docs/Topics_8md.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/annotated.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 53a8e22

Please sign in to comment.