Complete global localization with gps and fused sensor data #269
+124
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was having huge problems with fusing the global data... literally most of last term. Turns out that changing from using the default gazebo world fixed it... so as you can see I've changed it so that we are not just launching the default gazebo world when we call the gazebo launch file.
The coordinate frames are now correctly set up in sim. Essentially, we have the map -> odom transform (in this PR) as well as the odom -> base_link transform (in my last PR). Below is a video, where you can see the map and odom frames.
Screencast.from.2024-05-20.03.52.17.PM.webm
For more context here, I've shown the TF tree and how the coordinate system of the rover is set up below.
This shows the transforms that I am talking about. Essentially, we are doing state estimation here, by having a odom -> base_link estimate done with the continuous data sources (the IMU and wheel odometry), as well as the global estimate of map -> odom being done by all data sources (GPS, IMU, and wheel odometry). State estimation allows us to use a probablistic estimate of our environment, a dynamics model for our robot, and update our beliefs based on sensor data. We use the local estimate to generate continuous estimates (since wheel odometry and IMU do this), but these continuous data sources drift (to clarify it's not actually continuous, just running at very high frequency of data capture).
To account for this, we use a GPS for global localization, which corrects for the drift in the other sensors, but runs at a much lower frequency (so the data coming from the GPS is not continuous, it is more discrete).