Go to the documentation of this file.
15 #ifndef BELUGA_POLICIES_ON_MOTION_HPP
16 #define BELUGA_POLICIES_ON_MOTION_HPP
41 template <
class Scalar>
50 : min_distance_(min_distance), min_angle_(min_angle) {}
62 const auto delta = prev.inverse() * current;
63 return std::abs(delta.translation().x()) > min_distance_ ||
64 std::abs(delta.translation().y()) > min_distance_ ||
65 std::abs(delta.so2().log()) > min_angle_;
69 Scalar min_distance_{0.0};
70 Scalar min_angle_{0.0};
108 template <
class Scalar>
109 constexpr
auto operator()(Scalar min_distance, Scalar min_angle)
const {
constexpr detail::make_policy_fn make_policy
Make policy function objects.
constexpr bool operator()(const Pose &pose)
Return true if motion has been detected.
constexpr on_motion_policy_base(Scalar min_distance, Scalar min_angle)
Constructor.
constexpr auto operator()(Scalar min_distance, Scalar min_angle) const
Overload that creates the policy closure in SE2 space.
Primary template for the on_motion_policy_base class.
constexpr bool operator()(const Sophus::SE2< Scalar > &prev, const Sophus::SE2< Scalar > ¤t)
Return true if motion has been detected.
std::optional< Pose > latest_pose_
The latest pose for motion comparison.
Base implementation for the on_motion_policy algorithm.
Implementation detail for the on_motion_fn object.
constexpr detail::on_motion_fn on_motion
Policy that triggers an action based on motion.
beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:53