Files
PX4-Autopilot/docs/en/msg_docs/TrajectorySetpoint.md
PX4BuildBot be784e21f7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-27 02:57:43 +00:00

56 lines
2.7 KiB
Markdown

---
pageClass: is-wide-page
---
# TrajectorySetpoint (UORB message)
Trajectory setpoint in NED frame. Input to PID position controller. Needs to be kinematically consistent and feasible for smooth flight. setting a value to NaN means the state should not be controlled.
**TOPICS:** trajectory_setpoint
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ----------------------------------------- | ------------ | ------------ | ---------- | ---------------------------------------------------------- |
| <a id="fld_timestamp"></a>timestamp | `uint64` | | | time since system start (microseconds) |
| <a id="fld_position"></a>position | `float32[3]` | | | in meters |
| <a id="fld_velocity"></a>velocity | `float32[3]` | | | in meters/second |
| <a id="fld_acceleration"></a>acceleration | `float32[3]` | | | in meters/second^2 |
| <a id="fld_jerk"></a>jerk | `float32[3]` | | | in meters/second^3 (for logging only) |
| <a id="fld_yaw"></a>yaw | `float32` | | | euler angle of desired attitude in radians -PI..+PI |
| <a id="fld_yawspeed"></a>yawspeed | `float32` | | | angular velocity around NED frame z-axis in radians/second |
## Constants
| Name | Type | Value | Description |
| --------------------------------------------- | -------- | ----- | ----------- |
| <a id="#MESSAGE_VERSION"></a> MESSAGE_VERSION | `uint32` | 0 |
## Source Message
[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/TrajectorySetpoint.msg)
::: details Click here to see original file
```c
# Trajectory setpoint in NED frame
# Input to PID position controller.
# Needs to be kinematically consistent and feasible for smooth flight.
# setting a value to NaN means the state should not be controlled
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
# NED local world frame
float32[3] position # in meters
float32[3] velocity # in meters/second
float32[3] acceleration # in meters/second^2
float32[3] jerk # in meters/second^3 (for logging only)
float32 yaw # euler angle of desired attitude in radians -PI..+PI
float32 yawspeed # angular velocity around NED frame z-axis in radians/second
```
:::