Robotics StackExchange | Archived questions

How to change Basler camera resolution via ROS driver?

Hello, I am trying to work with daA1600-60uc Basler camera. Default resolution is 1600x1200. I am installed the Pylon 5 and ROS-Driver. So in Pylon 5 i can set any lower resolution. But if i use ROS driver i can set only 800x600 through binningx = 2 and binningy = 2. Any number other than 2 or 1 causes an error. Even if I change the resolution in the Pylon 5, save it into the User Set and apply my User Set for User Set Default, it's reset after starting ROS node (roslaunch pyloncamera pyloncameranode.launch). As a result i get default 1600x1200 in ROS imageview. I tried to add height and width into the pyloncameranode.launch file, but it did not give any result. I use Ubuntu 16.04 and ROS Kinetic 1.12.12.

Asked by AntonB on 2018-02-13 08:24:09 UTC

Comments

Are you setting an ROI when you lower the resolution in PylonViewerApp (assuming that is what your are using), or actually getting a full frame image at a different resolution than the native width and height of the sensor?

Asked by lucasw on 2018-02-13 13:24:11 UTC

Hello, lucasw. No, I didn't change the ROI settings. I tried it today. For Format Control I set Width 640, Height 480, Offset X 320, Offset Y 240. For ROI 1, ROI 2 I set the same. Save it to User Set 1 and apply for Default. Close Pylon, run pylon_camera_node.launch. In image_view I have 1600x1200.

Asked by AntonB on 2018-02-14 09:00:08 UTC

Now I stop pylon_camera_node.launch and run Pylon. In Pylon I have 1600x1200, but I can load User Set 1 with parameters which I set before. I use config .yaml and .launch without modifications. What I do wrong?

Asked by AntonB on 2018-02-14 09:01:57 UTC

I glanced at the code of https://github.com/magazino/pylon_camera and I don't see much about setting the resolution, or even an ROI. The gige Basler cameras I use only have a native resolution and can't change the resolution, just the roi, that may be something only the USB cameras do.

Asked by lucasw on 2018-02-14 11:22:13 UTC

You could open an issue on the pylon_camera github page and possibly get more help. That drive does not (yet) implement a lot of features that the cameras support, but maybe someone can point you towards how to add it yourself.

Asked by lucasw on 2018-02-14 11:23:43 UTC

Answers