-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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 gimbal device #23382
base: main
Are you sure you want to change the base?
Add gimbal device #23382
Conversation
What's the status on this? I.e. why is it drafted? I kinda want a SITL gimbal real bad, hence asking whether this (mostly) works or if it's not ready at all. |
@lierdakil You can already try out the current status? |
@lierdakil It is drafted because you would need to use my PX4-gazebo-models fork instead of the PX4 default one. But most of the functionalities are there except from the gimbal device flags as stated in the PR message |
@StefanoColli thank you very much for the reply, that sounds great! I'll be trying this branch out shortly, then. |
So this works great, but apparently the gimbal in the model is installed with the neutral position pointing backwards. I've rotated it 180⁰ in the model, and everything is fine, but was this intended? |
Cant make it work with qgc. Can you share parameters settings? |
@StefanoColli Any updates regarding this PR? |
@lierdakil Are you sure about that? because in QGC I see that the gimbal in neutral position is correctly pointing forward... |
f4a68f4
to
a7b2084
Compare
Well, the actual video feed from the simulated camera (captured with ROS) does not point in the direction the drone flies in when the pitch stick is tilted forward. Also, the model visibly points backwards in Gazebo. When SITL first starts up, you're not looking at the front of the drone, you're looking at its butt 😅 P.S. Disclaimer: I didn't actually check the version that got eventually merged, but this was the case at the time I wrote the original comment. So take this with a grain of salt. |
When this is ready can we please have some docs. Specifically and addition to https://docs.px4.io/main/en/sim_gazebo_gz/vehicles.html and to the list here: https://docs.px4.io/main/en/sim_gazebo_gz/#running-the-simulation Also in https://docs.px4.io/main/en/sim_gazebo_gz/ a new section "Simulating a Gimbal" that explains how you set up gazebo/PX4 to use this, and how it can be tested. What we need is enough information so that someone can run a turnkey set of instructions and then send MAVLink commands to a gimbal-protocol v2 compliant gimbal manager and drive the simulation. QGC has that implementation, at least in part, so should be a good first test point. MAVSDK too. |
Feature
Gimbal device to be controlled in SITL environment when using gazebo simulator (gz-garden). The device can act as a Mavlink gimbal (following Mavlink gimbal protocol v2) or as a non-Mavlink gimbal (responding to gimbal_controls messages) depending on
MNT_MODE_OUT
PX4 parameter.It supports both angle and angular rate commands, it doesn't support yet the gimbal device flags (WIP).
It is meant to work with the gz_x500_gimbal model (PX4/PX4-gazebo-models#47).
Test coverage
Tested with QGC
WIP
The submodule Tools/simulation/gz is temporarily pointing to https://github.com/StefanoColli/PX4-gazebo-models waiting for
PX4/PX4-gazebo-models#47 to be merged into main.
Context
gimbalQGCm.mp4