-
Notifications
You must be signed in to change notification settings - Fork 212
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
laser scans not showing when fixed frame is not equal to the laser scans frame id #332
Comments
The main problem seems to be a missing transform. Could you publish a static transform from [world] to e.g. [single_rrbot_hokuyo_link] (or any tf frame of the robot)? I'll have to update my ros2 installation again before I can reproduce. The TF display should also show this, are there any warnings with fixed frame [world] or [single_rrbot_hokuyo_link]? The current behaviour is that we only show displays if there is a transform available between the fixed frame and the frame of the part to show (i.e. The same is probably true for the laser scan display. The behaviour that I want is that it also shows the same status error (and prints to the console). This should have been done in #292 but the laser scan display wasn't touched, so I missed it. |
There are correct transforms from world to the laser frame, but they’re not all static transforms. This use case should work and it did work in the past, I used this demo before to show the laser scans moving at the end of the tf tree which waving back and forth. |
But I don’t know what the root cause is. I’ll look into when I get time if you guys can’t reproduce it. |
That should be okay, yes. I've seen the dummy robot in the past, too, but I can't run the launch file currently (probably have to update my installation). We'll definitely look into it on Monday. But when the map frame prints out "error transforming" then we must hit this line:
|
I updated my ros installation and can now reproduce. In the debugger, the error thrown that leads the map (or LaserScanDisplay) to not show anything is here: I get several different errors (not sure when I get which errors). When map is not showing, I get So to me, this seems to be either a bug in TF or the robot doesn't publish its transforms correctly. I also sometimes get a flickering laser scan (including a map) with the errors: If I remember correctly, this is a problem in In RViz, here is what we should do:
|
After a few more tries and working a bit more with logging, I can get a consistent picture: The problem is indeed the error message
So it's a mismatch of transformation data. From my understanding, this was previously handled by message filters, which would allow a certain tolerance to deal with transforms (see https://answers.ros.org/question/217429/use-cases-for-tfmessagefiltersettolerance/). Since message filters aren't available yet the tolerance feature had to be disabled (see the TODO here: rviz/rviz_default_plugins/src/rviz_default_plugins/displays/laser_scan/laser_scan_display.cpp Line 62 in 6b0d290
What I don't understand though is that the map is also not displayed (extrapolation into the future) if my fixed frame is the The three bullet points in my previous message still apply. |
FYI, I can't see the laser data on rviz2 even if the fixed frame is the same as the frame_id of node of laser scanner. |
@robotpilot we need more info for that to be useful information (it might be a different issue). Which version of ROS 2/rviz are you using and are there any messages on the console that indicate a problem? |
[Case 1]
I am also in the same state as you. The laser scans not showing when fixed frame is not equal to the frame_id of laser scans. In addition, setting the fixed frame to world, single_rrbot_link1, and single_rrbot_link2 did not show the laser value. So I set it to single_rrbot_link3, single_rrbot_camera_link, single_rrbot_hokuyo_link, and I could see the laser value at rviz2. [Case 2]
I can't see the laser data on rviz2 even if the fixed frame is the same as the frame_id of topic of /scan. The status of rviz2 is |
[case 3] FYI, I have only run
|
[successful case] I hope this test will help you with your work. Based on the comments mentioned above, I ran the
|
The error persists in crystal as well. This would probably be fixed after this PR is merged. I could get Laser scans and Map in both the frames after implementing message filters. |
Since #375 has been merged, following the steps to reproduce, I can now see the laser scan in all frames. But, I am unable to see the map when switching to the frames that are not static wrt I get the error:
|
@jacobperron @wjwwood do you think the map display issue should be tracked as a new issue, and this one closed out since the specific case of "laser scans not showing" has been resolved? |
I mean we can close this and open a new one, but the issue @jacobperron is describing makes me think that there is some lingering issue with #375... It should not even try to extrapolate into the future, in fact the data should never be delivered unless it could be transformed without extrapolation. |
Ok! Just wanted to make sure we were tracking the right thing |
Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. Resolves #332 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
See #483 for a fix. |
Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. Resolves #332 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. Resolves #332 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. Resolves #332 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
I see this on Ubuntu 18.04 with the bouncy deb binaries.
Steps to reproduce:
ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.py
rviz2
/scan
/map
world
You'll see the map and the tf frames moving, but no laser scan. If you look at the laser display you'll see that the status is
Ok
, but the Points field just saysShowing [0] points from [0] messages
and it is not rendered. I would expect it to be rendered.If you change the fixed frame to
single_rrbot_hokuyo_link
you can see the laser scans and the status adds theTransform: Ok
status. However, the map no longer renders and prints to the console[ERROR] [rviz2]: Error transforming map 'Map' from frame 'world' to 'single_rrbot_hokuyo_link'.
and it also sets a similar message,Could not transform from [world] to [single_rrbot_hokuyo_link]
in the status part of the map display.My expectation is that both the laser and map should work in either (or any) fixed frame.
The text was updated successfully, but these errors were encountered: