Line data Source code
1 : #ifndef CONTROLS_TRAJECTORY_TRAJECTORY_6DOF_LIMITS_H 2 : #define CONTROLS_TRAJECTORY_TRAJECTORY_6DOF_LIMITS_H 3 : 4 : /** 5 : * @brief Kinematic limits used when planning 6DOF polynomial trajectories 6 : * 7 : * Separate velocity, acceleration, and jerk budgets are provided for the 8 : * XY plane, the Z axis, and the Yaw axis. The slow-down gain controls how 9 : * quickly the trajectory generator adapts its timing when thrusters saturate. 10 : */ 11 1 : struct Trajectory6DOFLimits { 12 : /** @brief Maximum XY speed in m/s */ 13 : double max_xy_vel = 0.7; 14 : 15 : /** @brief Maximum XY acceleration in m/s² */ 16 : double max_xy_acc = 0.4; 17 : 18 : /** @brief Maximum XY jerk in m/s³ */ 19 : double max_xy_jerk = 0.1; 20 : 21 : /** @brief Maximum Z speed in m/s */ 22 : double max_z_vel = 0.2; 23 : 24 : /** @brief Maximum Z acceleration in m/s² */ 25 : double max_z_acc = 0.2; 26 : 27 : /** @brief Maximum Z jerk in m/s³ */ 28 : double max_z_jerk = 0.1; 29 : 30 : /** @brief Maximum yaw rate in rad/s */ 31 : double max_yaw_vel = 1.2; 32 : 33 : /** @brief Maximum yaw angular acceleration in rad/s² */ 34 : double max_yaw_acc = 0.8; 35 : 36 : /** @brief Maximum yaw jerk in rad/s³ */ 37 : double max_yaw_jerk = 0.4; 38 : 39 : /** 40 : * @brief Rate at which the slow-down scale factor converges toward the saturated or nominal value 41 : * 42 : * At each control tick: scale(t+1) ≈ scale(t) + slow_down_gain * (saturated ? 1 : -1) 43 : */ 44 : double slow_down_gain = 0.0003; 45 : }; 46 : 47 : #endif // CONTROLS_TRAJECTORY_TRAJECTORY_6DOF_LIMITS_H