Rviz OGRE Exception(2:InvalidParametersException)
Hi all,
I am running the map_merger and adhoc_communication nodes.
Upon running Rviz in Ubuntu 14.04.02 in ROS Indigo, the map that I am receiving is not being displayed in Rviz's Map Panel.
I am getting the following error in terminal when it crashes.
:~$ rosrun rviz rviz
[ INFO] [1456839797.277826148]: rviz version 1.11.10
[ INFO] [1456839797.277920664]: compiled against OGRE version 1.8.1 (Byatis)
[ INFO] [1456839797.424068151]: Stereo is NOT SUPPORTED
[ INFO] [1456839797.424221656]: OpenGl version: 3 (GLSL 1.3).
[ WARN] [1456839858.058198339]: OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreImage.cpp (line 283)
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
terminate called after throwing an instance of 'Ogre::InvalidParametersException'
what(): OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreImage.cpp (line 283)
Aborted (core dumped)
Asked by arttp2 on 2016-03-01 08:56:26 UTC
Answers
I briefly saw this today and fixed by making sure the image topic I want was coming through (I was subscribing to topics published on another host, and ROS network wasn't properly configured). Very partial info but still HTH.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
$ rviz -d ~/custom.rviz
[ INFO] [1516658841.051599944]: rviz version 1.12.15
[ INFO] [1516658841.051644922]: compiled against Qt version 5.5.1
[ INFO] [1516658841.051655414]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1516658841.164150807]: Stereo is NOT SUPPORTED
[ INFO] [1516658841.164223593]: OpenGl version: 3 (GLSL 1.3).
:
[ WARN] [1516658951.717543181]: OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain
/src/OgreImage.cpp (line 283)
[ERROR] [1516658951.717640251]: Error loading image: OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/ogre-1.9-mqY1wq/ogre-1.9
-1.9.0+dfsg1/OgreMain/src/OgreImage.cpp (line 283)
[ WARN] [1516658951.752948515]: OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain
/src/OgreImage.cpp (line 283)
Asked by 130s on 2018-01-23 02:37:48 UTC
Comments
I got into the same issue and realized it was actually image encoding issue. In my case, I tried to encode gray scale image into "bgr8" for image publisher. Obviously, this is invalid. Maybe you had the same issue?
Asked by hmchung on 2018-04-23 09:09:00 UTC
Comments
I can second this, turns out my image should have been encoded as mono8 instead of bgr8 and I changed the following line to rectify the situation:
sensor_msgs::ImagePtr msg = cv_bridge::CvImage(std_msgs::Header(), "mono8", total_area_flip).toImageMsg();
Asked by Den on 2021-08-31 08:20:52 UTC
@Den thanks, your answer solved my problem.
Asked by bhomaidan on 2023-03-12 12:50:14 UTC
Comments
This error happens as soon as I subscribe to the required topic where the map is being published.
Asked by arttp2 on 2016-03-01 08:57:56 UTC
DId you figure it out ?? I am having the same issue
Asked by hpurohit on 2017-06-20 12:15:41 UTC