Change transmission rate of MAVLink messages pymavlink

I would like to change transmission rate of few messages.
I would like to turn off sending RAW_IMU

In there is code

def request_data_stream_send(self, target_system, target_component, req_stream_id, req_message_rate, start_stop, force_mavlink1=False):

target_system             : The target requested to send the message stream. (uint8_t)
target_component          : The target requested to send the message stream. (uint8_t)
req_stream_id             : The ID of the requested data stream (uint8_t)
req_message_rate          : The requested message rate (uint16_t)
start_stop                : 1 to start sending, 0 to stop sending. (uint8_t)

based on the code below, I wrote something like that

autopilot = mavutil.mavlink_connection('udp:')
autopilot.mav.request_data_stream_send(autopilot.target_system, autopilot.target_component, 27, 1, 0 )

Despite sending the following command, the frequency of receiving msg with id 27 does not change. I do not know if the target ID is valid or component ID. Has anyone made similar experiments? What should I change in the code. Thanks for any repply!:slight_smile:

No ardupilot does not support that mavlink message.

Please take a look at:

By running that you should be able to understand how it works :wink:

1 Like

Thank You for reply, I am a little bit disappointed with the lack of support:(

There is AFAIK a pull request by @peterbarker to add support for message rates using that particular mavlink message.
But it is just easier to add your own stream and use the tool I linked above to get the job done.
Even if you use the SET_MESSAGE_INTERVAL method you still need the tool above.