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

Fix: issue #1220. #1236

Closed
wants to merge 2 commits into from
Closed

Conversation

chama1176
Copy link
Contributor

Fix: issue #1220.

The stl loader has been changed in PR to refer to that of ROS1.
However, the material setting part of stl is missing, which is causing issue #1220 where colors are not displayed correctly.

Therefore, I created a modified PR by referring to the ROS1 code
https://github.com/ros-visualization/rviz/blob/fdcf656aa5d9816bf7c06a533f8224ec28bd6e0f/src/rviz/mesh_loader.cpp#L445-L456

@chama1176 chama1176 requested a review from ahcorde as a code owner July 12, 2024 08:27
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind to retarget the PR to rolling ? then I can backport this to the other distros.

@firesurfer
Copy link

Hi @chama1176

One question regarding the PR. Does it actually restore the before behavior -> In case a material is set in the URDF the material in the URDF is used, otherwise use the default material?

@chama1176
Copy link
Contributor Author

@ahcorde
Thank you for your comment!
We will close this PR and create a new PR for Rolling.

@chama1176 chama1176 closed this Jul 12, 2024
@chama1176
Copy link
Contributor Author

chama1176 commented Jul 12, 2024

@firesurfer
Probably Yes. In my environment,
In case a material is set in the URDF the material in the URDF is used, otherwise it will show up in red.

@chama1176 chama1176 mentioned this pull request Jul 12, 2024
@manadaniel
Copy link

Thanks for the fix! Unfortunately I am still getting the following errors which makes my log kind of unusable (constant log output).

[rviz2-3] [ERROR] [1721749218.192680538] [rviz2]: Can't assign material Shape18906Material to the ManualObject MeshShape_ManualObject17738 because this Material does not exist in group General. Have you forgotten to define it in a .material script?

With Iron and Humble there weren't any of these errors - at least not shown in the log. Despite the error messages, the object meshes are drawn correctly (shape from .stl and color as defined in applyCollisionObject using moveit2). Any help is appreciated!

@chama1176
Copy link
Contributor Author

@manadaniel
Are you building from source? Which commits are you using?
And which URDF do you use?

In my environment(Jazzy) the problem is fixed in 14.1.3 (c9f2005).
Here is the URDF I am using
https://github.com/rt-net/sciurus17_description/tree/feature/support-jazzy?tab=readme-ov-file

@manadaniel
Copy link

@chama1176 sorry for not providing the details. Here they are:

  • Ubuntu 24.04
  • ROS2 Jazzy Debian Packages installed via apt
  • Currently installed rviz2 version: ros-jazzy-rviz2/noble,now 14.1.3-1noble.20240719.202006 amd64 [installed,automatic]

So the version installed is 14.1.3 which includes the before mentioned fix. Maybe it actually does fix your problem @chama1176 (not showing the material). My case might be related but slightly different: the objects producing the continuous rviz2 log errors are not defined in a URDF but added as collision objects using moveit2 packages. And they continue to produce the logging errors with the updated rviz2 version 14.1.3 .

I am guessing here, but it seems that it kind of generates materials (like "Shape18906Material" from log output cited above) counting upwards the whole time and it looks for this material in some group "General" which I am not familiar with.

Any ideas?

@chama1176
Copy link
Contributor Author

@manadaniel
Thank you for the detailed explanation
Your situation is slightly different from the error I fixed.

It sounds like the situation is similar to the original Issue #1220 (which I thought was the same as I fixed), but I don't have a solution that I can offer right away 🙇

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

Successfully merging this pull request may close these issues.

4 participants