-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Telemetry.set_rate_attitude() seems to have no effect #1569
Comments
Good point, this is a bit messy. The problem is that PX4 was supposed to move from ATTITUDE to ATTITUDE_QUATERNION in general, however, that has not happened, and for compatibility reasons probably won't happen soon. In an idea world neither of the messages would be sent by default allowing you to request them at whatever rate you want them. My suggestion would be to change PX4 so it does not send both at 50 Hz. |
In my observation, I receive telemetry responses for Position & Quarternions in 200 milliseconds from the MAVSDK server which is well below 50 Hz, I think that's 5 Hz? I still have some evaluation to do and tweaking of the setup in order to validate how the communication is performed. I'm currently using a simulation & MAVSDK server for ease of use. |
This is still a problem in MAVSDK version: v1.4.3. |
Right. I guess we need to decouple the two attitude subscriptions and respective set_rate callers. So, for instance, instead of calling the attitude_euler callback when ATTITUDE or ATTITUDE_QUATERNION are called, only do so when ATTITUDE arrives. |
Fix coming: It would be great if someone could review and test it, so I don't have to 😄. |
👋 anyone willing to test this? Or am I on my own here... |
@julianoes let me try to look into this but last time I was running the sim locally I was getting bad performance. Probably because of my machine, however, I will try to test this anyway. |
You should be able to test it even when it's running a bit slower. You can see how fast it runs in the bottom left in Gazebo, and then you need to adjust the rates that telemetry is sent by it. |
@elpiel 👋 |
I'm still planning to look into it, I've had some personal errands and I'm still traveling. I'll be more available in the coming 10 days. |
'm trying to set the rate of the attitude messages. I tried setting it to a lower hertz rate, for example 10 Hz. But the messages still seem to get published in a very high rate (100 Hz)
I subscribe to Telemetry.subscribe_attitude_quaternion()
The function should set the rate of this MAVLINK Message.
MAVSDK/src/plugins/telemetry/telemetry_impl.cpp
Lines 215 to 219 in ee84bd9
So I took a look at this:
MAVSDK/src/plugins/telemetry/telemetry_impl.cpp
Lines 640 to 720 in ee84bd9
I assume that both of this functions are able to publish the quaternion. Is there any cause for that? When checking with QGC both MAVLINK_MSG_ID_ATTITUDE_QUATERNION and MAVLINK_MSG_ID_ATTITUDE are published with 50 Hz. I guess as MAVSDK takes both messages into account and therefore the receiving rate of 100 Hz is archived.
But when using Telemetry.set_rate_attitude() I assume that this will set the rate of the subscription to a attitude message, for example the quaternion, to the desired one. This is not the case right now.
The text was updated successfully, but these errors were encountered: