Brick
Loading...
Searching...
No Matches
tank_wheel_velocities.h
1#pragma once
2#include "core/math/units.h"
3
4using namespace units::literals;
5
6/**
7 * @brief Represents the left and right velocities of a tank drive.
8 */
9struct TankWheelVelocities {
10 /** @brief Left wheel velocity. */
11 units::Velocity left = 0_inps;
12 /** @brief Right wheel velocity. */
13 units::Velocity right = 0_inps;
14
15 TankWheelVelocities() = default;
16
17 TankWheelVelocities(units::Velocity left, units::Velocity right) : left(left), right(right) {}
18
19 bool operator==(const TankWheelVelocities& other) const {
20 return left == other.left && right == other.right;
21 }
22
23 bool operator!=(const TankWheelVelocities& other) const { return !(*this == other); }
24};
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 velocities of a tank drive.
Definition tank_wheel_velocities.h:9
units::Velocity right
Right wheel velocity.
Definition tank_wheel_velocities.h:13
units::Velocity left
Left wheel velocity.
Definition tank_wheel_velocities.h:11