pointgrey_camera_driver icon indicating copy to clipboard operation
pointgrey_camera_driver copied to clipboard

calling GetCameraInfo on every frame caps framerate at 24 fps

Open ecuzzillo opened this issue 10 years ago • 5 comments

Calling GetCameraInfo takes 40ms, but the result never changes. Many pointgrey cameras can get higher than 24fps, so it'd probably be good to move that somewhere so it only runs once.

ecuzzillo avatar Nov 15 '14 00:11 ecuzzillo

Good point! A pull request for this would be gladly accepted.

mikepurvis avatar Nov 15 '14 01:11 mikepurvis

I'm unfortunately now away from the machine with the camera attached to it, so I can't test until tomorrow, but I just made cInfo a member variable of the PointGreyCamera class and called GetCameraInfo on it somewhere near the bottom of connect(). I don't know if this works in all cases with all cameras, though, since among other things I'm not changing configs dynamically.

(Relatedly, I tried using rqt_reconfigure with this stuff, and when I tried to set format7 width and offsets, it toggled between the default values and the ones I set at about 2hz continuously until I killed it. I don't know if that's an issue with this or with rqt_reconfigure, though.)

ecuzzillo avatar Nov 15 '14 01:11 ecuzzillo

Turns out I can't really make a good pull request at the moment because I have too much extraneous crap to fix build issues and change camera parameters and also problems detecting GigE cameras. It's really not a complicated fix but disentangling it from my other changes would take more time than I have right now. Sorry to let you down. It's possible at some point I may be able to clean things up and provide a bigger pull request that may help with other stuff (e.g. failures to find wfov/image_exposure/whatever when using cmake).

ecuzzillo avatar Nov 15 '14 19:11 ecuzzillo

The issue with the GigE cameras, by the way, is that if you have multiple NIC's, and the camera is plugged into one of them that isn't the default, then neither flycap nor this ROS driver will detect them by default, but the FlyCapture2 API will allow you to scan specifically for GigE cameras with BusManager::DiscoverGigECameras. That will detect them, and then you can force their IP to be something you and flycap both like, and then everything will be happy.

ecuzzillo avatar Nov 15 '14 20:11 ecuzzillo

I have created a pull request (#33) that should solve this problem.

JuliusGel avatar Feb 26 '15 08:02 JuliusGel