Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Factor Graph SLAM with GTSAM #834

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open

Factor Graph SLAM with GTSAM #834

wants to merge 62 commits into from

Conversation

VAM7686
Copy link
Contributor

@VAM7686 VAM7686 commented Jul 24, 2021

Description

Uses the GTSAM library to implement 3D localization using a factor graph. GPS coordinates, IMU measurements, magnetometer measurements, and wheel odometry measurements are continually integrated into the factor graph which helps localizes the robot over time. With 3D localization we are able to go over uneven terrain such as ramps.

This PR does the following:
Main focus:

  • Implements 3D localization using a factor graph.

Other fixes:

  • Fixes GPS plugin configuration issues
  • Fixes GPS waypoints for simulations
  • Added magnetometer integration in robot_localization ekf_localization_node configuration

Fixes #555 and #662

Testing

Test Case 1

  1. Launch ramp_lane.launch
  • roslaunch igvc_gazebo ramp_lane.launch
  1. Launch the 3D localization and navigation using the 3D_nav_simulation.launch
  • roslaunch igvc_navigation 3D_nav_simulation.launch
  1. Launch rviz and display ground truth from the topic /ground_truth and display the slam estimate from the topic /odometry/filtered

Test Case 2

  1. Set yaw angle in ramp.launch file to a non zero number
  2. Launch ramp_lane.launch
  • roslaunch igvc_gazebo ramp_lane.launch
  1. Launch the 3D localization and navigation using the 3D_nav_simulation.launch
  • roslaunch igvc_navigation 3D_nav_simulation.launch
  1. Launch rviz and display ground truth from the topic /ground_truth and display the slam estimate from the topic /odometry/filtered

Test Case 3

  1. Launch autonav.launch
  • roslaunch igvc_gazebo autonav.launch
  1. Launch the 3D localization and navigation using the 3D_nav_simulation.launch
  • roslaunch igvc_navigation 3D_nav_simulation.launch
  1. Launch rviz and display ground truth from the topic /ground_truth and display the slam estimate from the topic /odometry/filtered

Expectations for test cases:

  1. Slam estimate matches the ground truth.
  2. Robot is able to go over ramps.
  3. No noise on the costmap. Should not be like this.

Self Checklist

  • I have formatted my code using make format
  • I have tested that the new behavior works

andrewyarovoi and others added 30 commits November 24, 2019 23:01
The wheel radius was accidentally set to the wheel diameter causing the robot to move slowly. This commit will change the param to its correct value.
@VAM7686 VAM7686 linked an issue Jul 27, 2021 that may be closed by this pull request
@VAM7686 VAM7686 marked this pull request as ready for review September 2, 2021 01:31
isam_.getFactorsUnsafe().print();
#endif

result_ = isam_.calculateEstimate();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I should be using calculateBestEstimate() instead

Comment on lines +164 to +165
(gtsam::Vector(6) << g_xVar, g_yVar, g_zVar, g_thetaVariance * 2, g_thetaVariance * 2, g_thetaVariance)
.finished()));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is the proper way to initialize the noise matrix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate SLAM into navigation stack Migrate to doing localization in 3D
3 participants