Skip to content

Commit

Permalink
Merge branch 'documentation' of github.com:mowito/mowito_amd64 into d…
Browse files Browse the repository at this point in the history
…ocumentation
  • Loading branch information
puru07 committed Sep 1, 2020
2 parents 415a436 + d944be1 commit 5e4bdf2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 18 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions docs/source/behavior_tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Behavior Tree for the Mowito Stack
Overview
-------------------------------------
The behavior tree package provides:

- The ability to use mowito’s features in a modular fashion.
- The ability to change the tree nodes dynamically without re-compiling the whole stack.
- Easy-to-use XML templates over which the user can add their own features.
Expand Down Expand Up @@ -52,24 +51,42 @@ The behavior tree package for the Mowito Stack provides navigation-specific node
Example Tree Structures
----------------------------------------------------------------------------------

A. Navigate with waypoint and simple recovery actions
A. Navigate with waypoints and simple recovery actions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following tree structure can be used for taking multiple goals from the user via the Rviz-Gui. This tree never returns that the action has finished successfully, but will return FAILURE after all the goals have been reached. However, until the system is shut down, the tree will continue to take new goals (if any) from the user and pursue them.

1. To launch the behavior tree for naviagation with waypoints and simple recovery actions, execute:

``roslaunch behavior_tree sim_bt_nav_waypoint_mode.launch``

2. This behavior tree is contained in the waypoint_navigation_tree.xml file inside the tree folder. The tree folder is alongside the CMakeLists.txt and package.xml files.

.. image:: Images/behavior_tree/tree_waypoint_mode.png
:alt: tree_waypoint_mode.png

B. Navigate with a given route points and simple recovery actions
B. Navigate with given route points and simple recovery actions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following tree structure can be used for taking multiple goals from the user via a given route.yaml (type) file. This tree never returns that the action has finished successfully, but will return FAILURE after all the goals have been reached. However, until the system is shut down, the tree will continue to take new goals (if any) from the user and pursue them.

1. To launch the behavior tree for navigation with route points and simple recovery actions, execute:

``roslaunch behavior_tree sim_bt_nav_set_route_mode.launch``

2. This behavior tree is contained in the set_route_tree.xml file inside the tree folder. The tree folder is alongside the CMakeLists.txt and package.xml files.

.. image:: Images/behavior_tree/tree_set_route_mode.png
:alt: tree_set_route_mode.png

C. Navigate with a given plan and simple recovery actions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following tree structure can be used for taking multiple plans from the user via a plan.txt (type) file. This tree never returns that the action has finished successfully, but will return FAILURE after all the plans have been reached. However, until the system is shut down, the tree will continue to take new plans (if any) from the user and pursue them.

1. To launch the behavior tree for navigation with a given plan and simple recovery actions, execute:

``roslaunch behavior_tree sim_bt_nav_set_plan_mode.launch``

2. This behavior tree is contained in the set_plan_tree.xml file inside the tree folder. The tree folder is alongside the CMakeLists.txt and package.xml files.

.. image:: Images/behavior_tree/tree_set_plan_mode.png
:alt: tree_set_plan_mode.png

Expand Down
51 changes: 36 additions & 15 deletions docs/source/trajectory_planner_tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,24 @@ The following files need to be altered and saved for custom parameters to take e
1. turtle_mowito
^^^^^^^^^^^^^^^^

+------------------------+---------------------------------------------------------------------------------------------------+
| Trajecory Planner | mowito_ws/src/turtle_mowito/mowito_turtlebot/config/controller_config/trajectory_planner_ros.yaml |
+------------------------+---------------------------------------------------------------------------------------------------+
| Local Costmap | mowito_ws/src/turtle_mowito/mowito_turtlebot/config/costmap_config/local_costmap_params.yaml |
+------------------------+---------------------------------------------------------------------------------------------------+
| Global Costmap | mowito_ws/src/turtle_mowito/mowito_turtlebot/config/costmap_config/global_costmap_params.yaml |
+------------------------+---------------------------------------------------------------------------------------------------+
+-------------------------+---------------------------------------------------------------------------------------------------+
| Trajectory Planner | mowito_ws/src/turtle_mowito/mowito_turtlebot/config/controller_config/trajectory_planner_ros.yaml |
+-------------------------+---------------------------------------------------------------------------------------------------+
| Local Costmap | mowito_ws/src/turtle_mowito/mowito_turtlebot/config/costmap_config/local_costmap_params.yaml |
+-------------------------+---------------------------------------------------------------------------------------------------+
| Global Costmap | mowito_ws/src/turtle_mowito/mowito_turtlebot/config/costmap_config/global_costmap_params.yaml |
+-------------------------+---------------------------------------------------------------------------------------------------+

2. rosbot
^^^^^^^^^

+------------------------+---------------------------------------------------------------------------------------------------+
| Trajecory Planner | mowito_ws/src/gazebo_sim/src/rosbot_description/config/controller/trajectory_planner_ros.yaml |
+------------------------+---------------------------------------------------------------------------------------------------+
| Local Costmap | mowito_ws/src/costmap2d/config/local_costmap_params.yaml |
+------------------------+---------------------------------------------------------------------------------------------------+
| Global Costmap | mowito_ws/src/costmap2d/config/global_costmap_params.yaml |
+------------------------+---------------------------------------------------------------------------------------------------+
+-------------------------+---------------------------------------------------------------------------------------------------+
| Trajectory Planner | mowito_ws/src/gazebo_sim/src/rosbot_description/config/controller/trajectory_planner_ros.yaml |
+-------------------------+---------------------------------------------------------------------------------------------------+
| Local Costmap | mowito_ws/src/costmap2d/config/local_costmap_params.yaml |
+-------------------------+---------------------------------------------------------------------------------------------------+
| Global Costmap | mowito_ws/src/costmap2d/config/global_costmap_params.yaml |
+-------------------------+---------------------------------------------------------------------------------------------------+



Expand All @@ -172,6 +172,27 @@ Common Problems and Tuning

This section describes certain common problems and describes in more detail how changing parameters will affect the robot behaviour.

Tip
^^^
Traditionally, one may edit and save the parameter files and relaunch the navigation to see their affect. It is highly recommended to use rqt_reconfigure, a ros utility that allows changing parameters during execution. Thus, there is no need to relaunch the navigation node(s). To use rqt_reconfigure, open a separate terminal (source the ros) and run

``rosrun rqt_reconfigure rqt_reconfigure``

A window like this would appear

.. image:: Images/trajectory_planner/rqt_reconfigure.png
:alt: rqt_reconfigure.png

Usage
^^^^^
* Make sure all parameters have the correct values.
* Change the values using either the sliders or the boxes next to the sliders
* After tuning, make sure to save your new parameters by changing them in the files listed above so that they are loaded each time the navigation is launched.
* It is recommended to make a backup of the original parameter files.




A. Local path is curving a lot and causes the robot to be slow and move in a sine wave-like path.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -195,7 +216,7 @@ The robot comes close to obstacles because either the global path or the local p

Obstacles exert a 'cost' on the map. For this purpose, the map is divided into a grid-based on a resolution. Think of this as pixels on a screen. A higher resolution means more points on the map. For each point, the cost is calculated. Thus, a higher resolution would require more computation power. Keep in mind that the resolution should be lower than that of the laser scanner hardware mounted on the robot.

The collection of all these points with their costs is called a 'costmap'. The cost of each pixel is used to determine how close the robot is to the object relative to how close it should be. This is not an actual estimate, only a numerical one that scales inversely with distance to the object and gives the robot a sense for how close it is to an obstacle. For example, the points on the object will have a cost of 255, and it would decrease the farther away we go from the object. The rate of decrease and the limit of the object's influence can be changed by tweaking the inflation_radius and cost_scaling_factor.
The collection of all these points with their costs is called a 'costmap'. The cost of each pixel is used to determine how close the robot is to the object relative to how close it should be. This is not an actual estimate, only a numerical one that scales inversely with distance to the object and gives the robot a sense for how close it is to an obstacle. For example, the points close the obstacle will have a cost value close to 255, and cost would decrease the farther away we go from the obstacle. The rate of decrease and the limit of the obstacle's influence can be changed by tweaking the inflation_radius and cost_scaling_factor.

**Inflation radius**
Inflation radius sets the absolute limit till which an object exerts influence or cost. Starting from the inflation radius and beyond, the costmap will have 0 cost due to the obstacle.
Expand Down

0 comments on commit 5e4bdf2

Please sign in to comment.