I am not 100% sure if its a bug, but it seems strange to me.
What have I done?
I create a service publisher:
Code: Select all
serviceData = simExtRosInterface_advertiseService('/vrep/simulationData', 'vrep_common/simulationGetData', 'image_callback')
simExtRosInterface_serviceServerTreatUInt8ArrayAsString(serviceData)
Code: Select all
function image_callback()
local data,w,h=simGetVisionSensorCharImage(colorCam)
d={}
d['header']={seq=1,stamp=0,frame_id="a"}
d['height']=h
d['width']=w
d['encoding']='rgb8'
d['is_bigendian']=1
d['step']=w*3
d['data']=data
res = {}
res['image']=d
res['data']={0.1, 0.2}
return res
end
Code: Select all
Error: [string -unknown location]:?: ros_srv_callback__vrep_common__simulationGetData: read__vrep_common__simulationGetDataResponse: malformed table (bad key type) (image_callback)
Code: Select all
---
sensor_msgs/Image image
float32[] data
If I'm doing something wrong, please let me know