Skip to content

Commit 179eabd

Browse files
Merge pull request #51 from ori-drs/ros2
Ros2
2 parents e6aae29 + cbc674e commit 179eabd

File tree

173 files changed

+13547
-1970
lines changed

Some content is hidden

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

173 files changed

+13547
-1970
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "Ubuntu",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:jammy"
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
// "forwardPorts": [],
13+
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
// "postCreateCommand": "uname -a",
16+
17+
// Configure tool-specific properties.
18+
// "customizations": {},
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
**build/
22
CMakeLists.txt.user
33
.vscode/
4+
/install/
5+
/log/
6+
/build/
7+
pronto_ros2_node/Experiments/

README.md

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ fusion. It has been used with a variety of inputs from sensors such as IMUs
1010
(Carnegie Robotics Multisense SL, Intel RealSense) and joint
1111
kinematics.
1212

13+
For the ROS 1 version, check the [ros1 branch](https://github.com/ori-drs/pronto/tree/ros1) of this repository.
14+
1315
### Legged Robots
1416
Pronto provided the state estimate that was used by MIT DRC team in the
1517
DARPA Robotics Challenge to estimate the position and motion of the Boston
@@ -31,10 +33,10 @@ estimation. The modules specific to MAVs (e.g., altimeter, GPS) are not currentl
3133

3234
## Software Overview
3335
The algorithms (and their ROS wrappers) are written in C/C++ and organized as
34-
`catkin` packages.
36+
`ros` packages.
3537
The repository consists of the following main modules:
3638

37-
- `pronto_core`: core libraries that implment the filter, the state and
39+
- `pronto_core`: core libraries that implement the filter, the state, and
3840
basic measurement modules (e.g., IMU, pose update)
3941
- `pronto_biped` leg odometry measurement modules for humanoid robots (tested
4042
on Atlas and Valkyrie)
@@ -46,61 +48,90 @@ quadruped robot. This is a fork of the `iit_commons` package (see
4648
- `*_ros` ROS wrappers of the above modules
4749
- other support packages for filtering
4850

51+
For further details, refer to [this](doc/architecture.md).
52+
4953
## Dependencies
50-
Pronto depends on Eigen and Boost
54+
Pronto depends on Eigen, Boost and Pinocchio.
5155

5256
## System Requirements
53-
The target operating system is **Ubuntu 18.04** equipped with **ROS Melodic**.
54-
Other versions of Ubuntu/ROS might work but they are **not** actively supported or tested.
57+
The target operating system is **Ubuntu 22.04** with **ROS 2 Humble**.
58+
Other versions of Ubuntu/ROS might work but they are **not** actively supported or tested.
5559

5660
## Building the Code
57-
Pronto is organized as a collection of catkin packages. To build the code,
58-
just run `catkin build` followed by the name of the packages you are
59-
interested to build.
61+
Pronto is organized as a collection of ROS packages.
62+
To build the code, run
63+
```shell
64+
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
65+
```
66+
Then, source the workspace:
67+
```shell
68+
source install/setup.bash
69+
```
70+
71+
## Usage
72+
73+
### Start Estimator
74+
The estimator node can be started with
75+
```shell
76+
ros2 launch pronto_ros2_node pronto_node.launch.py xacro_pkg:=<robot_description_package> xacro_name:=<xacro_file_name> config_name:=<configuration_file name>
77+
```
78+
Where the arguments within `<...>` must be replaced with the actual values.
79+
80+
The config file must be added to the config folder in pronto_ros2_node package.
81+
82+
### Benchmarking
83+
The Benchmarking launch allows the user to start a list of pronto instance to compare the obtained estimations. The input is a bag contains all the filter measures input, or at least it should be consistent with the configuration files. The configuration files has to be placed into the config folder and named omnicar_tune_i.yaml, each file is associated with a pronto instance.
84+
The launch file contains the global variable to set the bag name and the list of instance number, subset of the configuration files' list.
85+
To start the filters the command line is:
86+
87+
```shell
88+
ros2 launch pronto_ros2_node bench_pronto.launch.py
89+
```
6090

6191
## Robot Implementation Example
62-
To learn how to use Pronto on your robot, you can have a look at [this repository](https://github.com/ori-drs/pronto_anymal_example), which contains a full implementation on the ANYmal quadruped robot.
92+
To learn how to use Pronto on your robot, you can have a look at [this repository](https://github.com/ori-drs/pronto_anymal_example), which contains a full implementation on the ANYmal quadruped robot.
93+
6394
## Publications
6495
If you use part of this work in academic context, please cite the following publication:
6596

66-
*M. Camurri, M. Ramezani, S. Nobili, M. Fallon*
67-
**Pronto: A Multi-Sensor State Estimator for Legged Robots in Real-World Scenarios**
97+
*M. Camurri, M. Ramezani, S. Nobili, M. Fallon*
98+
**Pronto: A Multi-Sensor State Estimator for Legged Robots in Real-World Scenarios**
6899
in Frontiers on Robotics and AI, 2020 ([PDF](https://www.frontiersin.org/articles/10.3389/frobt.2020.00068/pdf)) **DOI:** [10.3389/frobt.2020.00068](https://doi.org/10.3389/frobt.2020.00068)
69100
```
70101
@article{camurri2020frontiers,
71-
author = {Camurri, Marco and Ramezani, Milad and Nobili, Simona and Fallon, Maurice},
72-
title = {{Pronto: A Multi-Sensor State Estimator for Legged Robots in Real-World Scenarios}},
102+
author = {Camurri, Marco and Ramezani, Milad and Nobili, Simona and Fallon, Maurice},
103+
title = {{Pronto: A Multi-Sensor State Estimator for Legged Robots in Real-World Scenarios}},
73104
journal = {Frontiers in Robotics and AI},
74105
volume = {7},
75106
number = {68},
76-
pages = {1--18},
77-
year = {2020},
107+
pages = {1--18},
108+
year = {2020},
78109
url = {https://www.frontiersin.org/article/10.3389/frobt.2020.00068},
79-
doi = {10.3389/frobt.2020.00068},
110+
doi = {10.3389/frobt.2020.00068},
80111
issn = {2296-9144}
81112
}
82113
```
83114

84115
### Previous publications
85116

86-
*S. Nobili, M. Camurri, V. Barasuol, M. Focchi, D.G. Caldwell, C. Semini, M. Fallon*
87-
**Heterogeneous Sensor Fusion for Accurate State Estimation of Dynamic Legged Robots**
117+
*S. Nobili, M. Camurri, V. Barasuol, M. Focchi, D.G. Caldwell, C. Semini, M. Fallon*
118+
**Heterogeneous Sensor Fusion for Accurate State Estimation of Dynamic Legged Robots**
88119
in Proceedings of Robotics: Science and Systems XIII, 2017 ([PDF](http://www.robots.ox.ac.uk/~mobile/drs/Papers/2017RSS_nobili.pdf)) **DOI:** [10.15607/RSS.2017.XIII.007](https://www.doi.org/10.15607/RSS.2017.XIII.007)
89120

90121
```
91122
@inproceedings{nobili2017rss,
92-
author = {Simona Nobili AND Marco Camurri AND Victor Barasuol AND Michele Focchi AND Darwin Caldwell AND Claudio Semini AND Maurice Fallon},
93-
title = {{Heterogeneous Sensor Fusion for Accurate State Estimation of Dynamic Legged Robots}},
94-
booktitle = {Proceedings of Robotics: Science and Systems},
95-
year = {2017},
96-
address = {Cambridge, Massachusetts},
97-
month = {July},
98-
doi = {10.15607/RSS.2017.XIII.007}
123+
author = {Simona Nobili AND Marco Camurri AND Victor Barasuol AND Michele Focchi AND Darwin Caldwell AND Claudio Semini AND Maurice Fallon},
124+
title = {{Heterogeneous Sensor Fusion for Accurate State Estimation of Dynamic Legged Robots}},
125+
booktitle = {Proceedings of Robotics: Science and Systems},
126+
year = {2017},
127+
address = {Cambridge, Massachusetts},
128+
month = {July},
129+
doi = {10.15607/RSS.2017.XIII.007}
99130
}
100131
```
101132

102-
*M. Camurri, M. Fallon, S. Bazeille, A. Radulescu, V. Barasuol, D.G. Caldwell, C. Semini*
103-
**Probabilistic Contact Estimation and Impact Detection for State Estimation of Quadruped Robots**
133+
*M. Camurri, M. Fallon, S. Bazeille, A. Radulescu, V. Barasuol, D.G. Caldwell, C. Semini*
134+
**Probabilistic Contact Estimation and Impact Detection for State Estimation of Quadruped Robots**
104135
in IEEE Robotics and Automation Letters, vol. 2, no. 2, pp. 1023-1030, April 2017 ([PDF](https://iit-dlslab.github.io/papers/camurri17ral.pdf)) **DOI:** [10.1109/LRA.2017.2652491](https://www.doi.org/10.1109/LRA.2017.2652491)
105136

106137
```
@@ -117,8 +148,8 @@ in IEEE Robotics and Automation Letters, vol. 2, no. 2, pp. 1023-1030, April 201
117148
month = {April}}
118149
```
119150

120-
*M. Fallon, M. Antone, N. Roy, S. Teller*
121-
**Drift-Free Humanoid State Estimation fusing Kinematic, Inertial and LIDAR sensing**
151+
*M. Fallon, M. Antone, N. Roy, S. Teller*
152+
**Drift-Free Humanoid State Estimation fusing Kinematic, Inertial and LIDAR sensing**
122153
2014 IEEE-RAS International Conference on Humanoid Robots ([PDF](https://www.research.ed.ac.uk/portal/files/18903340/14_fallon_humanoids.pdf)) **DOI:**[10.1109/HUMANOIDS.2014.7041346](https://www.doi.org/10.1109/HUMANOIDS.2014.7041346)
123154

124155
```
@@ -135,8 +166,8 @@ ISSN={},
135166
month={Nov},}
136167
```
137168

138-
*A. Bry, A. Bachrach, N. Roy*
139-
**State Estimation for Aggressive Flight in GPS-Denied Environments Using Onboard Sensing**
169+
*A. Bry, A. Bachrach, N. Roy*
170+
**State Estimation for Aggressive Flight in GPS-Denied Environments Using Onboard Sensing**
140171
2012 IEEE International Conference on Robotics and Automation ([PDF](https://dspace.mit.edu/bitstream/handle/1721.1/86237/icra12_aggressive_flight.pdf)) **DOI:**[10.1109/ICRA.2012.6225295](https://www.doi.org//10.1109/ICRA.2012.6225295)
141172

142173
```
@@ -161,13 +192,14 @@ month={May},}
161192
- Extended to support humanoid motion by Maurice Fallon with the help of
162193
the [MIT DARPA Robotics Challenge Team](http://www.drc.mit.edu).
163194

164-
- Support for quadruped robots, full ROS conversion and logo design by
165-
Marco Camurri ([IIT Dynamic Legged System Lab](http://dls.iit.it) and [ORI Dynamic Robot Systems Group](https://ori.ox.ac.uk/labs/drs))
195+
- Support for quadruped robots, full ROS 1 conversion and logo design by
196+
Marco Camurri ([IIT Dynamic Legged System Lab](http://dls.iit.it) and [ORI Dynamic Robot Systems Group](https://ori.ox.ac.uk/labs/drs)), currently at [IDRA Research group](https://idra-lab.github.io/), University of Trento
197+
198+
- Ported to ROS 2 by Jacopo Cioni, Francesco Iotti, and Davide De Benedittis from the University of Pisa, under the supervision of Franco Angelini and Manolo Garabini.
166199

167200
### Additional contributors
168201
Andy Barry, Pat Marion, Dehann Fourie, Marco Frigerio, Michele Focchi, Benoit Casseau, Russell Buchanan, Wolfgang Merkt
169202

170203
## License
171204
Pronto is released under the LGPL v2.1 license. Please see the LICENSE file attached to
172205
this document for more information.
173-

doc/Controller_UML_scheme.pdf

97.6 KB
Binary file not shown.

doc/Controller_est.png

285 KB
Loading

doc/PRONTO _ROS_UML.pdf

101 KB
Binary file not shown.

doc/PRONTO_ROS_UML.png

329 KB
Loading

doc/ROS_Pronto_UML.pdf

63.1 KB
Binary file not shown.

doc/architecture.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Pronto Architecture
2+
3+
The system offers a set of **modules** that manage different sensors subscribing to specific topics.
4+
Available modules:
5+
6+
1. `ins`: inertial navigation system (IMU)
7+
2. `legodo`: legged odometry
8+
3. `bias_lock`: bias updater while the system is standing
9+
4. `scan_matcher`: LiDAR scan matcher
10+
5. `qualysis_mt`: Qualisys motion tracker
11+
12+
---
13+
14+
### ROS2 Code UML
15+
16+
![Prova](/doc/pronto_node_ros1.png)
17+
18+
---
19+
20+
### Pronto Estimator Parameters
21+
22+
#### Estimator parameters
23+
24+
- `pose_topic`: estimated pose topic name
25+
- `pose_frame_id`: pose `tf` frame name
26+
- `twist_topic`: estimated twist topic name
27+
- `publish_pose`: if `true`, publish pose
28+
- `publish_tf`: if `true`, publish `tf`
29+
- `tf_child_frame_id`
30+
- `republish_sensors`
31+
- `init_sensors`: sensor list used to initialize the filter
32+
- `active_sensors`: sensor list used to update the estimation
33+
- `utime_history_span`: maximum update temporal span
34+
- `sigma0`: initial covariance
35+
- `x0`: initial state
36+
37+
#### Base-module parameters
38+
39+
- `topic`: module subscription topic name
40+
- `roll_forward_on_receive`: if `true`, update the estimation when a message is received
41+
- `publish_head_on_message`: if `true`, publish the estimation when a message is received
42+
43+
#### INS parameters
44+
45+
- `q_gyro`: gyro measurement covariance
46+
- `q_accel`: accelerometer measurement covariance
47+
- `q_gyro_bias`: gyro bias covariance
48+
- `q_accel_bias`: accelerometer bias covariance
49+
- `num_to_init`: number of messages needed to initialize the INS module
50+
- `gyro/accel_bias_initial`: initial bias value
51+
- `gyro/accel_bias_recalc_at_start`: if `true`, recalculate bias during initialization
52+
- `gyro/accel_bias_update_online`: if `true`, update bias online
53+
- `frame`: IMU `tf` frame name
54+
- `base_frame`: base `tf` frame name
55+
56+
#### Legodo parameters
57+
58+
- `legodo_mode`: covariance mode (`STATIC_SIGMA`, `VAR_SIGMA`, `IMPACT_SIGMA`, `WEIGHTED_AVG`, `ALPHA_FILTER`)
59+
- `stance_mode`: contact-detection mode (`THRESHOLD`, `HYSTERESIS`, `REGRESSION`)
60+
- `stance_threshold`
61+
- `stance_hysteresis_low`
62+
- `stance_hysteresis_high`
63+
- `stance_hysteresis_delay_low`
64+
- `stance_hysteresis_delay_high`
65+
- `stance_alpha`
66+
- `stance_regression_beta_size`
67+
- `stance_regression_beta`
68+
- `r_vx`: initial covariance in **x** direction
69+
- `r_vy`: initial covariance in **y** direction
70+
- `r_vz`: initial covariance in **z** direction
71+
- `sim`: if `true`, use `sensor_msgs`; otherwise use `pi3hat_msgs`
72+
73+
#### Bias-lock parameters
74+
75+
- `torque_threshold`: minimum knee torque to detect ground contact
76+
- `velocity_threshold`: maximum velocity to consider the robot standing
77+
- `secondary_topic`: joint-state topic name
78+
- `sim`: if `true`, use `sensor_msgs`; otherwise use `pi3hat_msgs`
79+
80+
#### Scan-matcher parameters
81+
82+
- `mode`: correction mode (`position`, `yaw`, `position_yaw`)
83+
- `r_yaw`: yaw covariance
84+
- `r_pxy`: position covariance
85+
86+
#### Wheel-odometry parameters
87+
88+
- `mode`: correction mode (`linear_velocity`, `angular_velocity`, `both`)
89+
- `r_linear`: linear-velocity covariance
90+
- `r_chi`: angular covariance
91+
92+
#### Qualysis-MT parameters
93+
94+
- `robot_name`: Qualisys rigid-body name
95+
- `r_xyz`: position covariance
96+
- `r_chi`: orientation covariance
97+
- `mode`: correction mode (`position`, `yaw`, `position_yaw`, `orientation`, `position_orientation`)
98+
99+
---
100+
101+
### Classes and Methods
102+
103+
1. **`ROS_FrontEnd`** (Pronto ROS)
104+
- **Constructor**: reads topic names for pose, velocity and `tf` from ROS parameters; initialises filter state and covariance.
105+
- **`initializeState`**: reads initial pose and velocity from parameters and sets the initial state.
106+
- **`initializeCovariance`**: reads the initial covariance matrix and sets it.
107+
- **`initializeFilter`**: initializes the filter once all required sensor modules are ready.
108+
- **`areModulesInitialized`**: checks whether all sensors that need initialisation are ready.
109+
- **`addSensingModule`**: creates data structures (maps and topics) for a sensor.
110+
- **`InitCallback`**: callback to initialize a sensing module; destroys the init topic when done.
111+
- **`callback`**: subscriber callback that updates the estimation from incoming data.
112+
113+
2. **`InsHandlerRos`** (Pronto ROS) — manages the `InsModule` for the frontend.
114+
- **Constructor**: builds the `InsModule` and creates its topic.
115+
- **`ProcessMessage`**: receives an IMU message and returns the state and covariance update.
116+
- **`processMessageInit`**: processes an IMU message and returns whether initialization succeeded.
117+
118+
3. **`SensingModule`** (Pronto_Core) — virtual base class for a generic sensor.
119+
- **`ProcessMessage`** *(virtual)*: processes sensor data and returns the update.
120+
- **`processMessageInit`** *(virtual)*: handles initialization messages.
121+
122+
4. **`DualSensingModule`** (Pronto_Core) — virtual class for a module with two sensor inputs.
123+
- **`ProcessMessage`** *(virtual)*
124+
- **`processMessageInit`** *(virtual)*
125+
126+
5. **`InsModule`** (Pronto_Core)
127+
- **Constructor**: builds the inertial sensing module from the IMU configuration and IMU-to-body transformation.
128+
- **`ProcessMessage`**
129+
- **`processMessageInit`**

0 commit comments

Comments
 (0)