Brick
Toggle main menu visibility
Loading...
Searching...
No Matches
tank_wheel_accelerations.h
1
#pragma once
2
#include "core/math/units.h"
3
4
using namespace
units::literals
;
5
6
/**
7
* @brief Represents the left and right accelerations of a tank drive.
8
*/
9
struct
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
};
units::literals
Definition
units.h:691
units::operator==
constexpr bool operator==(const Q &lhs, const R &rhs)
Check whether two Quantities are equal.
Definition
units.h:305
TankWheelAccelerations
Represents the left and right accelerations of a tank drive.
Definition
tank_wheel_accelerations.h:9
TankWheelAccelerations::left
units::Acceleration left
Left wheel acceleration.
Definition
tank_wheel_accelerations.h:11
TankWheelAccelerations::right
units::Acceleration right
Right wheel acceleration.
Definition
tank_wheel_accelerations.h:13
core
math
kinematics
tank_wheel_accelerations.h
Generated by
1.18.0