Skip to content

Commit f3f66f9

Browse files
Merge pull request ETHZ-RobotX#13 from VIS4ROB-lab/feature/ros_nav_stack
SMB 2.0 Integration
2 parents 3359439 + d79fb83 commit f3f66f9

File tree

138 files changed

+5420
-9225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+5420
-9225
lines changed

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2018, ETHZ ASL
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 51 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,73 @@
11
# Super Mega Bot Path Planner
22

3-
Package for path planning of Super Mega Bots for the first ETH Robotics
4-
Summer School, 2019.
3+
Package for path planning of Super Mega Bots for the ETH Robotics Summer School.
54
The package has been tested under ROS Melodic and Ubuntu 18.04.
65

7-
__Author: Luca Bartolomei__
8-
__Affiliation: Vision For Robotics Lab, ETH Zurich__
9-
__Contact: Luca Bartolomei, lbartolomei@ethz.ch__
10-
# Getting Started
11-
If the packages from the repository
12-
[`ethz-asl/eth_robotics_summer_school_2019`](https://github.com/ethz-asl/eth_robotics_summer_school_2019) have already been downloaded and
13-
built, it is possible to skip the "Installation" section and go directly to the
14-
["Structure of the code"](#structure-of-the-code).
15-
If this is not the case, follow the installation instructions below.
16-
## Installation
17-
This package is intended to be used with Ubuntu 18.04 and [ROS melodic](http://wiki.ros.org/melodic/Installation/Ubuntu) or above.
18-
After installing ROS, install some extra dependencies:
19-
```asm
20-
$ sudo apt-get install ros-melodic-cmake-modules ros-melodic-ompl ros-melodic-costmap-2d ros-melodic-grid-map ros-melodic-grid-map-visualization ros-melodic-velodyne-gazebo-plugins python-wstool python-catkin-tools libyaml-cpp-dev protobuf-compiler autoconf
21-
```
22-
Then if not already done so, set up a new catkin workspace:
23-
```asm
24-
$ source /opt/ros/melodic/setup.bash
25-
$ mkdir -p ~/catkin_ws/src
26-
$ cd ~/catkin_ws
27-
$ catkin init
28-
$ catkin config --extend /opt/ros/melodic
29-
$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
30-
$ catkin config --merge-devel
31-
```
32-
In this installation guide, it is assumed that the following packages for
33-
simulation have already been downloaded and built in the same catkin workspace:
34-
* `any_node`
35-
* `message_logger`
36-
* `smb_sim`
37-
* `smb_path_following_controller`
38-
* `elevation_mapping`
39-
* `elevation_mapping_demo`
40-
* `traversability_estimation`
6+
__Author__: Luca Bartolomei
7+
__Affiliation__: Vision For Robotics Lab, ETH Zurich
8+
__Contact__: Luca Bartolomei, lbartolomei@ethz.ch
419

42-
To download all the other necessary dependencies for the path planner, run
43-
the following script in the source folder of your catkin workspace, by
44-
specifying the destination `src_workspace_path` of the clone procedure:
45-
```asm
46-
$ chmod +x smb_path_planner/bin/clone_repos.sh
47-
$ ./smb_path_planner/bin/clone_repos.sh -f src_workspace_path
10+
# Installation instructions
11+
Install the following packages first:
4812
```
49-
To show the help of the installation script, make it executable and run:
50-
```asm
51-
$ ./smb_path_planner/bin/clone_repos.sh -h
13+
sudo apt-get install ros-melodic-cmake-modules ros-melodic-velodyne-gazebo-plugins python-wstool python-catkin-tools ros-melodic-ompl ros-melodic-move-base ros-melodic-navfn ros-melodic-dwa-local-planner ros-melodic-costmap-2d ros-melodic-teb-local-planner ros-melodic-robot-self-filter ros-melodic-pointcloud-to-laserscan
5214
```
53-
Then, compile:
54-
```asm
55-
$ cd ~/catkin_ws
56-
$ catkin build smb_path_planner
57-
```
58-
## Structure of the code
59-
The `smb_path_planner` package is composed by 4 parts:
60-
* `smb_planner_common`: this package implements all the utility functions for
61-
visualization, parameter reading and traversability estimation that are
62-
needed by both the global and the local planners.
63-
* `smb_planner_rviz`: this package is the implementation for the planning
64-
panel in RViz.
65-
* `smb_global_planner`: global planner package. It is possible to select
66-
different planning algorithms (RRT*, Informed RRT*, PRM) by modifying the
67-
parameter file `smb_planner_parameters.yaml`.
68-
* `smb_local_planner`: local planner package. It implements the CHOMP solver
69-
with nonholonomic constraints.
15+
Then follow the instructions [here](https://github.com/ETHZ-RobotX/SMB_dev). **Note:** the project may not be publicly available yet. If not refer to the original ETHZ Summer School [repository](https://github.com/ethz-asl/eth_supermegabot).
7016

71-
The parameters for the planners and the elevation and traversability mapping
72-
are stored in `smb_path_planner/smb_planner_common/cfg/`.
17+
## Additional documentation
18+
Additional documentation on `move_base` can be found [here](https://wiki.ros.org/move_base), while for the local planner, refer to the TEB Local Planner instructions [here](https://wiki.ros.org/teb_local_planner). Finally, the documentation about `costmap_2d` is available [here](https://wiki.ros.org/costmap_2d).
19+
20+
## Structure of the code
21+
The `smb_path_planner` package is composed by 3 packages:
22+
* `smb_ompl_planner`: global planner for `move_base` based on the [OMPL library](http://ompl.kavrakilab.org/) for motion planning;
23+
* `smb_navigation`: package containing utilities, configurations and launch files for the planning with `move_base`;
24+
* `smb_navigation_rviz`: package containing the RViz plugin to put a goal for the planner easily;
25+
* `traversability_layer`: custom `costmap_2d` implementation to incorporate traversability maps.
7326

7427
## Planning Panel in RViz
75-
Make sure all the packages have built successfully. As a sanity check,
76-
re-source your workspace (`$ source ~/catkin_ws/devel/setup.bash`) and start
77-
up RViz (`$ rviz`).
78-
In RViz, select `Panels -> Add New Panel` and select `Planning Panel` under
79-
`smb_planner_rviz`.
28+
Make sure all the packages have built successfully. As a sanity check, re-source your workspace (`$ source ~/catkin_ws/devel/setup.bash`) and start up RViz (`$ rviz`). In RViz, select `Panels -> Add New Panel` and select `Planning Panel` under `smb_navigation_rviz`.
8029

81-
Next, under `Displays`, add an `InteractiveMarkers` display with the topic
82-
`/planning_markers/update`. You should be able to see the interactive markers
83-
and the planning panel.
30+
Next, under `Displays`, add an `InteractiveMarkers` display with the topic `/planning_markers/update`. You should be able to see the interactive markers and the planning panel.
8431

8532
## How to run the planner in simulation
8633
First, start the simulation in Gazebo, RViz and RQT Plugin to select the
8734
controller, by running:
88-
```asm
35+
```
8936
$ roslaunch smb_sim sim_path_planner.launch
9037
```
91-
In the controller panel, select `SmbPathFollowingController` from
92-
the list. If this controller does not show up, press the refresh button and
93-
try again. To start the controller, press the play button.
94-
Then, start the `elevation_mapping` node:
95-
```asm
96-
$ roslaunch smb_local_planner smb_elevation_mapping_simulation.launch
97-
```
98-
Finally, start the local and global planners:
99-
```asm
100-
$ roslaunch smb_local_planner smb_planner_simulation.launch
38+
In the controller panel, select `MpcTrackLocalPlan` from the list. If this controller does not show up, press the refresh button and try again. To start the controller, press the play button. Finally, start the local and global planners. If you want to use RRTs as global planner, run:
39+
```
40+
$ roslaunch smb_navigation navigate2d_ompl.launch
41+
```
42+
Otherwise, to use a standard global planner from `move_base`, run:
10143
```
102-
To send a global goal position, select it in the planning panel and press the
103-
button `Global Planner Service`. Once a global path has been computed and
104-
showed in RViz, start the local planner by pressing the button `Start Local
105-
Planner`.
44+
$ roslaunch smb_navigation navigate2d.launch
45+
```
46+
To send a global goal position there a set of different possibilities:
47+
* Set a goal with the planning panel and press the button `Start Planning`;
48+
* Use RViz direcly by using the button `2D Nav Goal` and setting the goal pose;
49+
* Publish directly on the topic `/move_base_simple/goal`.
10650

107-
## How to run the planner on the real robot
108-
Start the `LPC` on the robot and the `OPC` on the operator side. To run the
109-
`LPC`, run the following commands in the PC of the robot in multiple terminals:
110-
```asm
111-
$ roscore # terminal 1
112-
$ roslaunch smb_lpc lpc.launch # terminal 2
51+
### How to run the planner in another frame
52+
If the `world` frame is not available, it is possible to use the odometry frame for planning. for example, if the frame in use is called `odom`, run:
11353
```
114-
Start the LiDAR and the mapping in another terminal in the robot PC:
115-
```asm
116-
$ roslaunch ethzasl_icp_mapper supermegabot_robosense_dynamic_mapper.launch # terminal 3
117-
```
118-
Then to start the planners, run on the PC of the robot in separate terminals:
119-
```asm
120-
$ roslaunch smb_local_planner smb_elevation_mapping_real.launch # terminal 4
121-
$ roslaunch smb_local_planner smb_planner_real.launch # terminal 5
54+
$ roslaunch smb_navigation navigate2d_ompl.launch global_frame:=odom
55+
```
56+
57+
### Running with traversability estimation
58+
Start the simulation as in the previous case, and then run:
12259
```
123-
On the operator side, start the `OPC`. First connect the `rosmaster` of the
124-
PC to the `rosmaster` of the robot and then run in a terminal:
125-
```asm
126-
$ roslaunch smb_opc opc.launch
60+
$ roslaunch smb_navigation navigate2d_ompl.launch run_traversability:=true
12761
```
128-
To send a global goal position, follow the same procedure as in simulation:
129-
1. Select the `SmbPathFollowingController` in the control panel and start it;
130-
2. Send the global goal using the `Planning Panel` in RViz.
62+
Notice that in this case, there are 3 different cost layers (static, laser scans and inflation layers), but **only** the static layer is active.
63+
64+
It is also possible to use a custom layer (`traversability_layer`). To use it, follow the instructions in the configuration file `smb_navigation/config/move_base_costmaps/local_costmap_params_traversability.yaml`.
65+
In this case, notice that it is not possible to run the obstacle layer (based on laser scans) and the traversability layer at the same time in the current configuration, as the laser scan clears the traversability map. You are more than welcome to find a proper way to fuse these two maps!
66+
67+
## How to run the planner on the real robot
68+
Connect to the robot and start the state estimation and control pipeline. Once it is started, run the planner as before:
69+
```
70+
$ roslaunch smb_navigation navigate2d_ompl.launch
71+
```
72+
If necessary, set the right global frame used for planning.
73+

bin/clone_repos.sh

Lines changed: 0 additions & 124 deletions
This file was deleted.

smb_global_planner/CMakeLists.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)