Ogre 3D bad performance in ROS?

asked 2016-09-15 02:21:19 -0500

OgreROS gravatar image

updated 2016-09-15 05:21:21 -0500

Dear all,

I have the following problem: Iam writing a simple ros node with Ogre 3D (1.9) visualization (e.g. some data from certain messages is used to define the position and orientation of some simulated entities), in accordance to: https://github.com/Unnar3/rosOgre

However, I get very bad performance (~15 frames), even when rendering a scene without any geometry. Has anybody had a similar experience?

I tried the following:

  • Disabling VSYNC in Ogre config and nvidia-settings
  • Two different rendering approaches 1) The ros node does not subscribe to / publish any messages and is basically just calling renderOneFrame from Ogre 2) The ros node does not subscribe to / publish any messages and directly calls startRendering from Ogre
  • Compiling the code with release flags

All above implementations suffer the same bad performance, using Ubuntu 14.04 and ROS Indigo. The same code runs on the same machine on Windows (without the ROS framework) with OpenGL at >1000 fps.

FYI: I will also ask this question in the Ogre forums, just wanted to have feedback for my problem from both communities.

EDIT: Implementing a small sample application in OpenGL outside of ROS performs as expected.

edit retag flag offensive close merge delete

Comments

Do you have a dedicated graphics card? Do you have the drivers for it installed and enabled?

ahendrix gravatar image ahendrix  ( 2016-09-15 02:29:39 -0500 )edit

Yes - Iam using a NVidia graphics card with the 352.63 driver

OgreROS gravatar image OgreROS  ( 2016-09-15 04:31:21 -0500 )edit

Can you display what you're trying to display in RViz (which uses Ogre)? I think it would be easier depending on what you're trying to do.

Airuno2L gravatar image Airuno2L  ( 2016-09-15 07:29:08 -0500 )edit

Hi, have a look at the link above for the Ogre code I'm using (I just removed the pcl stuff). I do not use RViz, I use Ogre separately (we need some functionality from 1.9 where ROS comes with Ogre 1.8).

OgreROS gravatar image OgreROS  ( 2016-09-15 08:18:45 -0500 )edit

Not an answer obviously, but RViz in Kinetic uses Ogre 1.9. See REP-3 - Platforms by Distribution - Kinetic Kame. And Jade on Trusty uses 1.8, but on > Trusty it uses 1.9 again.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-15 08:55:21 -0500 )edit

It seems kind of unlikely that ROS is the culprit here. Have you tried running the same test code on Ubuntu without ROS to compare?

ahendrix gravatar image ahendrix  ( 2016-09-15 09:25:40 -0500 )edit