Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d36f3ea2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Correctly configure rate limiter"

parents 0eb0f136 c2d2840a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ std::tuple<Pose3f, bool> moveWithRateLimit(const Pose3f& from, const Pose3f& to,
        return {to, false};
    }
    // Always rate limit if t is 0 (required to avoid division by 0).
    if (t == 0) {
    if (t == 0 || maxTranslationalVelocity == 0 || maxRotationalVelocity == 0) {
        return {from, true};
    }

+2 −2
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@ using namespace std::chrono_literals;
namespace {

// This is how fast, in m/s, we allow position to shift during rate-limiting.
constexpr auto kMaxTranslationalVelocity = 2;
constexpr float kMaxTranslationalVelocity = 2;

// This is how fast, in rad/s, we allow rotation angle to shift during rate-limiting.
constexpr auto kMaxRotationalVelocity = 8;
constexpr float kMaxRotationalVelocity = 8;

// This should be set to the typical time scale that the translation sensors used drift in. This
// means, loosely, for how long we can trust the reading to be "accurate enough". This would