UbiquityRobotics / raspicam_node

ROS node for camera module of Raspberry Pi
BSD 3-Clause "New" or "Revised" License
293 stars 162 forks source link

Enabling RAW #123

Open anto1713 opened 2 years ago

anto1713 commented 2 years ago

Any idea how to enable raw when using raspicam_node?

i always use /raspicam_node/image/compressed. how can i change the topic to /raspicam_node/image? because i want uncompressed image

JanezCim commented 2 years ago

have you tried enabling raw in the launch files?

https://github.com/UbiquityRobotics/raspicam_node/blob/99ccecfd5a56f798474d9f8c0b0a092f223dcc50/launch/camerav2_1280x720.launch#L2

anto1713 commented 2 years ago

i enable raw by type roslaunch raspicam_node camerav2_1280x720.launch enable_raw:=true and the parameter says that /raspicam_node/enable_raw: True

and i enable the raw by manually edit, just like your comment and launch raspicam_node camerav2_1280x720.launch but the terminal says Unable to convert 'bgr8' image for display: 'Image is wrongly formed: height * step != size or 960 * 3840 != 1843200

how can i solve this?

kminoda commented 2 years ago

I got the same issue using camerav2_1640x1232.launch with enable_raw=true. See https://github.com/UbiquityRobotics/raspicam_node/issues/84 for the solution.

realizator commented 2 years ago

Guys, for the raw mode resolution to be dividable by 32 - this is the low-level sensor-specific. 1280/32 = 40 - it's Ok 720/32 = 22.5 - not Ok! Use either 32 23 = 736 or 32 22 = 704 instead of 720.