Closed srmainwaring closed 1 month ago
@srmainwaring,
Thanks so much for this. This is quite important for the high-altitude-non-GPS GSoC project!
Hi @srmainwaring,
What should MNT1_TYPE be set to? I think it will be either 1 (Servo) or 7 (BrushlessPWM?)
What should MNT1_TYPE be set to? I think it will be either 1 (Servo) or 7 (BrushlessPWM?)
Forgot to add that: yes MNT1_TYPE should be 1 for servo. Updated PR notes at top.
Hi @srmainwaring,
Sanket, Tridge and I were playing around with this today and noticed a couple of issues:
Anyway, thanks again for this though, it is on the critical path for both the HighAlt project and the Visual follow-me project!
- the servos seem slightly laggy which causes the gimbal to move when the vehicle moves
There's a couple of possible causes for the lag which I'll look into. The most likely is the PID gains on the servo joint controllers in the simulation.
- The gimbal's pitch servo seems to be limited to 90 degrees downwards so when the vehicle pitches backwards the gimbal physically can't point downwards
I'll adjust the joint limits and update the AP params to match the specs for the SIYI A8
Finally, the iris model could also do with a tune. IIRC from some other analysis the default params for gazebo-iris are quite close to the limit where roll oscillations become noticeable. There could be some cross-coupling with the gimbal movement that is also contributing to stability.
Hi @srmainwaring,
Thanks very much! By the way, in the instructions at the top of the PR (and maybe eventually on the wiki or in the README) we should specify what these MNT1_xxx parameters should be set to:
and I wonder if we also need to set these values? They seem to be ok that the defaults 1100 ~ 1900 but just in case
@rmackay9 and @snktshrma - should be much snappier now. The limits now match the SIYI A8. Main change to joint control is reducing the damping (equivalent to increasing the PID gains and max force exerted). The original physics settings were carried over from the model from Gazebo Classic - and correspond to a very stiff joint, not that appropriate for a small gimbal.
Figure: gimbal tracking ROI located at home position (location of axis), response is faster with new settings.
Updates https://github.com/ArduPilot/ardupilot_gazebo/pull/86 which was on a
main
branch preventing maintainer edits.iris_with_gimbal
model as default in example worlds.Copter params
Figure: gimbal tracking ROI located at the home position while Iris circles![iris-gimbal-3d-roi](https://github.com/ArduPilot/ardupilot_gazebo/assets/24916364/465604fb-a8e1-4db9-aaa2-75d6b4274938)
The
GstCameraPlugin
is also enabled by default. To view the video in QGC editApplication Settings > Video Settings
. SelectUDP h.264 Video Stream
and use the default port5600
.Testing
Tested on macOS Sonoma 14.5 and Ubuntu 22.04 (VM). Both running ArduPilot
master
with Gazebo Harmonic.