-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Publish raw mjpeg stream directly via compressed image topic #346
Comments
Hi @wendwosenbb, in your second experiment, in which you go the green screen, to which image topic have you subscribed? |
Hi @boitumeloruf
|
@boitumeloruf the compressed image topic (/windshield_camera/image_raw/compressed) gives a gray scale image: the raw image topic (/windshield_camera/image_raw) gives rgb image as expected |
Ok, maybe something broke through further development since the merge of my feature request and. Maybe try using the older version still available in my fork (branch 'ros2'): https://github.com/boitumeloruf/usb_cam/tree/ros2 |
Thank you for following up on my questions. |
@wendwosenbb apologies for being absent here in the replies - I am about to become a dad in the next few hours/days/weeks so I've been busy the last few weeks/months supporting my wife and preparing our house. There are two "available format" lists that are generated - one that should list the available formats this driver supports (which should include mjpeg in it) and the other list should include the available formats your selected hardware supports. Both of these should automatically be printed if you've misconfigured something...but only one at a time depending on the configuration error. There is a high probability I won't be that active here once my son is born so apologies in advanced for not replying here that quickly 😅 |
@flynneva |
@flynneva
I was trying to use the feature you merged in pull request #270, to save on cpu usage by directly publishing via the compressed image topic.
scenarios I tested
crashed without any log.
this produces compressed image as desired but with significant CPU usage.
would you direct me in how to levarage the feature described in #270. Thank you!
this is my camera_config file:
ros__parameters: video_device: "/dev/windshield_camera" framerate: 15.0 io_method: "mmap" frame_id: "windshield_camera" pixel_format: "raw_mjpeg" av_device_format: "MJPG" #YUV422P, MJPEG image_width: 640 image_height: 480 camera_name: "windshield_camera" camera_info_url: "package://usb_cam/config/camera_info.yaml" brightness: -1 contrast: -1 saturation: -1 sharpness: -1 gain: -1 auto_white_balance: true white_balance: 4000 autoexposure: true exposure: 100 autofocus: false focus: -1
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
The usb_cam driver is showing me pixel formats supported
[usb_cam_node_exe-2] This driver supports the following formats:
[usb_cam_node_exe-2] rgb8
[usb_cam_node_exe-2] yuyv
[usb_cam_node_exe-2] yuyv2rgb
[usb_cam_node_exe-2] uyvy
[usb_cam_node_exe-2] uyvy2rgb
[usb_cam_node_exe-2] mono8
[usb_cam_node_exe-2] mono16
[usb_cam_node_exe-2] y102mono8
[usb_cam_node_exe-2] raw_mjpeg
[usb_cam_node_exe-2] mjpeg2rgb
[usb_cam_node_exe-2] m4202rgb
The text was updated successfully, but these errors were encountered: