-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Recording a bag file for catographer #726
Comments
I'm going to summarize what I went through to initially make this work for me. It may not be a 100% correct procedure, but it's working for me. You need to have a TF tree connecting To start, you can try to make a map using gmapping. If you can do that, then just record the Odom, IMU, Laser, TF and TF Static topics to your bag (locally on the robot, not your PC). If you recorded while making a map with gmapping for some visualization, then you need to remove the /map to "some_frame" TF from the bag, or there will be conflicts when you run cartographer. You can do that using this script: https://github.com/srv/srv_tools/blob/kinetic/bag_tools/scripts/remove_tf.py (cartographer has something similar for online as Now with your bag just play around with the config file, and also run Finally, if you will run cartographer offline (bag batch processing), do not forget to set |
Tracking frame is not odom, ever! If using an IMU, it has to be collocated with the IMU frame. In other cases, it is usually set to |
@ojura Right; edited my comment |
One more detail:
This is done by cartographer, not the user. Cartographer publishes the map to tracking transform. What you need to have is a complete tree from the tracking frame to sensor frames. |
😄 I don't exactly know what your plans are, but it sounds like you're using a drone? Just a single 2D Hokuyo will very likely give you bad results. At least the IMU shouldn't be optional but this won't give altitude. |
Thank to all of you to help me! |
I would just like to add to @MichaelGrupp’s that imu to tracking doesn‘t have to be identity - only rotation is ok (they are still collocated). |
…r-project#729) I noticed that @jihoonl opened the PR cartographer-project#726 which performs a similar thing. As discussed in cartographer-project#613 (@cschuet has already taken a look), I pulled this out of cartographer-project#481 (a really old PR whose merging has been postponed), which is an example where re-running optimization is triggered from elsewhere as well (besides from `ComputeConstraintsForNode`). This refactoring makes libcartographer friendlier for use cases such as that one. An important detail is that I have changed the condition in `WaitForAllComputations` to also check if the work queue is empty. If there are other things on the worker queue besides `ComputeConstraintsForNode`, currently we will wrongfully conclude that all computations are done. (This detail was merged in cartographer-project#754, so it's no longer in the diff of this PR). Also missing is the same thing for 3D. I can add that when we settle on this. Also, I suggest that `run_loop_closure` gets renamed to `run_optimization`.
So, I need a bag file with good laser scan data (I have an hokuyo lidar with urg_node) and optional IMU data (I have /mavros/imu/data and /mavros/imu/data_raw from pixhawk). I also have /mavros/odometry/odom from pixhawk.
Do I need to define TF, too?
Recording a bag file with that topics is all I need to run cartographer in my PC?
I would like to go to the river and record a bag file and later run cartogrpher on my PC.
Thank
The text was updated successfully, but these errors were encountered: