Closed srmainwaring closed 1 year ago
I'm not qualified to review this but having gimbal support in gazebo certainly seems like a good idea.
Thanks @rmackay9. There are a couple of PR's I've submitted to Gazebo which need to be approved before I can merge this as one of the system plugins I've used has a bug which limits it's application to this case.
@MahmutEsadErman look at https://github.com/ArduPilot/ardupilot_gazebo/pull/104/files For me it works as described in readme update
This PR enables a gimbal and camera sensor in the
iris_with_gimbal
model. The gimbal has 2 DOF and uses the GazeboJointPositionController
rather than a custom plugin.Closes #37
Details
Update gimbal models
Update gimbal in iris
<name>
element when including the gimbal to alias the model name togimbal
.Remove deprecated custom plugin for gimbal control.
GimbalSmall2dPlugin
as it has been superseded by theJointPositionController
system.Upstream dependencies
The custom Gimbal plugin has been removed in favour of using the
JointPositionController
that ships with Gazebo Garden. There are two pending upstream patches required to support joints in nested models:Testing
Edit
/worlds/iris_runway.sdf
: comment out theiris_with_ardupilot
model and uncomment theiris_with_gimbal
model.Launch Gazebo:
The gimbal may be controlled directly from the command line if the mount parameter
MNT1_TYPE
has not been set (whenMNT1_TYPE
is set the servo outputs will override any direct commands):https://user-images.githubusercontent.com/24916364/210021755-be56c06a-5625-4089-b846-8a4602b8d496.mov
The gimbal may be configured in SITL as a Servo Gimbal. The ArduPilot Gazebo plugin has been configured to use
SERVO5
andSERVO6
for control with the elements:The joint limits are [-90 deg, 90 deg] for both roll and tilt and the
MNT1*
parameters should be set accordingly.A custom parameter file is included that modifies the default
gazebo-iris.parm
for gimbal control:The gimbal roll and tilt may be controlled using the RC inputs in MAVProxy: