-
Notifications
You must be signed in to change notification settings - Fork 580
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
The map transformation induced by Markers/Priors is wrong/jumps around #867
Comments
I think the marker priors are wrong. If we set By mouse over the nodes in Graph view, we can see that the markers are located at (
Converting your tags location from world frame to ROS frame (x->forward, y->left, z->up), we would get:
Here the new optimized map with those parameters (note that the map frame is not anymore on the first node of the graph):
This is closer, though Z values ar off as the whole map is a little tilted. I see Beware when you rotate, you may skew the lidar, which makes difficult for ICP to compute the real motion: |
Hello Mathieu, thank you so much. The Priors are working now. I didn't know that I still have to transform it into the ROS coordinate system, but of course that makes sense. What do I have to do to keep a user-defined coordinate system? Can I transform the axes based on my lab coordinate system? The origin of the coordinate system is now correct, but how do I get the correct directions for the axes? Is this possible in rtabmap with markers/priors or do I have to change this manually? Regarding the Z value issues:
How do I force 3DOF on Odometry, in order to fix the issue with the z values and also get better graph optimization?
How did you manage to get this output for debugging? Is this in RViz or RTABMap Viewer?
Thank you for these examples. |
In If you are using rtabmap's odometry nodes, you can set If you want to transform the whole map in your user coordinate frames other than ROS frame, that would be done outside ROS after exporting the cloud. I would suggest to stick with ROS standards (REP105) to avoid issues with all ROS packages. |
Hello Mathieu, thank you for clarifying! I will close this issue as soon as I have gone through everything again to check if I have no more questions. Best regards |
Hey Mathieu, sorry for reopening this again - just to be clear: Marker/Priors only does the translation part of the transformation but not the rotation? Is that true? |
Alternatives I considered:
|
The priors should be in ROS coordinate frame. If you want an arbitrary world frame with Y up, you can add a static transform publisher between
The priors can make the whole map rotate. For example with:
I think the problem in your case is that the Priors are not using the same coordinate frame than the odometry (which uses x->forward, y->left, z->up by default). If you transform the odometry in your world frame, you may use the priors as you set them. The |
Hello Mathieu! I know this may be really ergent. But is there a way to export the tag's information out? Like their id, xyz and facing data from the graph view together? Rather than mouse over. @matlabbe |
If you are using ROS:
With the standalone, we would need to add an option in the Export poses... menu action so that tags could be added but with 0 timestamps. |
@matlabbe Thanks for your timely reply! Does this mean that I need to launch rtabmap.launch to start the node and also start rostopic echo /rtabmap/mapGraph and rosservice call /rtabmap/publish_map 0 1 1 ? Could I directly using some command to export the tags location from the standalone program? Update: |
See introlab/rtabmap#1199 for standalone, new option has been just added. For ROS, a complete example would be:
Output of the echo (landmarks have negative ids):
|
Hello!
Everything is working fine now without
Marker/Priors
— markers get detected and added to the map. Unfortunately, when I activateMarker/Priors
, the transform betweenmap
andodom_frame
jumps around.Coordinate setup
These are the global coordinates of the test environment with the coordinate origin measured (

x
pointing away fromtag1
,z
pointing towardstag2
andy
is pointing up to the ceiling:Parameter used in launch file
In order to set these global coordinates, I used the following
Marker/Priors
parameter value (assuming that tags have the coordinate system described in https://github.com/AprilRobotics/apriltag/wiki/AprilTag-User-Guide#coordinate-system:That's why I calculated the global coordinates/angles for the transformations between my coordinate system origin in the lab environment and the Apriltags coordinate system. (Is this right?) In my opinion this defines the correct coordinates/orientations in the global coordinate system respecting the
Apriltag
coordinate system, right?Output
Unfortunately, the coordinate origin is wrong in the resulting map and it jumps around whenever
tag2
is found and immediately back at the time oftag1
detection. This means the relative position/orientation between both tags is wrong, but I confirmed that I'm using the right global coordinates/orientation — see also this video here ofRViz
output that visualizes this problem:rviz_roslaunch_rtabmap_markerdetect_2.mp4
As soon as marker 2 gets detected, the transform changes completely. (unfortunately this recording does not stop at the marker, because while being stopped the marker was not fully visible for the camera, that's why it only gets detected in a moving state which probably also degrades accuracy but it shouldn't jump that much).
Database file
Microsoft OneDrive - rtabmap.db (https://1drv.ms/u/s!AhXLzuMKDjgkx2wcoJRv_osdQYsc?e=n8sZCi)
Best regards
Martin
The text was updated successfully, but these errors were encountered: