code to send data to ros topic:
Code: Select all
local msg ={
header={ stamp=simROS.getTime(), frame_id='a',
};
points={x=p[1], y=p[2] ,z=p[3]};
}
--d.channels={name="abc",values=p}
simROS.publish(pub,msg)
error
Code: Select all
57: read__sensor_msgs__PointCloud: field points: read__geometry_msgs__Point32: expected a table (in function 'simROS.publish@simExtROS')
stack traceback:
[C]: in function 'simROS.publish'
[string "Vision_sensor@childScript"]:57: in function 'sysCall_vision'
for reference check this scene: https://drive.google.com/file/d/1AyX4O2 ... sp=sharing