anqixu / ueye_cam

A ROS nodelet and node that wraps the driver API for UEye cameras by IDS Imaging Development Systems GMBH.
Other
60 stars 102 forks source link

Full GPIO Functionality #100

Closed nullket closed 3 years ago

nullket commented 3 years ago

What this PR does This PR adds the ability to optionally set the two GPIOs of the cameras. If not set, it defaults to input in order to no break something.

What can the GPIOs be set to?

What else I have added an additional launch file to show an alternative way to create master-slaves setup. In this setup one camera creates a pwm output to trigger itself and other cameras

@jmackay2 again, I will ask for your time to review this please. I can imagine, that not everybody has the right cable. Therefore, you might can just review the code and see if it compiles fine in your setup without testing the GPIO functionality in case you do not have the right cable?

nullket commented 3 years ago

Sorry it took me so long to get around to this. I don't have the cables around to test this, but I think the code looks fine. My main concern here is the new launch file, which seems like there could be some copy-paste errors. If you want to make sure you can run that file and test that it works as expected, that would be nice.

I am using a similar launch file like this in our application - which works perfectly fine. In order to be more compatible with most cameras I used my working and tested launch file, removed some settings, changed the naming to be close to the existing sync file and added the larger comment at the top. As I have multiple (mixed synced and non-synced) cams connected I did not test the launch file again. Thanks a lot for the very precise review!! I corrected the launch file and hardcoded my camera_ids (so I could test) - but this is the same with already existing master/slave launch file

tl;dr: I just fixed the file. Thanks for the review. Please merge the PR when you think it is fine now.

Edit: I know testing without cables is hard, but it works on my side (for all functions) - more testing might just not be possible.