MAV_CMD
저작권: 쿼드(QUAD) 드론연구소 https://www.youtube.com/@quad-robotics
Last updated
저작권: 쿼드(QUAD) 드론연구소 https://www.youtube.com/@quad-robotics
Last updated
MAV_CMD 메세지는 자동 비행 모드에서 기체에 줄 수 있는 제어명령 목록 입니다.
MAV_CMD는 크게 COMMAND_INT 와 COMMAND_LONG 타입이 있으며, 드론에 어떠한 명령을 보낼때 사용합니다.
COMMAND_INT
target_system
uint8_t
System ID
target_component
uint8_t
Component ID (0 : 모든 컴포넌트)
frame
uint8_t
좌표계
command
uint16_t
current
uint8_t
Not used (set 0)
autocontinue
uint8_t
Not used (set 0)
param1
float
PARAM1
param2
float
PARAM2
param3
float
PARAM3
param4
float
PARAM4
param5
int32_t
Local: x position in meters * 1e4, Global: 위도 * 10^7
param6
int32_t
Local: y position in meters * 1e4, Global: 경도 * 10^7
param7
float
z position: Global: 고도 m (좌표계에 따라 절대고도, 상대고도)
COMMAND_LONG
target_system
uint8_t
System ID
target_component
uint8_t
Component ID (0 : 모든 컴포넌트)
command
uint16_t
confirmation
uint8_t
0: First transmission of this command. 1-255: Confirmation transmissions
param1
float
Parameter 1 (for the specific command).
param2
float
Parameter 2 (for the specific command).
param3
float
Parameter 3 (for the specific command).
param4
float
Parameter 4 (for the specific command).
param5
float
Parameter 5 (for the specific command).
param6
float
Parameter 6 (for the specific command).
param7
float
Parameter 7 (for the specific command).
COMMAND_ACK.result_param2는
명령별 enum에 명령 거부 이유에 대한 추가 정보를 포함할 수도 있습니다.
ACK를 받지 못한 경우 GCS는 COMMAND_INT를
다시 보냅니다.
명령이 드롭되면 발신자는 confirmation 필드를 증가해야 합니다.
취소가 되지 않으면 드론은 완료될 때까지 진행률 업데이트를 계속 보낼 수 있습니다.
시퀀스가 이미 완료되었거나 유휴 상태이면 취소 명령을 무시 합니다.
진행률 메시지MAV_RESULT_IN_PROGRESS
가 내보내지는 속도는 시스템에 따라 다릅니다.
진행 또는 완료 업데이트를 기다리는 동안 시간 초과가 트리거되면 GCS는 시퀀스를 종료(유휴 상태로 돌아가기)하고 적절한 경우 사용자에게 알려야 합니다.
특정 장기 실행 명령 의 한 인스턴스만 한 번에 실행할 수 있습니다. 장기 실행 작업을 다시 시작하려면 먼저 기존 명령을 취소해야 합니다!
이 프로토콜은 수신 플라이트 스택의 상태 시스템에서 지원하는 경우 서로 다른 장기 실행 명령을 병렬로 실행할 수 있습니다.
command
uint16_t
Command ID (of acknowledged command).
result
uint8_t
Result of command.
uint8_t
%
int32_t
uint8_t
uint8_t
는 GPS 좌표 또는 고도 정보가 포함된 명령을 보낼 때 사용해야 합니다. 이는 위치 및 고도 값에 대해 정확한 좌표 프레임을 지정할 수 있기 때문입니다.
Command ID, see enum
은 매개변수 5와 6에서 부동소수점 값을 보내는 데 사용해야 합니다. 이러한 값은 COMMAND_INT
에서 보내면 정수로 잘립니다.
Command ID, see enum
내에 인코딩된 지상국에서 전송됩니다 . 드론은 요청을 처리하고 결과를 나타내는 결과()는 명령이 승인되었거나( COMMAND_ACK.result=MAV_RESULT_ACCEPTED
), 승인되어 진행 중이거나(MAV_RESULT_IN_PROGRESS) 일부 이유 코드와 함께 거부 됩니다. "MAV_RESULT_ACCEPTED
"은 명령이 유효하고 플라이트 스택이 명령이 완료되었음을 의미하는 것이 아니라 그에 대한 조치를 시도함을 의미합니다. 대부분의 명령은 "MAV_RESULT_ACCEPTED
"을 반환합니다.
일부 명령은 오래 실행 되며 즉시 완료할 수 없습니다. 드론은 COMMMAND_ACK
메시지를 전송하여 진행률COMMMAND_ACK.progress
을 보고하고 진행률을 ([0-100] 퍼센트 완료, 진행률이 제공되지 않은 경우 255) 백분율로 표시합니다. 작업이 완료되면 드론은 작업의 최종 결과 ( MAV_RESULT_ACCEPTED, MAV_RESULT_FAILED, MAV_RESULT_CANCELLED
)를 포함하는 COMMMAND_ACK로
종료해야 합니다.
메시지를 전송하여 취소할 수 있습니다 . 드론은 작업을 취소하고 COMMAND_ACK(COMMAND_ACK.result=MAV_RESULT_CANCELLED)
를 보내 시퀀스를 완료해야 합니다.
progress
The progress percentage when result is . Values: [0-100], or UINT8_MAX if the progress is unknown.
result_param2
Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding (this enum should have a 0 value to indicate "unused" or "unknown").
target_system
System ID of the target recipient. This is the ID of the system that sent the command for which this is an acknowledgement.
target_component
Component ID of the target recipient. This is the ID of the system that sent the command for which this is an acknowledgement.