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

avoid Ogre::ItemIItemIdentityException in Ogre 1.12 when the same material is used multiple times #1746

Closed

Conversation

lucasw
Copy link
Contributor

@lucasw lucasw commented May 19, 2022

Description

The issue can be shown by building rviz with Ogre 1.12 and launching https://github.com/lucasw/gazebo_ros_demos/blob/noetic-devel/rrbot_description/launch/rrbot_rviz.launch then add a second RobotModel to rviz (probably two instance of any RobotModel that uses the _original postfix code path will fail in the same way):

terminate called after throwing an instance of 'Ogre::ItemIdentityException'
  what():  ItemIdentityException: Material with the name package://rrbot_description/meshes/hokuyo.daeMaterial0_original already exists. in ResourceManager::add at ./OgreMain/src/OgreResourceManager.cpp (line 148)
[rviz-3] process has died [pid 9096, exit code -6, cmd /home/lucasw/base_catkin_ws/devel/lib/rviz/rviz -d /home/lucasw/base_catkin_ws/src/ros/gazebo_ros_demos/rrbot_description/launch/rrbot.rviz __name:=rviz __log:=/home/lucasw/.ros/log/affefeb0-d77c-11ec-9be6-b72d65a8c914/rviz-3.log].
log file: /home/lucasw/.ros/log/affefeb0-d77c-11ec-9be6-b72d65a8c914/rviz-3*.log

The solution is similar to material_count used in https://github.com/ros2/rviz/blob/ros2/rviz_default_plugins/src/rviz_default_plugins/robot/robot_link.cpp#L708-L751

Checklist

  • If you are addressing rendering issues, please provide:
    • Images of both, broken and fixed renderings.
    • Source code to reproduce the issue, e.g. a YAML or rosbag file with a MarkerArray msg.
  • If you are changing GUI, please include screenshots showing how things looked before and after.
  • Choose the proper target branch: latest release branch, for non-ABI-breaking changes, future release branch otherwise.
    Due to the lack of active maintainers, we cannot provide support for older release branches anymore.
  • Did you change how RViz works? Added new functionality? Do not forget to update the tutorials and/or documentation on the ROS wiki
  • While waiting for someone to review your request, please consider reviewing another open pull request to support the maintainers of RViz. Refer to the RViz Wiki for reviewing guidelines.

@lucasw lucasw changed the title use material_count to make material names unique to avoid Ogre::ItemI… avoid Ogre::ItemIItemIdentityException in Ogre 1.12 when the same material is used multiple times May 19, 2022
…dentityException when the same material is used multiple times
@rhaschke
Copy link
Contributor

Thanks for pointing out this issue. I think I found a better way to avoid duplicate material names: #1750.

@rhaschke rhaschke closed this May 27, 2022
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.

2 participants