Access position data at higher frequency
-
Hey all,
I'm trying to use offboard control mode to give velocity commands to a starling 2 max and need position information at higher than 10 Hz (the default rate at which mavlink position messages are published)
Is it possible to access this information at a higher rate either by increasing the mavlink publishing rate or using MPA?
Kind regards,
Griffin -
Hey all,
I'm trying to use offboard control mode to give velocity commands to a starling 2 max and need position information at higher than 10 Hz (the default rate at which mavlink position messages are published)
Is it possible to access this information at a higher rate either by increasing the mavlink publishing rate or using MPA?
Kind regards,
GriffinFor anyone running into similar issues, here is the solution I found:
You can manually adjust the interval times of mavlink messages with the MAV_CMD_SET_MESSAGE_INTERVAL command, in this case for the LOCAL_POSITION_NED message.
Using
pymavlinkthis can be accomplished with:# self.client = mavutil.mavlink_connection( connection_string, ) # [...] self.client.mav.command_long_send( self.client.target_system, self.client.target_component, mavutil.mavlink.MAV_CMD_SET_MESSAGE_INTERVAL, 0, # confirmation 32, # LOCAL_POSITION_NED 10000, # Wait time in us 0, 0, 0, 0, 0 # param3-7: unused )Hope this helps anyone else who wants higher rate data!
-
For anyone running into similar issues, here is the solution I found:
You can manually adjust the interval times of mavlink messages with the MAV_CMD_SET_MESSAGE_INTERVAL command, in this case for the LOCAL_POSITION_NED message.
Using
pymavlinkthis can be accomplished with:# self.client = mavutil.mavlink_connection( connection_string, ) # [...] self.client.mav.command_long_send( self.client.target_system, self.client.target_component, mavutil.mavlink.MAV_CMD_SET_MESSAGE_INTERVAL, 0, # confirmation 32, # LOCAL_POSITION_NED 10000, # Wait time in us 0, 0, 0, 0, 0 # param3-7: unused )Hope this helps anyone else who wants higher rate data!
edit: use
mavutil.mavlink.MAVLINK_MSG_ID_LOCAL_POSITION_NED*instead of magic number32for message ID
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login