Using USB_cam node

I am trying to use the usb_cam node but I am having trouble when it comes to the resolution.
i am trying to reduce the value due to network latency, so there isn’t a delay in the processing of the codes, or does that not affect the processing speed of the robot?
I am trying to run this basic line follow script:

I have also looked into using raspicam node, but I don’t know how to make it publish raw images instead of compressed images.

  • Should I look into using different camera package?
  • Does this mean I need to reconfigure the camera? or do I need to make a launch file for it? the documentation wasn’t very clear…

Well if you look at the params on the wiki http://wiki.ros.org/usb_cam you can see all that’s adjustable. I don’t think it’s possible to get raw images out of it, but you could easily make a node that subscribes to compressed, converts to numpy and then to raw, then publishes it back. The image_proc package probably has that already somewhere.

Anyhow unfortunately webcams vary a lot so it’s likely that most don’t support half of the features listed there. Most I’ve used support one resolution at one framerate and that’s basically it.

1 Like