Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

[Humble] Gazebo logs error for ogre on startup. #386

Open
ooeygui opened this issue Nov 28, 2022 · 4 comments
Open

[Humble] Gazebo logs error for ogre on startup. #386

ooeygui opened this issue Nov 28, 2022 · 4 comments
Assignees
Labels
bug Something isn't working Gazebo Humble Bugs and Features related to humble Install Location Any issue having to do with installing outside c:\opt ROS2 ROS2 related issues
Milestone

Comments

@ooeygui
Copy link
Member

ooeygui commented Nov 28, 2022

Describe the bug
During Gazebo startup ign gazebo shapes.sdf gazebo generates an error:

[GUI] [Err] [D:\a\_work\1\s\gz_ws\src\gz-rendering\ogre\src\OgreRenderEngine.cc:468] Unable to load Ogre Plugin[c:\opt\ros\humble\x64\bin/RenderSystem_GL]. Rendering will not be possible.Make sure you have installed OGRE properly.

Although this seems to be incorrect as ogre does initialize and render.

AB#509363

@ooeygui ooeygui added bug Something isn't working Gazebo Humble Bugs and Features related to humble labels Nov 28, 2022
@ooeygui ooeygui self-assigned this Nov 28, 2022
@ooeygui
Copy link
Member Author

ooeygui commented Jan 10, 2023

This looks like a bug in gazebo itself. Gazebo doesn't seem to support installation into alternative directories. It embeds the build time directories into the binary itself. So when we relocate the install, we have to use an environment variable. This results in two entries in the ogre path - one which is not necessarily correct, and one which is correct on install. Interestingly enough, it may attempt to install both if we set it correctly... Which would then fail....

@ooeygui ooeygui added the Install Location Any issue having to do with installing outside c:\opt label Jan 10, 2023
@ooeygui
Copy link
Member Author

ooeygui commented Jan 10, 2023

Sadly, this will impact alternative install locations, so must be fixed. Since we need to set the ogre resource to the rviz directory in the environment, if you actually install it into c:\opt, gazebo will attempt to load plugins will load twice.

Note this line - https://github.com/ms-iot/ros-windows-build/blob/3d11736ea557d5a9300bcd85840d435e6d615f10/ros/humble/src/msft_ros2_env/env-hooks/gazebo.dsv.in#L11

is wrong - it should point to the vendor_rviz2_ogre directory

@traversaro
Copy link
Contributor

traversaro commented Jan 10, 2023

Not sure if gazebosim/gz-sim#626 is related, but I just add a link to it as it could be interesting.

@ooeygui
Copy link
Member Author

ooeygui commented Jan 11, 2023

Thank you for connecting this bug to that one! Yes, that is exactly the issue.

@IoTDan IoTDan added the ROS2 ROS2 related issues label Jan 23, 2023
@IoTDan IoTDan added this to the P1 milestone Jan 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Gazebo Humble Bugs and Features related to humble Install Location Any issue having to do with installing outside c:\opt ROS2 ROS2 related issues
Projects
None yet
Development

No branches or pull requests

3 participants