ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to Set Image Encoding on pylon camera

asked 2017-06-02 13:52:17 -0500

Omkar gravatar image

updated 2017-06-03 03:39:12 -0500

NEngelhard gravatar image

I am using the pylon_camera ROS package for my Basler acA2040-90uc camera. I was following installation procedures for the driver, and when I run the line:

roslaunch pylon_camera pylon_camera_node.launch

I see some camera info such as name and exposure time in the Terminal but then the errors:

[ WARN] [1496427607.046367698]: No image encoding provided. Will use 'mono8' or 'rgb8' as fallback! [ERROR] [1496427607.060515363]: Couldn't find a fallback solution! [ERROR] [1496427607.061636139]: Error while start grabbing

In the log file generated, I see the warning

WARN [/home/ubuntu/catkin_ws/src/pylon_camera/include/pylon_camera/internal/impl/pylon_camera_base.hpp:442(PylonCameraImpl<cameratraitt>::setImageEncoding) [topics: /rosout, /pylon_camera_node/image_raw, /pylon_camera_node/camera_info] No image encoding provided. Will use 'mono8' or 'rgb8' as fallback!

I know this camera can support the encoding 'bayer_bggr8', so it is supported. I can also view the images on the Pylon viewer app on a different machine (this one doesn't support that app).

It seems that they may be a service I can call to manually set this image encoding? I was unable to find any information about it, so any assistance would be appreciated. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-03 03:38:23 -0500

NEngelhard gravatar image

updated 2017-06-03 03:38:44 -0500

The encoding can be set with a rosparam and is normally read from a yaml file that also contains other parameters like exposure. The default is here. Setting the image_encoding (line 20) to 'bayer_bggr8' should work.

edit flag offensive delete link more

Comments

1

Thanks for helping! This did the trick! Using the rosparam command works. Alternatively, one can just uncomment line 20 in the file and change it to bayer_bggr8.

Omkar gravatar image Omkar  ( 2017-06-05 13:01:12 -0500 )edit

No problem. It's always nice to see that people are using our driver.

NEngelhard gravatar image NEngelhard  ( 2017-06-06 01:26:58 -0500 )edit

Hi I changed however it is not updated and keep saying I didn't specified it. What do you have to do after changing parameters? Thanks

pedro_bb72 gravatar image pedro_bb72  ( 2019-03-12 21:22:25 -0500 )edit

Hi, pedro_bb72 I think you shoud rebuild pylon_camera package.

IvanTomic gravatar image IvanTomic  ( 2020-07-27 07:12:31 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-06-02 13:52:17 -0500

Seen: 1,054 times

Last updated: Jun 03 '17