No version for distro humble showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro jazzy showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro kilted showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro lyrical showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro rolling showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro galactic showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro iron showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro melodic showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange

No version for distro noetic showing github. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/vortexntnu/vortex-auv.git
VCS Type git
VCS Version main
Last Updated 2026-11-03
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Quaternion Reference model for the DP controller

Maintainers

  • jorgenfj

Authors

No additional authors.

Reference filter (quaternion)

Third-order reference filter

The underlying filter is the third-order model (Fossen, 2021):

\dot{x}_d = A_d x_d + B_d r

where

A_d = \begin{bmatrix}
0_{n\times n} & I_n & 0_{n\times n} \\
0_{n\times n} & 0_{n \times n} & I_n \\
-\Omega^3 & -(2 \Delta + I_n) \Omega^2 & -(2 \Delta + I_n) \Omega
\end{bmatrix}

and

B_d = \begin{bmatrix}
0_{n \times n} \\
0_{n \times n} \\
\Omega^3
\end{bmatrix}.

The state is integrated using forward Euler: $x_{i+1} = x_i + \dot{x}_i \cdot dt$.

Error-state formulation

This package avoids the singularity issues of Euler angles by using a quaternion-based error state.

Nominal pose — a Pose (position + quaternion) representing the current best estimate of the reference trajectory. This is the actual output.

Error state — the 18D filter state, where the first 6 elements are small errors relative to the nominal:

x = \begin{bmatrix} \delta p \\ \delta \phi \\ \dot{\eta} \\ \ddot{\eta} \end{bmatrix} \in \mathbb{R}^{18}

Indices Meaning
x[0:3] Position error $\delta p$ from nominal (meters)
x[3:6] Orientation error $\delta \phi$ from nominal (rotation vector, radians)
x[6:9] World-frame linear velocity (m/s)
x[9:12] World-frame angular velocity (rad/s)
x[12:18] Accelerations (linear + angular)

Step cycle

Each time step performs three operations:

  1. Compute reference error — The 6D reference $r$ is the error between the waypoint goal and the nominal pose:
    • $r_{0:3} = p_{goal} - p_{nominal}$
    • $r_{3:6} = \text{quaternion_error}(q_{nominal},\ q_{goal})$

    The quaternion_error function returns $2 \cdot \text{vec}(q_{nominal}^{-1} \otimes q_{goal})$, which for small angles approximates the rotation vector from nominal to goal.

  2. Integrate — The standard filter step:
   \dot{x} = A_d x + B_d r, \quad x \leftarrow x + \dot{x} \cdot dt
   
  1. Reset — Absorb position and orientation errors into the nominal pose, then zero them:
    • $p_{nominal} \leftarrow p_{nominal} + \delta p, \quad \delta p \leftarrow 0$
    • $q_{nominal} \leftarrow q_{nominal} \otimes \exp(\delta \phi), \quad \delta \phi \leftarrow 0$

    where $\exp(\delta \phi)$ converts the rotation vector to a quaternion via AngleAxis.

The reset step keeps $\delta p$ and $\delta \phi$ near zero at all times, ensuring the linearized quaternion error remains accurate. The velocity and acceleration states ($x_{6:18}$) are not reset — they carry over to provide smooth, continuous motion.

Output message (ReferenceFilterQuat)

Field Source Meaning
x, y, z Nominal pose position Desired position in world frame (m)
qw, qx, qy, qz Nominal pose quaternion Desired orientation (unit quaternion)
x_dot, y_dot, z_dot x[6:9] World-frame linear velocity (m/s)
roll_dot, pitch_dot, yaw_dot x[9:12] World-frame angular velocity (rad/s)

Waypoint modes

Each waypoint has a mode that determines which degrees of freedom are controlled by the reference filter. The mode also determines how convergence is measured.

Mode Controlled DOFs Convergence metric
FULL_POSE All 6 DOF (position + orientation) Position error and quaternion error
ONLY_POSITION x, y, z (orientation holds current value) Position error
FORWARD_HEADING x, y, z + yaw toward target Position error and yaw component of quaternion error
ONLY_ORIENTATION Orientation only (position holds current value) Quaternion error

For all modes, convergence is reached when the position error norm is below the waypoint’s position_tolerance [m] and the orientation error norm below its orientation_tolerance [rad]. A tolerance left at 0 uses the parameter default_position_tolerance / default_orientation_tolerance. A tolerance for a part the mode does not control (for example orientation_tolerance with ONLY_POSITION) has no effect.

The tolerances must hold continuously for the waypoint’s hold_time_sec (default 0, converge at once) before the goal succeeds. A new goal sent while another is executing keeps the filter state and only changes the target and tolerances; the first goal after startup starts from the measured pose and twist.

Action Server

The action server handles goal requests and publishes guidance commands. The server always prioritizes new goal requests, aborting ongoing requests when a new one arrives.

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

Name
eigen

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged reference_filter_dp_quat at Robotics Stack Exchange