srl-freiburg / pedsim_ros

Pedestrian simulator powered by the social force model
https://github.com/srl-freiburg/pedsim_ros
BSD 2-Clause "Simplified" License
447 stars 169 forks source link

Rviz Crashes (OGRE) #75

Closed IhabMohamed closed 2 years ago

IhabMohamed commented 2 years ago

Hello Everyone,

I got the following error when I run the airport_demo example (roslaunch pedsim_simulator airport_demo.launch). So, I am not able to visualize the crowds and moving people in rviz.

I am using ROS noetic and Ubuntu 20.04.

Error: OGRE EXCEPTION(5:ItemIdentityException): Cannot find a group named rviz in ResourceGroupManager::isResourceGroupInitialised at /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 1916)

I tried to reinstall rviz and libogre-1.9-dev (see this LINK), but it doesn't solve the issue.

Thanks in advance for your help.

maprdhm commented 2 years ago

Hello,

I had the same error on ROS noetic. After reading this discussion, I replaced the line: Ogre::MaterialPtr default_material = Ogre::MaterialManager::getSingleton().create(ss.str(), "rviz"); by Ogre::MaterialPtr default_material = Ogre::MaterialManager::getSingleton().create(ss.str(), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); in the files 2ndparty/spencer_tracking_rviz_plugin/src/visuals/mesh_node.h and 2ndparty/spencer_tracking_rviz_plugin/src/visuals/person_visual.cpp,

And the error did not appear anymore. Hope this helps, even if the issue is old...

IhabMohamed commented 2 years ago

Thank you so much, @maprdhm. I will follow your suggestions, then I will keep you updated.

IhabMohamed commented 2 years ago

It works well, thanks @maprdhm