Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Covariance definition in test_Pose3SLAMExample.py #1793

Open
gogojjh opened this issue Aug 10, 2024 · 2 comments
Open

Covariance definition in test_Pose3SLAMExample.py #1793

gogojjh opened this issue Aug 10, 2024 · 2 comments

Comments

@gogojjh
Copy link

gogojjh commented Aug 10, 2024

Description

gtsam/python/gtsam/tests/test_Pose3SLAMExample.py: Is it something wrong wit the the definition of covariance (line 33):

covariance = gtsam.noiseModel.Diagonal.Sigmas(np.array([0.05, 0.05, 0.05, np.deg2rad(5.), np.deg2rad(5.), np.deg2rad(5.)]))

According to the definition of noisemodel for Pose3, the correct definition should be

covariance = gtsam.noiseModel.Diagonal.Sigmas(np.array([roll_std, pitch_std, yaw_std, tx_std, ty_std, tz_std]))

i.e.,

covariance = gtsam.noiseModel.Diagonal.Sigmas(np.array([0.05, 0.05, 0.05, np.deg2rad(5.), np.deg2rad(5.), np.deg2rad(5.)]))
@gogojjh gogojjh changed the title Wrong definition of test_Pose3SLAMExample.py Covariance definition in test_Pose3SLAMExample.py Aug 10, 2024
@varunagrawal
Copy link
Collaborator

Hi @gogojjh. Did you mean the noise model should instead be the below?

covariance = gtsam.noiseModel.Diagonal.Sigmas(np.array([np.deg2rad(5.), np.deg2rad(5.), np.deg2rad(5.), 0.05, 0.05, 0.05]))

I believe you are correct since the Logmap(Pose3) returns [rot, trans]. Would you like to create a PR for this and I can review and merge it?

@gogojjh
Copy link
Author

gogojjh commented Aug 24, 2024

Sure

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

No branches or pull requests

2 participants