-
Notifications
You must be signed in to change notification settings - Fork 856
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
navsat_transform documentation diagram #550
Comments
Admittedly, I haven't used navsat transform before nor have I used R_L for global fusion. I just spent the last 45 minutes reading the source code to understand and demo what is happening. Frankly, this is something I should have done a long time ago so your question nudged me to figure it out. Way to help me procrastinate figuring out my optimization problem issues 😉. I've come up with the following, of which the most important parts are:
I'm going to assume you understand the left hand side with the usual On the righthand side, we have the raw sensor data for odometry (IMU, VIO, wheel encoders, etc) and the raw GPS data. We feed the raw GPS and IMU for heading information into the navsat transform. We also require the global The "first" global filtered odometry from the EKF on the righthand side will just give you back out the identity pose. The EKF will dish out a filtered output at the given frame rate even if nothing else is valid. The question that's unclear to me is that before the GPS comes in, all the IMU/odometry will probably be just dropped because you can't convert from the When the NavSat transform gets some new data from Basically means that at any given time, there's a strong chance for impedance mismatches because the filter is updating at 30hz, lets say, and all of them are being thrown out except 1 if your GPS updates at 1 hz, lets say. Then the filter is propogating 1 second old data until you get an update, etc. As long as these are both running at similar rates, there's not much loss of data, but certainly there's opportunity for it.
This is the ROS community, we're good at making stuff, not documenting stuff 😉 sometimes you just have to read the source code. Its only ~1000 lines and 2-3 threads... |
@mabelzhang We fuse the |
So I'll also take a crack at explaining this. There are a lot of moving pieces, I'll admit, and perhaps there's an opportunity to simplify it all. Steve hit a lot of the main points, but I'll just clarify where I can. First, like Steve, I'll assume that the odom/continuous EKF is straightforward. We fuse continuous data sources in it. Before we move to the map/global EKF, we'll talk through what's required to turn GPS data into data that can be fused into your EKF. For this scenario, we'll assume that we have a robot with wheel encoders, an IMU (with a magnetometer), and a GPS device. Also, in this scenario, our robot will start out inside a GPS-denied area, and then move outside into a GPS-friendly location. We're interested in a transform from lat/long coordinates to our robot's map/global frame. I didn't want to deal directly with lat/longs, so the first thing
Once I think you could also drop the odometry sub at this point (but we don't...d'oh), unless you have publish_filtered_gps turned on. That option makes In any case, you can see the circular dependency: There are a number of parameters to change this behavior. For example, if you are fusing a UTM-friendly heading into your map/global EKF, then you can get the required heading for (2) from the same data that you get in (1). That's why we have the use_odometry_yaw parameter. If anyone is interested in doing so, I think the logic from In any case, @mabelzhang, your diagram looks correct to me. |
From looking over it, every time a GPS signal is received, it sets a flag to get a new Ekf Global pose. That would be required for the setting to use heading based on EKF and not the IMU. I could also imagine the requirement for a feedback loop also if you have multiple GPS or multiple global reading sensors |
https://docs.swiftnav.com/wiki/ROS_Integration_Guide Swift nav also has a decent diagram. |
Thank you everyone for the explanations! I finally read everything here and understood what's going on. Swift Nav indeed has a very nice diagram. Since I can't steal it and it'd be nice for the tutorial in this repo to be standalone, I made another in the PR. |
* navsat_transform diagram to address #550 (#570) * add diagram for navsat_transform Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * add diagram to tutorial Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * Fix frame id of imu in differential mode, closes #482 * Added local Cartesian option to navsat_transform * Fix navsat_transform issue with starting on uneven terrain * Fix typo in navsat_transform_node.rst (#588) "prodives" -> "provides" * Fix sign error in dFY_dP in transfer function jacobian * Making repeated state publication optional (#595) * PR feedback * Fixing build issues * Fixing stamp issues * Linting and uncrustifying Co-authored-by: Mabel Zhang <mabel.m.zhang@gmail.com> Co-authored-by: Jeffrey Kane Johnson <jeff@mapless.ai>
* navsat_transform diagram to address cra-ros-pkg#550 (cra-ros-pkg#570) * add diagram for navsat_transform Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * add diagram to tutorial Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * Fix frame id of imu in differential mode, closes cra-ros-pkg#482 * Added local Cartesian option to navsat_transform * Fix navsat_transform issue with starting on uneven terrain * Fix typo in navsat_transform_node.rst (cra-ros-pkg#588) "prodives" -> "provides" * Fix sign error in dFY_dP in transfer function jacobian * Making repeated state publication optional (cra-ros-pkg#595) * PR feedback * Fixing build issues * Fixing stamp issues * Linting and uncrustifying Co-authored-by: Mabel Zhang <mabel.m.zhang@gmail.com> Co-authored-by: Jeffrey Kane Johnson <jeff@mapless.ai>
Feature request
Feature description
We were trying to use
navsat_transformation
withekf_node
s for localization, and we had a lot of trouble figuring out how the nodes should be set up from the existing documentation. We have been following this answer from Tom on ROS Answers, and the circular dependency between the second EKF node and the navsat_transform node didn't quite make sense to us.So we thought a clear diagram in the documentation would help future users set it up easier.
Implementation considerations
@clalancette came up with the following diagram of the setup. We're thinking it would be good to add something like it to the navsat_transform_node documentation page
Could we get some feedback as to whether this is the correct understanding of how these nodes are supposed to work together?
If the maintainers think this is useful to have in the documentation, let us know what requirements there are for diagrams / images, and I can submit a PR after we get this right.
The text was updated successfully, but these errors were encountered: