-
Notifications
You must be signed in to change notification settings - Fork 96
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
Zoom slew rate #81
Zoom slew rate #81
Conversation
@Ryanf55 - can you update base to target Update done already, prior to review. |
1193fd9
to
59869aa
Compare
I had to add a fix for if the user doesn't specify |
f4701c7
to
a7a3dcf
Compare
* Implements slew rate for zooming configured in m/s Signed-off-by: Ryan Friedman <[email protected]>
Signed-off-by: Rhys Mainwaring <[email protected]>
Signed-off-by: Ryan Friedman <[email protected]>
* Infinite rate would crash, now it has special handling Signed-off-by: Ryan Friedman <[email protected]>
a7a3dcf
to
ae1beb6
Compare
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.
Looks good. Removed merge commit and updated commit comments with Camera:
prefix in force push.
if (this->impl->zoomChanged) { | ||
// Only calculate goal once each time zoom is changed. | ||
const auto requestedZoomCmd = this->impl->zoomCommand.load(); | ||
const auto clampedZoomCmd = std::clamp(requestedZoomCmd, |
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.
Something is not quite right with the constraints. After zooming in I reset the zoom to the minimum factor using
gz topic -t "/model/gimbal/sensor/camera/zoom/cmd_zoom" -m gz.msgs.Double -p "data: 1.0"
but there was no response. Using any value larger than 1.0 is working (e.g. 1.00000001).
Purpose
Solves #57 , implementing a zoom slew rate to give realistic zoom effect for optical cameras like the Nikon P1000.
Usage
Add the following to your CameraZoomPlugin:
The value is camera-specific and can be calculated per the issue description.
Demo
zoom-plugin-demo.mp4
Dependencies
Depends on #79 to go in first.
Assumptions