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 binning_x = 2 and binning_y = 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 pylon_camera pylon_camera_node.launch). As a result i get default 1600x1200 in ROS image_view. I tried to add height and width into the pylon_camera_node.launch file, but it did not give any result. I use Ubuntu 16.04 and ROS Kinetic 1.12.12.
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?
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.
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?
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.
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.