Idea for a more versatile offboard control

Idea for a more versatile offboard control

I would like to propose a draft to improve the offboard control. The aim is to: simplify the usage, increase the versatility and simplify the validity check.

I propose to allow different control type at the same time (Position, Velocity, Acceleration, Attitude, AttitudeRate) while being able to tell if the command is valid or not.

The UAV control can be split into 3 groups: Position, Altitude and Orientation. A valid command is composed of one instruction from each group. Enabling two features of one group will privilege the higher one in the list.

This allows the offboard control from all external libraries providing outputs like:

What do you think about it? Should I invest time in specification and implementation? Are some combinations non-possible?

Position:

  • (X, Y)
  • (Vx, Vy)
  • (Roll, Pitch)
  • (Ax, Ay)
  • (RollRate, PitchRate)
  • If not provided: Hold position

Altitude:

  • (Z)
  • (Vz)
  • (Az)
  • (Thrust)
  • If not provided: Hold altitude

Orientation:

  • (Yaw)
  • (YawRate)
  • If not provided: Hold yaw

Additional flags:

  • Altitude Reference (local or terrain)
  • Land
  • Takeoff

NOTE:

  • It seems that the (Vx, Vy, Z) control is possible with the current API.

Proposed message:

uint8_t MAV_FRAME_LOCAL_NED = 1
uint8_t MAV_FRAME_BODY_NED  = 8

# 4 bits for position
uint8_t CONTROL_XY = ...
uint8_t CONTROL_VX_VY = ...
uint8_t CONTROL_AX_AY = ...
uint8_t CONTROL_ROLL_PITCH = ...
uint8_t CONTROL_ROLL_PITCH_RATE = ...

# 4 bits for altitude
uint8_t CONTROL_Z = ...
uint8_t CONTROL_VZ = ...
uint8_t CONTROL_AZ = ...
uint8_t CONTROL_THRUST = ...

# 4 bits for yaw
uint8_t CONTROL_YAW = ...
uint8_t CONTROL_YAW_RATE = ...

# 4 bits for control type
uint8_t CONTROL_TAKEOFF = ...
uint8_t CONTROL_LAND = ...
uint8_t CONTROL_LOITER = ...

uint32_t time_boot_ms
uint8_t target_system
uint8_t target_component
uint8_t coordinate_frame
uint16_t control_mask
float x
float y
float z
float yaw 
4 Likes

Have you seen this? https://docs.google.com/document/d/1eMYBJRMl9JzqvydidBRB3IP8ZB16Z6d-zoegr8RNuaY/edit#heading=h.pnio4tywegf

@JonasVautherin FYI

1 Like

I just joined, thanks !