-
Notifications
You must be signed in to change notification settings - Fork 917
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
Child Frame of Odometry Messages is ignored #726
Comments
Please ask this as a question in answers.ros.org or robotics.stackexchange.com. When you do, please include your full configuration and a sample input message from every sensor input. I'm sceptical that there is a bug here, but regardless, this process should start with a question on one of those forums. Thanks. |
Hmm, I could do that. Still, please give it a thought since I read the code and can see the error there:
The line numbers might be off by a little since I fixed it already (my fix is basically just passing the childFrame) Do you still think, I should open a question somewhere? Then I would do it... |
I will need to read the code, but aren't we transforming the pose data into the target frame (e.g., |
Oh, you're measuring pose data from a sensor that is on the robot and has a non-zero transform from the robot origin. This is not a use case that is well supported by the package. Pose data needs to have a direct transform from the world frame of that pose data to your world frame (so You can hold off on asking the question. I'll reopen this and look into what you're saying, but I am concerned that we'll break other use cases if we change that. |
I see. Thanks for having a look. I checked my fix against various types (we got an autonomous driving car and have a complex sensor setup). The fix should only change the behaviour in the desired situation. I tried to build it such that everything else should compute as before |
It would still be helpful to see the configs, sensor data, and static transform, if that's possible. |
Sure, I'll prepare a minimal example that shows the effect |
So, I managed to create a minimal example (stripped down our car setup). Here it is: The launch files load a urdf that shows (part of) our vehicle frames. Then, it starts the robot_localization. The localization comes with a yaml file containing the config. Here I stripped it down to odometry that contains both, a pose (from a slam system) and a twist (from an IMU). I created two versions: _relative and _diff that differ by running the robot_localization in relative mode and differential mode, respectively. In both cases, the error is of the same nature: forgetting the child frame of the odometry message. localization_relative.launch
localization_relative.yaml
vehicle.urdf.xacro
The bug yields the following behavior: Now, a similar thing happens with the differential setting. localization_diff.launch
localization_relative.yaml
In the pictures, I also included the car, so it's easier to see it going sideways. You can find a stripped down bag file that contains the sensor data to these pictures here: |
I just opened a PR to see if your CI is running. |
I've been subscribed to this repository for a while. I think I've seen this (kind of) request every now and then. I think the reason it is not implemented is that it creates a loop? To do a TF lookup of the child frame, one needs the orientation of the vehicle. But this data is also used to determine that orientation. Only exception is the imu, as that sensor provides it's own orientation and can be calculated back to base_link using only this sensor. Note: I'm not a maintainer here, just stating my thoughts, if it can be fixed/added anyhow I'm happy! |
@Timple Actually it doesn't. You can remove the IMU from the example I provided and it still works. The lookup of the child frame only concerns the orientation relative to the base_link, which shall be static. Hence, the orientation of the vehicle is not necessary in this case. |
@frygge can you show me a sample input message from the odometry data? I don't have the cycles to pull the bag right now. The thing that concerns me is that in ROS, the In any case, this is why I wanted to see a sample message. If it's not too much trouble, that would be helpful, thanks. |
Oh, also, can I see your tf tree? Thanks. |
Sure, here's an example of our /gps/imu topic:
An example of our /alb/odometry message:
The odometry message does (in this case) contain no twist. However, I assume that the pose shall be interpreted as pose between the header frame and the child frame (odom -> alb_sensor_frame in this case). Others of our odometry messages do indeed contain a twist (and meaningful cov) as well. |
I see what you're doing in the PR (thanks for that), and I don't know that I'd call this a bug as much as a new feature. Re-labeling. |
Ahh, OK. Then I think misunderstood the documentation: http://docs.ros.org/en/melodic/api/robot_localization/html/preparing_sensor_data.html, 2nd bullet point under "Common errors" says that velocities get transformed to the base_link. I thought this is true even if they come from the odometry message with differential enabled. |
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
Actual behavior
Additional information
The text was updated successfully, but these errors were encountered: