-
Notifications
You must be signed in to change notification settings - Fork 221
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
Manual control of RGB LED during flight using MAVSDK? #723
Comments
What's the MAVLink message this would use? Presumably we need to add the functionality to MAVSDK. |
FYI there is no MAVLink message to do this, and likely this would not be a good idea for safety reasons. The LEDs have specific meanings - in PX4 docs here https://docs.px4.io/main/en/getting_started/led_meanings.html but same/similar in ArduPilot. So you'd need a flight stack to agree to disable its meanings, since its drivers are going to be talking to the GPS/LEDs. You could add support for controlling other LEDs using https://mavlink.io/en/services/illuminator.html |
so If I understand correctly, right now we have no way of directly changing the lights using mavlink commands. the only method is changing directly in px4 source codes and modules which is not the best practice. is the illumination for any optional light that can be added as an extra? |
@hamishwillee actually, illuminator is more for lights to light up a scene or similar, right? Not so much for RGB on the drone. |
@alireza787b Yes.
Yes, so you you can control your LED strips through custom methods, or via the illuminator command. But you'll have to implement it in the flight stack or companion. All I'm saying here is that this would be the approach for controlling a custom "lighting source". Turning off all RGB from the standard LEDs would be IMO unsafe, but you might be able to convince a flight stack to turn off the the "All OK colours" - which is what you'd have when flying your light show. So if you had some problem the lights would still go on. Or for anything you can create a custom build and do what you like from a "coding" point of view. Though again, none of the flight stacks are likely to include code to disable those.
Fair-ish. First design was for controlling LEDs, then it became more like a torch. But with that new control message it is half way between - i.e. it supports strobing but not complex colour control, fading and all that stuff. https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ILLUMINATOR_CONFIGURE . Either way, sounds like @alireza787b is looking at custom builds. |
I’m working on a project where I need to control the onboard RGB LED (e.g., the one in the GPS module) during certain phases of flight, such as during a drone show. Is there any existing feature in MAVSDK that allows this? If not, do you have any recommendations or insights on how to achieve this, either through MAVSDK or using another method with PX4? I want to avoid external LEDs if possible for now or later on add external LED that obey the onboard Pixhawk LEDs
The text was updated successfully, but these errors were encountered: