Giter Club home page Giter Club logo

ros-sensor-fusion-tutorial's Introduction

Sensor Fusion in ROS

Click to watch video!

An in-depth step-by-step tutorial for implementing sensor fusion with extended Kalman filter nodes from robot_localization! Basic concepts like covariance and Kalman filters are explained here!

This tutorial is especially useful because there hasn't been a full end-to-end implementation tutorial for sensor fusion with the robot_localization package yet.

You can find the implementation in the Example Implementation folder!

Why fuse sensor data

A lot of times, the individual navigation stack components in a robot application can fail more often than not, but together, they form a more robust whole than not.

One way to do this is with the extended Kalman filter from the robot_localization package. The package features a relatively simple ROS interface to help you fuse and configure your sensors, so that's what we'll be using!

How to use this tutorial

  1. Make sure you're caught up on ROS
  2. It'll be good to read the Marvelmind Indoor 'GPS' beacon tutorial alongside this if you want to understand the example implementation
  3. Likewise for the Linorobot stack
  4. And AMCL
  5. Then go ahead and follow the tutorial in order!

Yeah! Buy the DRAGON a COFFEE!

ros-sensor-fusion-tutorial's People

Contributors

methyldragon avatar ricber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros-sensor-fusion-tutorial's Issues

sample dataset

@methylDragon Thanks for the awesome tutorial. It will be a great help if provided with a sample dataset.(bagfile).

Kind regards

Covariance matrix setting

Hi methylDragon, thanks for the significant tutorial you have made, there was nothing like this before and I think it's really necessary to have a complete and clear tutorial about the obscure field of sensor fusion.

So, I would like to make some questions about two points I think they really need to be explained deeper:

  • Sensors covariance matrices

It's really tough to understand how to set it and to get the general view about the process.
For example, I'm trying to fuse an odometry source with the data coming from an IMU. To do this I'm using an ekf filter. At the moment my IMU has a covariance matrix filled with zeros. As you can read from here this is an error:

Missing covariances. If you have configured a given sensor to fuse a given variable into the state estimation node, then the variance for that value (i.e., the covariance matrix value at position (i,i), where i is the index of that variable) should not be 0. If a 0 variance value is encountered for a variable that is being fused, the state estimation nodes will add a small epsilon value (1eโˆ’6) to that value. A better solution is for users to set covariances appropriately.

Ok, so let's set the covariances appropriately. I think I only have two options: calculate it or get the values from the datasheet.

So, let's look at the datasheet. I'm using the X-NUCLEO-IKS01A1 board with LSM6DS0 IMU. The datasheet is here. As you can see there's a table on page 9 that talks about noise, like 'Gyroscope RMS noise in normal/low-power mode', etc. But how can I relate these values to variances? I didn't find anything on the web apart from this answer here where they say:

If you haven't got a background in random processes and signal analysis then you're going to have a rough time relating this back to real-world numbers, particularly if you're doing any kind of sensor fusion. Even the "big boys" in the sensor fusion game can't easily map sensor noise to system behavior without lots of simulation and head-scratching.

The other option is to calculate/approximate the covariance matrix. Again, I didn't find any standard approach to do it. I came up with the idea to just collect data for a while, placing the IMU in a very firm way, then calculating the variance (so assuming the covariance matrix diagonal). Does it make sense an approach like this?
I see that you calculated an estimate of the covariance from the sensor resolution and then you tuned it (from 0.0004 to 0.1404). How did you tune it and how did you get this number?

Moreover, do you know if there's a standard approach to set the covariance matrix? What's the complete spectrum of the alternatives?

  • initial_estimate_covariance and process_noise_covariance

You've also tuned the initial_estimate_covariance and process_noise_covariance matrices, how did you do it?

Lastly, if you have some references to books or papers about this stuff could you please share them?

Thanks for all what you're doing to make the sensor fusion topic clearer for everyone.

Bagfile

Hi methylDragon! Thank you for this really nice tutorial.

I was wondering if it would be possible for you to provide a bagfile for us to follow the tutorial using the same data you used.

Thank you in advance!

Question about remapping

Hello! I found in the tutorial you mentioned that:

If you have an odometry EKF node, also remember to remap the inputs to the AMCL node
<remap from="odom" to="odometry/filtered" />

I'm not quite sure about what it means, I have the similar layered EKFs for global localization and odometry, respectively. And they have their own published topic as odometry/filtered_map and odometry/filtered_odom. I'm not sure which to put to the remap command, and why I need to remap it in any way, the filtered odom is supposed to go to EKF instead of AMCL right?

Thanks a lot!

Fusing GPS data for Gmapping

Is fusing GPS data along with the imu and laser data for creating Gmapping (not for robot localization) possible ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.