px4.parameter.mpc_xy_vel_max.set

开放平台 PX4 参数命令。PX4 参数:MPC_XY_VEL_MAX 设置多旋翼位置控制的水平最大速度。PX4 会将所有速度控制模式中的水平速度限制在该参数之内。

请求参数

vendor
string
必填
固定 px4
device_id
string
必填
目标 PX4 设备 ID
command_type
string
必填
固定 px4.parameter.mpc_xy_vel_max.set
idempotency_key
string
必填
幂等键;重复请求返回同一命令
timeout_seconds
integer
超时秒数,范围 0~300
payload
object
必填
MpcXyVelMaxSetRequest
payload.value
number
必填
水平最大速度,单位 m/s,范围 0~20

PX4 帧映射

  • PX4 source: docs/px4/src/modules/mc_pos_control/multicopter_position_control_limits_params.yaml
  • PX4 parameter: MPC_XY_VEL_MAX
  • Parameter type: real32
  • Default: 12.0 m/s
  • Range: 0~20 m/s
  • MAVLink frame: PARAM_SET
  • Message ID: 23
  • Completion: MpcXyVelMaxSetResponse,内部携带 PARAM_VALUE / PARAM_ERROR
  • Guard: PX4_PARAMETER_WRITE_ALLOWLIST 必须包含 MPC_XY_VEL_MAX

创建响应

command_id
string
平台命令 ID,用于后续查询
status
string
受理状态:ACCEPTED
accepted_at
string(datetime)
命令受理时间(UTC)

查询响应

status
string
执行状态:ACCEPTED / DELIVERED / SUCCEEDED / FAILED / TIMED_OUT / UNMATCHED_RESPONSE
vendor_response
object
MpcXyVelMaxSetResponse 摘要,包含 PARAM_VALUEPARAM_ERROR 结果
curl -X POST "/api/v1/open/downlink/commands" \
  -H "Content-Type: application/json" \
  -H "X-Api-Id: YOUR_API_ID" \
  -H "X-Api-Timestamp: YOUR_UNIX_SECONDS" \
  -H "X-Api-Nonce: YOUR_NONCE" \
  -H "X-Api-Signature: YOUR_SIGNATURE" \
  -d "{\"vendor\":\"px4\",\"device_id\":\"px4-real-1\",\"command_type\":\"px4.parameter.mpc_xy_vel_max.set\",\"payload\":{\"value\":12.5},\"idempotency_key\":\"req-set-MPC_XY_VEL_MAX-001\",\"timeout_seconds\":30}"
{
  "command_id": "8cdb5bf3-8902-c5f7-f9aa-dc7fa0af1de0",
  "status": "ACCEPTED",
  "accepted_at": "2026-06-15T00:00:00Z"
}