Correct way to set Guided mode using MavSDK

Our setup:

Raspberry Pi 4 - raspbian11
BlueOS V1.4.0-beta.17
ArduRover V4.5.7
FlightController Navigator
Vehicle type - Surface Boat

I wanted to verify the way we are interacting with the autopilot through MavSDK. When we need our boat to go to a specific location we set it to guided mode, set offboard global position, start offboard. Does this look like the correct way of going to a station point?

  1. Create and send passthrough command (MavlinkPassthrough)
    1. command = mav_cmd_do_set_mode
    2. param 1 = 1
    3. param 2 = 15 (guided)
  2. Create Offboard PositionGlobal structure
    1. set lat
    2. set long
    3. set alt to 0
  3. Call Offboard set_postion_global with Offboard PositionGlobal structure
  4. call Offboard start to get boat moving
  5. …
  6. call Offboard stop to stop it (change to another mode, etc)

Are there other ways of going to station (for a boat) using MavSDK?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.