-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various camera improvements #681
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Added few comments.
* | ||
* @param id The camera ID from 0 to 5. | ||
* | ||
* Currently supported are IDs 0 to 5 mapping to MAVLink component IDs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to mention MAVLink ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for now this can be helpful.
There can potentially be multiple camera components under the same system id. Therefore, we can select the camera ID from 0 to 5 for each instantiation of the camera plugin.
We forgot to actually try to grab the camera definition file using the URI supplied via mavlink.
This is a workaround to manually enable the camera plugin if a camera only is connected. It is needed for tests where we test against a camera (e.g. camera-manager) without an autopilot. In this case the current discovery mechanism doesn't work (or doesn't complete in time) because we never receive a autopilot version. The workaround is just to check at 2 Hz if a camera is now connected and in that case initialize everything.
e9a5607
to
0bd4ba8
Compare
By adding a cookie such as this to the set_param_async and get_param_async calls we can add a cancel method allowing any outstanding work of an object to be deleted. This can prevent bugs where objects are destroyed but callbacks are still dangling.
This adds a mutex around the callback which is shared data, and makes sure we make a copy before capturing the callback in lambdas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As part of testing against the camera-manager, various issues are coming up.