Send a video using roslibjs
Hello everybody! I've finished the second roslibjs tutorial: "Publishing video and IMU messages with roslibjs" and I want to know if there is some way to send the video directly from the camera (canvas) without doing this step:
var data = canvas.toDataURL('image/jpeg');
var imageMessage = new ROSLIB.Message({
format : "jpeg",
data : data.replace("data:image/jpeg;base64,", "")
});
Can I send a "raw" image, or do I have to use a compressed image and the .jpeg format? I don't understand why do I have to send pictures instead the video itself. I've tried to change the Topic 'messageType' from 'sensor_msgs/CompressedImage' to 'sensor_msgs/Image', but I don't know what do I have to put in the ROSLIB.Message field...