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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login