Brick
Toggle main menu visibility
Loading...
Searching...
No Matches
tank_wheel_velocities.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 velocities of a tank drive.
8
*/
9
struct
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
};
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
TankWheelVelocities
Represents the left and right velocities of a tank drive.
Definition
tank_wheel_velocities.h:9
TankWheelVelocities::right
units::Velocity right
Right wheel velocity.
Definition
tank_wheel_velocities.h:13
TankWheelVelocities::left
units::Velocity left
Left wheel velocity.
Definition
tank_wheel_velocities.h:11
core
math
kinematics
tank_wheel_velocities.h
Generated by
1.18.0