Template Struct on_motion_policy_base< Sophus::SE2< Scalar > >

Struct Documentation

template<class Scalar>
struct on_motion_policy_base<Sophus::SE2<Scalar>>

Specialization for on_motion_policy_base in SE2 space.

Template Parameters:

Scalar – The scalar type for SE2 elements.

Public Functions

inline constexpr on_motion_policy_base(Scalar min_distance, Scalar min_angle)

Constructor.

Parameters:
  • min_distance – The minimum translation distance to trigger the action.

  • min_angle – The minimum rotation angle (in radians) to trigger the action.

inline constexpr bool operator()(const Sophus::SE2<Scalar> &prev, const Sophus::SE2<Scalar> &current)

Return true if motion has been detected.

Checks the motion based on the provided SE2 pose, and triggers the action if the motion surpasses the specified distance and angle thresholds.

Parameters:
  • prev – The previous SE2 pose to check for motion.

  • current – The current SE2 pose to check for motion.

Returns:

True if the action should be triggered based on motion, false otherwise.