-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add camera zoom plugin #57
Add camera zoom plugin #57
Conversation
class CameraZoomPlugin::Impl | ||
{ | ||
/// \brief Handle a zoom command. | ||
public: void OnZoom(const msgs::Double &_msg); |
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.
Have you considered specifying zoom as a focal length? It's more deterministic.
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.
Yes, could do. This is just a basic first pass to get the internal mechanics of the plugin working and a factor applied to HFOV was the method used in the PX4-SITL_Gazebo plugin for Gazebo Classic so I took my steer from that.
It's really great to see this, thanks so much! |
If you are still interested to get this merged, let me know! I think it's a great feature addition. |
Thanks @Ryanf55, let me re-test on Harmonic. IIRC there was an issue in Gazebo Garden that could cause crashes and I need to remind my self what it was and whether it has been fixed. |
ca07602
to
99a5393
Compare
- fix gimbal test world - add example world for gimbal and camera - add gimbal_small_3d - update command topic names in gimbal test world - update quote style in gimbal_small_3d - rename zoom plugin and attach to sensor - resolve parent model and subscribe to zoom command - implement zoom for standard camera - remove whitespace for linter - provide alternative to gz::sim::Sensor - handle RenderTeardown event to exit cleanly - find package gz-common5 - use degrees for pose in gimbal world - format plugin attributes. Signed-off-by: Rhys Mainwaring <[email protected]>
99a5393
to
36f3048
Compare
Hi @Ryanf55 - tested on Harmonic and appears to now be working fine. I can not longer see a segmentation fault on exit, so I assume the issue (which was connected to the physics libraries unloading IIRC) has been resolved upstream. |
Add a 3 axis gimbal and system plugin that attaches to a camera sensor and allows the camera to be zoomed.
Details
msgs::Double
) and allows an existing camera sensor to be zoomed.The plugin SDF has a single parameter setting the maximum zoom factor.
Testing
camera_zoom.mov
The gimbal is position controlled and responds to roll, pitch and yaw commands.
The camera zoom is similarly commanded.
Tasks
#include <gz/sim/Sensor.hh>
is not available in the released version ofgz-sim7
on Ubuntu.