MAVSDK icon indicating copy to clipboard operation
MAVSDK copied to clipboard

set_rate_attitude(): ignores requested rate

Open ygratz opened this issue 1 year ago • 5 comments

Hi, Working with SITL, I see that as the SITL starts working it sends various messages at given rates. For example the attitude message is sent every 250ms.

When I run: telemetry.set_rate_attitude(1.0);

It does not have any affect on the message rate. So is true for other "set rates".

What do I need to do to overcome this? Thanks

ygratz avatar Nov 26 '23 11:11 ygratz

Is this PX4?

julianoes avatar Nov 26 '23 11:11 julianoes

arducopter

ygratz avatar Nov 26 '23 12:11 ygratz

telemetry.set_rate_attitude(1.0);

1/4=0.25=250ms, does 1 = 250ms?

The example code does not have set rate calling for battery, after code change for my case it works with Pi4B. I have not verified whether the sending speed changes with different values.

I tried to change it to await drone.telemetry.set_rate_battery(2) #2hz, the number of printouts is the same which is controlled by these lines await asyncio.sleep(3) telem_battery.cancel(). the printouts did not double as what I had expected.

Not sure of anything to do with this parameter.

This may interest us.

After changing this at the Arducopter side SRx_EXTRA3,2 (500 msec), regardless of drone.telemetry.set_rate_battery(x) value set, the printouts are doubled. previously was six (3+3) printouts, now I have twelve (6+6).

Most ground stations set the desired stream rate by sending the REQUEST_DATA_STREAM MAVLink message to the vehicle instead of directly setting the parameters mentioned above

Jai-GAY avatar Nov 27 '23 01:11 Jai-GAY

Ok, I need to try to reproduce this with ArduCopter. Can I reproduce it with just SITL?

julianoes avatar Nov 27 '23 17:11 julianoes

Can I reproduce it with just SITL?

@ygratz , do you have any comment? for my cases, I am using Arducopter on cubeorange. I am not sure can it be reproduced using SITL.

Jai-GAY avatar Nov 27 '23 23:11 Jai-GAY