Skip to content
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

Lines display strangely #1287

Open
Zander-yang opened this issue Aug 30, 2018 · 21 comments
Open

Lines display strangely #1287

Zander-yang opened this issue Aug 30, 2018 · 21 comments
Labels

Comments

@Zander-yang
Copy link

After I publish strip lines to rviz, the lines sometimes are blurry until the cursor slide over them. Is that a bug of rendering? There is a video in the zip. It's obviously at the beginning and end.
Looking forward to any replies. Thanks a lot.
slide over.zip

@rhaschke
Copy link
Contributor

Could you provide a bag file and rviz config to easily reproduce this issue?
I never observed something like this.

@mmurooka
Copy link

I got the sample problem.
Please unzip the attached file and run the following commands:

rosbag play rviz_issue_1287.bag -k
rviz -d rviz_issue_1287.rviz

rviz_issue_1287.zip

LINE_STRIP marker is published and displayed in Rviz. In the "Move Camera" mode in Rviz, the marker disappears when changing the viewpoint. In the "Interact" mode, the marker disappears but it reappear if the mouse cursor goes close to the marker.
rviz_issue_1287_20200819

My environment: Ubuntu16.04.1 / ROS Kinetic. Rviz is built from source and its version is 1.13.12. I also install ogre from source to fix this issue and its version is 1.9.1.

@rhaschke
Copy link
Contributor

Thanks for providing the bag file. I cannot reproduce this issue with a recent rviz (latest Melodic release).
Could you try to build the latest melodic-devel release and check with it?
Note, that you also need to build the melodic-devel branches of TF1 and TF2 within your workspace to do so.

@mmurooka
Copy link

I tried with the melodic-devel (the following catkin workspace) and the same problem still happens..

$ wstool info -t src
workspace: /home/mmurooka/ros/ws_rviz_melodic/src

 Localname S SCM Version (Spec) UID  (Spec)  URI  (Spec) [http(s)://...]
 --------- - --- -------------- -----------  ---------------------------
 rviz        git melodic-devel  2b31dc4be241 github.com/ros-visualization/rviz.git
 geometry2   git melodic-devel  9b8022c30304 github.com/ros/geometry2.git
 geometry    git melodic-devel  0712a2cb808c github.com/ros/geometry.git

rviz-line-marker-with-melodic-devel

@rhaschke
Copy link
Contributor

Ok. Need to find a machine with older Xenial + Kinetic to test this tomorrow. But, I'm afraid the problem is related to your OpenGL lib. Could you please provide info on that (e.g. from rviz cmdline output).

@mmurooka
Copy link

provide info on that (e.g. from rviz cmdline output).

$ rviz
[ INFO] [1597888033.177879502]: rviz version 1.13.13
[ INFO] [1597888033.177934022]: compiled against Qt version 5.5.1
[ INFO] [1597888033.177951527]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1597888033.183421668]: Forcing OpenGl version 0.
[ INFO] [1597888033.901239841]: Stereo is NOT SUPPORTED
[ INFO] [1597888033.901307701]: OpenGl version: 4.6 (GLSL 4.6).

@rhaschke
Copy link
Contributor

I still cannot reproduce the issue, even on a Xenial/Kinetic setup. I guess, we have to blame a different version of OpenGL libs.
See also #1508 and try rviz --opengl 300.

@mmurooka
Copy link

I tried --opengl 300 and --opengl 210, and the issue was reproduced in all cases..
rviz-opengl-300

@rhaschke
Copy link
Contributor

Sorry, then I don't have any more ideas.

@rhaschke rhaschke added the opengl label Feb 6, 2021
@martinakos
Copy link

martinakos commented Apr 25, 2022

Any progress on this? or workarounds? I have a simple visualization with LINE_LIST Markers and I can only see the lines in Rviz from some viewpoints. From other viewpoints the lines are not rendered, despite they should be visible.
I'm using Noetic. The --opengl 300 and --opengl 210 options didn't solve the issue.

@rhaschke
Copy link
Contributor

I wasn't able to reproduce the effect so far. I you can in Noetic, please provide a yaml or rosbag with a corresponding marker message to reproduce the issue.

@martinakos
Copy link

martinakos commented Apr 25, 2022

I attach a zipped rosbag. If you unzip it you have:
$ rosbag info test2.bag
path: test2.bag
version: 2.0
duration: 0.0s
start: Apr 25 2022 14:42:36.37 (1650894156.37)
end: Apr 25 2022 14:42:36.37 (1650894156.37)
size: 12.7 KB
messages: 1
compression: none [1/1 chunks]
types: visualization_msgs/MarkerArray [d155b9ce5188fbaf89745847fd5882d7]
topics: /line 1 msg : visualization_msgs/MarkerArray

if you play it with -k and add the marker in rviz, set fix frame to /world, then I can see the line in green from some angles but not from others.

test2.zip

@martinakos
Copy link

martinakos commented Apr 26, 2022

Another weird effect I've just realised: This is for another drawing with multiple lines. The lines don't render from certain view angles, but if I pass the mouse pointer over the unrendered lines while having the "interact" or "focus camera" tools selected the l lines under the mouse pointer are then redrawn and I can see them. This doesn't happen with "move camera" or "select" tools, ie. even if I move the cursor over the unrendered lines the line don't get drawn. This suggest to me that it may be an issue with the drawing event logic.

@martinakos
Copy link

I see the LINE_LIST markers are drawn as flat tapes!! for a moment I thought that was because I was only setting scale.x and ignoring scale.y and scale.z. But after setting these nothing changed. In fact in the documentation says: "Line lists also have some special handling for scale: only scale.x is used and it controls the width of the line segments.". With width here I interpreted thickness of the line (as if the line was a cylindrical tube), but it's literally width of the tape, with thickness being apparently zero. I think the disappearing lines issue is because the visibility of the tape is fine when looking orthogonal to the width of the tape but when looking from the side the tape has zero thickness and it disappears.

Could the LINE_LIST be reimplemented as a cylindrical tube rather than a flat (zero thickness) tape?

@martinakos
Copy link

Maybe related #987

@tigelbri
Copy link

tigelbri commented May 9, 2022

I have the same issue. on some view angles the line is not rendered.

@rhaschke
Copy link
Contributor

I am able to reproduce the issue. All line strips essentially employ Ogre::BillboardChain to show a line that should always face the camera. However, this mechanism doesn't work for some reason. When moving the camera, the new camera pose isn't considered when drawing the BillboardChain.
In the Interact mode the camera pose is updated (and the line correctly displayed again) as soon as the mouse gets close to the line strip (into the bounding box?). This is related to the SelectionManager rendering the scene into a RenderTexture:

render_texture->update();

@rhaschke
Copy link
Contributor

rhaschke commented May 28, 2022

The bug stems from OGRE 1.9. Updating to OGRE 1.12 resolves the issue.
Still doesn't work in OGRE 1.12.4. It is more important to not publish (and thus update the BillboardChain) regularly.

@rhaschke
Copy link
Contributor

rhaschke commented Jun 4, 2022

Trying to reproduce the issue once again, I first failed. Looks like the issue only occurs if the marker is not published regularly.
Or, phrased the other way around, a regular message updates the billboard line.

@rhaschke
Copy link
Contributor

rhaschke commented Jun 9, 2022

This issue was fixed in OGRE 13.4.1: OGRECave/ogre#2493
It won't fix for ROS1 anymore, as we are stuck with OGRE 1.9.0.

One can work around the issue by regularly updating the line strip marker.

@jstmn
Copy link

jstmn commented Sep 1, 2023

experiencing this issue as well with ros noetic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants