Brick
Loading...
Searching...
No Matches
tank_wheel_accelerations.h
1#pragma once
2#include "core/math/units.h"
3
4using namespace units::literals;
5
6/**
7 * @brief Represents the left and right accelerations of a tank drive.
8 */
9struct TankWheelAccelerations {
10 /** @brief Left wheel acceleration. */
11 units::Acceleration left = 0_inps2;
12 /** @brief Right wheel acceleration. */
13 units::Acceleration right = 0_inps2;
14
15 TankWheelAccelerations() = default;
16
17 TankWheelAccelerations(units::Acceleration left, units::Acceleration right)
18 : left(left), right(right) {}
19
20 bool operator==(const TankWheelAccelerations& other) const {
21 return left == other.left && right == other.right;
22 }
23
24 bool operator!=(const TankWheelAccelerations& other) const { return !(*this == other); }
25};
Definition units.h:691
constexpr bool operator==(const Q &lhs, const R &rhs)
Check whether two Quantities are equal.
Definition units.h:305
Represents the left and right accelerations of a tank drive.
Definition tank_wheel_accelerations.h:9
units::Acceleration left
Left wheel acceleration.
Definition tank_wheel_accelerations.h:11
units::Acceleration right
Right wheel acceleration.
Definition tank_wheel_accelerations.h:13