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

questions about test result #8

Open
BIT-TYJ opened this issue Apr 11, 2022 · 4 comments
Open

questions about test result #8

BIT-TYJ opened this issue Apr 11, 2022 · 4 comments

Comments

@BIT-TYJ
Copy link

BIT-TYJ commented Apr 11, 2022

Hello, I have some questions about the testing datasets.
First, for dataset in /data/example_2robots, why are the serial numbers of vertexs in both 0.g2o and 1.g2o not continuous? And how does the optimized results sort the vertexs of two robots?
Second, I have tried to make a two robot dataset as follows:
for 0.g2o:
VERTEX_SE3:QUAT 1 0 0 0 0 0 0 1
VERTEX_SE3:QUAT 2 0 0 0 0 0 0 1
VERTEX_SE3:QUAT 3 0 0 0 0 0 0 1
VERTEX_SE3:QUAT 4 0 0 0 0 0 0 1
EDGE_SE3:QUAT 1 2 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 2 3 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 3 4 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 1 3 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 3 6 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 3 5 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
for 1.g2o:
VERTEX_SE3:QUAT 5 0 0 0 -0.7071067811865475 0.0 0.0 0.7071067811865475
VERTEX_SE3:QUAT 6 0 0 0 -0.7071067811865475 0.0 0.0 0.7071067811865475
VERTEX_SE3:QUAT 7 0 0 0 -0.7071067811865475 0.0 0.0 0.7071067811865475
VERTEX_SE3:QUAT 8 0 0 0 -0.7071067811865475 0.0 0.0 0.7071067811865475
EDGE_SE3:QUAT 5 6 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 6 7 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 7 8 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 3 6 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1
EDGE_SE3:QUAT 3 5 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1

The output from terminal is
"Graph is disconnected:
Copying initial to optimized"

Looking forward to your reply! Thank you very much!

@itzsid
Copy link
Collaborator

itzsid commented Apr 12, 2022

Hi @BIT-TYJ,

All the vertices corresponding to the first robot will be prefixed using 'a' using gtsam.Symbol like gtsam.Symbol('a', 1), gtsam.Symbol('a',2) etc. Similarly the second robot will be prefixed using 'b' like gtsam.Symbol('b', 1), gtsam.Symbol('b',2). Code extracts the robot prefix to know which robot the vertex belongs to. You should use the same format and see if it works.

@BIT-TYJ
Copy link
Author

BIT-TYJ commented Apr 12, 2022 via email

@BIT-TYJ
Copy link
Author

BIT-TYJ commented Apr 12, 2022 via email

@itzsid
Copy link
Collaborator

itzsid commented Apr 12, 2022

@BIT-TYJ, you will have to create a GTSAM graph and write to a g2o file. You can checkout: https://gtsam.org/tutorials/intro.html on how to create GTSAM graph. Look at this example on how to write to g2o file: https://github.com/devbharat/gtsam/blob/master/examples/Pose2SLAMExample_g2o.cpp

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