You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to implement an autotune of the attitude controller of the PX4 (following picture).
To be able to tell how good the controller performs, I need to get the setpoint (red circle) and the corresponding actual value (green circle).
With the following code I'm able to connect to the PX4 and get the attitude angular velocity vector through MAVSDK-Python but not the setpoints.
import asyncio
from mavsdk import System
async def print_omega(drone):
async for omega in drone.telemetry.attitude_angular_velocity_body():
print(omega)
async def run():
drone = System()
await drone.connect(system_address="serial://COM4:115200")
asyncio.ensure_future(print_omega(drone))
def test():
asyncio.ensure_future(run())
asyncio.get_event_loop().run_forever()
I know that the message is there as I can see the correct values in my QGroundControl (red box).
I have also searched the MAVLINK Docs and found the following standard.
Have I overlooked something in the telemetry.py file?
Is it not implementet? (I couldn't find a subscription to the setpoint vector in the C++ library either)
Does anybody know another way of getting the setpoint values?
Any Help is greatly appreciated.
The text was updated successfully, but these errors were encountered:
I think that's just not implemented in MAVSDK. Feel free to make a PR to add it. First would be proto, then the C++ implementation, and then a new Python release.
See docs on how to do that.
Thank you for your fast response.
Maybe I can find another way to easily get the values and if not I will come back and make a PR.
As this autopilot was not fully integrated at the start of my project work, I need to do it myself. But I will surely dig into it to get some inspiration.
I'm currently trying to implement an autotune of the attitude controller of the PX4 (following picture).
To be able to tell how good the controller performs, I need to get the setpoint (red circle) and the corresponding actual value (green circle).
With the following code I'm able to connect to the PX4 and get the attitude angular velocity vector through MAVSDK-Python but not the setpoints.
I know that the message is there as I can see the correct values in my QGroundControl (red box).
I have also searched the MAVLINK Docs and found the following standard.
Have I overlooked something in the telemetry.py file?
Is it not implementet? (I couldn't find a subscription to the setpoint vector in the C++ library either)
Does anybody know another way of getting the setpoint values?
Any Help is greatly appreciated.
The text was updated successfully, but these errors were encountered: