Crash when starting simulation with an image publisher (ROS)

Report crashes, strange behaviour, or apparent bugs
Post Reply
sergiosc
Posts: 8
Joined: 25 Jun 2015, 15:59

Crash when starting simulation with an image publisher (ROS)

Post by sergiosc »

Hello everyone,

I am working on a ROS-VREP simulation using Ubuntu 14.04, ROS Indigo and V-rep 3.2.1 .
Every time I try to publish vision sensors data from v-rep the simulator crashes giving this error:

Code: Select all

QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 16, now registering size 0.
Aborted (core dumped)
This is the code I am using for streaming data from a kinect on my scene:

Code: Select all

depthCam=simGetObjectHandle('kinect_visionSensor')
depthView=simFloatingViewAdd(0.9,0.9,0.2,0.2,0)
simAdjustView(depthView,depthCam,64)
	
colorCam=simGetObjectHandle('kinect_camera')
colorView=simFloatingViewAdd(0.69,0.9,0.2,0.2,0)
simAdjustView(colorView,colorCam,64)
	
name = simGetScriptSimulationParameter(sim_handle_self,'rosname')
		
--simExtROS_enablePublisher(name.."/rgbimage/image_raw",1,simros_strmcmd_get_vision_sensor_image,colorCam,0,'')
--simExtROS_enablePublisher("/kinect/depthimage/image_raw",1,simros_strmcmd_get_vision_sensor_image,depthCam,0,'')
--simExtROS_enablePublisher(name.."/depthimage/vrep",1,simros_strmcmd_get_vision_sensor_depth_buffer,depthCam,0,'')
	
simExtROS_enablePublisher(name.."/rgbimage/camera_info",1,simros_strmcmd_get_vision_sensor_info,colorCam,0,'')
	
youBotHandle = simGetObjectHandle("youBot_ref")
simExtROS_enablePublisher("/tf",1,simros_strmcmd_get_transform,colorCam,youBotHandle,'/kinect_visionSensor%/base_link')
simExtROS_enablePublisher("/tf",1,simros_strmcmd_get_transform,depthCam,youBotHandle,'/kinect_depthSensor%/base_link')
If I enable any of the commented publisher the simulation won't run and v-rep crashes.
All other publishers/subscribers work just fine and I can communicate with the ROS core flawlessly (e.g. I can read the camera info).
I tried to catkin make the v-rep ros packages and copy the lib files as people suggest on this forum but it doesn't help.
I tried to run other scenes that use vision sensors and ROS communication and all have the same problem (but they probably work on someone else computer).
All the plugins seems to be loaded correctly when I start V-Rep (no errors reported).

Any suggestion?
Many thanks.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Crash when starting simulation with an image publisher (

Post by coppelia »

Hello,

you said you tried other scenes, that also crashed. Is this also the case with rosTopicPublisherAndSubscriber.ttt ?

Cheers

sergiosc
Posts: 8
Joined: 25 Jun 2015, 15:59

Re: Crash when starting simulation with an image publisher (

Post by sergiosc »

Hello,
yes, also with that scene. I have to comment the following publisher for it to work (with no vision sensor topics).

Code: Select all

-- Now enable topic publishing and streaming of the vision sensor's data:
topicName=simExtROS_enablePublisher('visionSensorData',1,simros_strmcmd_get_vision_sensor_image,visionSensorHandle,0,'')

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Crash when starting simulation with an image publisher (

Post by coppelia »

I have no clue why this is not working. On a fresh Ubuntu install, with a fresh ROS install, it works fine. Maybe you could try to add some debugging messages to see where the crash occurs in the plugin?

Cheers

sergiosc
Posts: 8
Joined: 25 Jun 2015, 15:59

Re: Crash when starting simulation with an image publisher (

Post by sergiosc »

Hello,

debugging the code I noticed the error is generated at this line of code inside ROS_SERVER.cpp in the vrep_plugin:

Code: Select all

pub.imagePublisher=images_streamer->advertise(pub.topicName,queueSize);
inside the function:

Code: Select all

bool ROS_server::launchPublisher(SPublisherData& pub,int queueSize)
I have tried to change the queueSize and to reinstall ros-indigo-image-transport but nothing changes. Do you thing it might be something related to Qt ? (I have the latest version)

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Crash when starting simulation with an image publisher (

Post by coppelia »

The problem is not related to Qt, since no Qt libraries are used. It seems it is the image transport module that is causing the crash when calling images_streamer->advertise. Make sure you have an up-to-date ROS and dependencies. Have you tried it on a clean ROS install system?

Cheers

Post Reply