2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
field_points.h File Reference
#include <argos_lib/general/angle_utils.h>
#include <frc/geometry/Pose2d.h>
#include <frc/geometry/Translation2d.h>
#include <frc/geometry/Translation3d.h>
#include <frc/spline/Spline.h>
#include <units/angle.h>
#include <units/length.h>
#include <vector>
#include "measure_up.h"

Go to the source code of this file.

Classes

struct  ScoringPosition
 
struct  Node
 

Namespaces

namespace  field_dimensions
 
namespace  utils
 
namespace  field_points
 
namespace  field_points::grids
 
namespace  field_points::charge_station
 
namespace  field_points::blue_alliance
 
namespace  field_points::blue_alliance::game_pieces
 
namespace  field_points::blue_alliance::charge_station
 
namespace  field_points::blue_alliance::inner_grid
 
namespace  field_points::blue_alliance::coop_grid
 
namespace  field_points::blue_alliance::outer_grid
 
namespace  field_points::red_alliance
 
namespace  field_points::red_alliance::game_pieces
 
namespace  field_points::red_alliance::charge_station
 
namespace  field_points::red_alliance::inner_grid
 
namespace  field_points::red_alliance::coop_grid
 
namespace  field_points::red_alliance::outer_grid
 
namespace  cone
 

Enumerations

enum class  ScoringColumn {
  leftGrid_leftCone , leftGrid_middleCube , leftGrid_rightCone , middleGrid_leftCone ,
  middleGrid_middleCube , middleGrid_rightCone , rightGrid_leftCone , rightGrid_middleCube ,
  rightGrid_rightCone , coneIntake , cubeIntake , stow ,
  invalid
}
 
enum class  ScoringRow { low , middle , high , invalid }
 
enum  GamePiece { CONE , CUBE , HYBRID }
 

Functions

constexpr frc::Translation3d utils::ReflectFieldPoint (const frc::Translation3d source)
 Reflects the point source over the middle of the field to get equivelent points accross the field.
 
constexpr frc::Translation2d utils::ReflectFieldPoint (const frc::Translation2d source)
 
constexpr units::angle::degree_t utils::ReflectAngle (const units::angle::degree_t sourceAngle)
 
template<class T >
std::vector< T > utils::ReflectFieldPoint (const std::vector< T > source)
 
constexpr frc::Spline< 3 >::ControlVector utils::ReflectFieldPoint (const frc::Spline< 3 >::ControlVector source)
 
frc::Pose2d utils::ReflectFieldPoint (const frc::Pose2d source)
 
constexpr units::inch_t utils::ReflectYLine (const units::inch_t source)
 

Variables

constexpr auto field_dimensions::fieldMaxY = 315.5975_in
 
constexpr auto field_dimensions::fieldMaxX = 651.2225_in
 
constexpr auto field_dimensions::fieldMiddleX = fieldMaxX / 2
 
constexpr auto field_points::doubleSubstationHeight = 37.375_in
 
constexpr auto field_points::doubleSubstationDepth = 13_in
 
constexpr auto field_points::doubleSubstationSliderWidth = 14_in
 
constexpr auto field_points::singleSubstationHeightTop = 45.125_in
 
constexpr auto field_points::singleSubstationHeightBottom = 27.125_in
 
constexpr auto field_points::singleSubstationWidth = 22.75_in
 
constexpr auto field_points::grids::gridDepth = 54.05_in
 Distance from alliance station wall to end of grid dividers.
 
constexpr auto field_points::grids::highConeNodeDepth = 39.75_in
 
constexpr auto field_points::grids::highConeNodeHeight = 46_in
 
constexpr auto field_points::grids::highCubeNodeDepth = 39.75_in
 
constexpr auto field_points::grids::highCubeNodeHeight = 35.5_in
 
constexpr auto field_points::grids::middleConeNodeDepth = 22.75_in
 
constexpr auto field_points::grids::middleConeNodeHeight = 34_in
 
constexpr auto field_points::grids::middleCubeNodeDepth = 22.75_in
 
constexpr auto field_points::grids::middleCubeNodeHeight = 23.5_in
 
constexpr auto field_points::grids::lowConeNodeDepth = 12_in
 
constexpr auto field_points::grids::lowConeNodeHeight = 0_in
 
constexpr auto field_points::grids::lowCubeNodeDepth = 12_in
 
constexpr auto field_points::grids::lowCubeNodeHeight = 0_in
 
constexpr auto field_points::grids::highNodeX = 14.5244_in
 
constexpr auto field_points::grids::middleNodeX = 31.55_in
 
constexpr auto field_points::grids::lowNodeX = 46.01708_in
 
constexpr units::inch_t field_points::charge_station::innerEdgeX = 115.894_in
 Side closest to the driver station.
 
constexpr units::inch_t field_points::charge_station::outerEdgeX = 190.105_in
 Side closest to the game pieces.
 
constexpr auto field_points::blue_alliance::game_pieces::gp_0 = frc::Translation3d{278.25_in, 180_in, 0_in}
 
constexpr auto field_points::blue_alliance::game_pieces::gp_1 = frc::Translation3d{278.25_in, 132_in, 0_in}
 
constexpr auto field_points::blue_alliance::game_pieces::gp_2 = frc::Translation3d{278.25_in, 84_in, 0_in}
 
constexpr auto field_points::blue_alliance::game_pieces::gp_3 = frc::Translation3d{278.25_in, 36_in, 0_in}
 
constexpr frc::Translation3d field_points::blue_alliance::charge_station::chargeStationCenter = frc::Translation3d{153_in, 108_in, 9_in}
 
constexpr auto field_points::blue_alliance::innerGridLeftY = 196.185_in
 
constexpr auto field_points::blue_alliance::innerGridMiddleY = 174.185_in
 
constexpr auto field_points::blue_alliance::innerGridRightY = 152.185_in
 
constexpr auto field_points::blue_alliance::coopGridLeftY = 130.185_in
 
constexpr auto field_points::blue_alliance::coopGridMiddleY = 108.185_in
 
constexpr auto field_points::blue_alliance::coopGridRightY = 86.185_in
 
constexpr auto field_points::blue_alliance::outerGridLeftY = 64.185_in
 
constexpr auto field_points::blue_alliance::outerGridMiddleY = 42.185_in
 
constexpr auto field_points::blue_alliance::outerGridRightY = 20.185_in
 
constexpr Node field_points::blue_alliance::inner_grid::topRowLeft
 
constexpr Node field_points::blue_alliance::inner_grid::topRowMiddle
 
constexpr Node field_points::blue_alliance::inner_grid::topRowRight
 
constexpr Node field_points::blue_alliance::inner_grid::middleRowLeft
 
constexpr Node field_points::blue_alliance::inner_grid::middleRowMiddle
 
constexpr Node field_points::blue_alliance::inner_grid::middleRowRight
 
constexpr Node field_points::blue_alliance::inner_grid::bottomRowLeft
 
constexpr Node field_points::blue_alliance::inner_grid::bottomRowMiddle
 
constexpr Node field_points::blue_alliance::inner_grid::bottomRowRight
 
constexpr Node field_points::blue_alliance::coop_grid::topRowLeft
 
constexpr Node field_points::blue_alliance::coop_grid::topRowMiddle
 
constexpr Node field_points::blue_alliance::coop_grid::topRowRight
 
constexpr Node field_points::blue_alliance::coop_grid::middleRowLeft
 
constexpr Node field_points::blue_alliance::coop_grid::middleRowMiddle
 
constexpr Node field_points::blue_alliance::coop_grid::middleRowRight
 
constexpr Node field_points::blue_alliance::coop_grid::bottomRowLeft
 
constexpr Node field_points::blue_alliance::coop_grid::bottomRowMiddle
 
constexpr Node field_points::blue_alliance::coop_grid::bottomRowRight
 
constexpr Node field_points::blue_alliance::outer_grid::topRowLeft
 
constexpr Node field_points::blue_alliance::outer_grid::topRowMiddle
 
constexpr Node field_points::blue_alliance::outer_grid::topRowRight
 
constexpr Node field_points::blue_alliance::outer_grid::middleRowLeft
 
constexpr Node field_points::blue_alliance::outer_grid::middleRowMiddle
 
constexpr Node field_points::blue_alliance::outer_grid::middleRowRight
 
constexpr Node field_points::blue_alliance::outer_grid::bottomRowLeft
 
constexpr Node field_points::blue_alliance::outer_grid::bottomRowMiddle
 
constexpr Node field_points::blue_alliance::outer_grid::bottomRowRight
 
constexpr auto field_points::red_alliance::game_pieces::gp_0 = utils::ReflectFieldPoint(blue_alliance::game_pieces::gp_0)
 
constexpr auto field_points::red_alliance::game_pieces::gp_1 = utils::ReflectFieldPoint(blue_alliance::game_pieces::gp_1)
 
constexpr auto field_points::red_alliance::game_pieces::gp_2 = utils::ReflectFieldPoint(blue_alliance::game_pieces::gp_2)
 
constexpr auto field_points::red_alliance::game_pieces::gp_3 = utils::ReflectFieldPoint(blue_alliance::game_pieces::gp_3)
 
constexpr frc::Translation3d field_points::red_alliance::charge_station::chargeStationCenter
 
constexpr auto field_points::red_alliance::innerGridLeftY = utils::ReflectYLine(blue_alliance::innerGridLeftY)
 
constexpr auto field_points::red_alliance::innerGridMiddleY = utils::ReflectYLine(blue_alliance::innerGridMiddleY)
 
constexpr auto field_points::red_alliance::innerGridRightY = utils::ReflectYLine(blue_alliance::innerGridRightY)
 
constexpr auto field_points::red_alliance::coopGridLeftY = utils::ReflectYLine(blue_alliance::coopGridLeftY)
 
constexpr auto field_points::red_alliance::coopGridMiddleY = utils::ReflectYLine(blue_alliance::coopGridMiddleY)
 
constexpr auto field_points::red_alliance::coopGridRightY = utils::ReflectYLine(blue_alliance::coopGridRightY)
 
constexpr auto field_points::red_alliance::outerGridLeftY = utils::ReflectYLine(blue_alliance::outerGridLeftY)
 
constexpr auto field_points::red_alliance::outerGridMiddleY = utils::ReflectYLine(blue_alliance::outerGridMiddleY)
 
constexpr auto field_points::red_alliance::outerGridRightY = utils::ReflectYLine(blue_alliance::outerGridRightY)
 
constexpr Node field_points::red_alliance::inner_grid::topRowLeft
 
constexpr Node field_points::red_alliance::inner_grid::topRowMiddle
 
constexpr Node field_points::red_alliance::inner_grid::topRowRight
 
constexpr Node field_points::red_alliance::inner_grid::middleRowLeft
 
constexpr Node field_points::red_alliance::inner_grid::middleRowMiddle
 
constexpr Node field_points::red_alliance::inner_grid::middleRowRight
 
constexpr Node field_points::red_alliance::inner_grid::bottomRowLeft
 
constexpr Node field_points::red_alliance::inner_grid::bottomRowMiddle
 
constexpr Node field_points::red_alliance::inner_grid::bottomRowRight
 
constexpr Node field_points::red_alliance::coop_grid::topRowLeft
 
constexpr Node field_points::red_alliance::coop_grid::topRowMiddle
 
constexpr Node field_points::red_alliance::coop_grid::topRowRight
 
constexpr Node field_points::red_alliance::coop_grid::middleRowLeft
 
constexpr Node field_points::red_alliance::coop_grid::middleRowMiddle
 
constexpr Node field_points::red_alliance::coop_grid::middleRowRight
 
constexpr Node field_points::red_alliance::coop_grid::bottomRowLeft
 
constexpr Node field_points::red_alliance::coop_grid::bottomRowMiddle
 
constexpr Node field_points::red_alliance::coop_grid::bottomRowRight
 
constexpr Node field_points::red_alliance::outer_grid::topRowLeft
 
constexpr Node field_points::red_alliance::outer_grid::topRowMiddle
 
constexpr Node field_points::red_alliance::outer_grid::topRowRight
 
constexpr Node field_points::red_alliance::outer_grid::middleRowLeft
 
constexpr Node field_points::red_alliance::outer_grid::middleRowMiddle
 
constexpr Node field_points::red_alliance::outer_grid::middleRowRight
 
constexpr Node field_points::red_alliance::outer_grid::bottomRowLeft
 
constexpr Node field_points::red_alliance::outer_grid::bottomRowMiddle
 
constexpr Node field_points::red_alliance::outer_grid::bottomRowRight
 
constexpr auto cone::coneWidth = 6_in
 Does not include square rim.
 

Enumeration Type Documentation

◆ GamePiece

enum GamePiece
Enumerator
CONE 
CUBE 
HYBRID 

◆ ScoringColumn

enum class ScoringColumn
strong
Enumerator
leftGrid_leftCone 
leftGrid_middleCube 
leftGrid_rightCone 
middleGrid_leftCone 
middleGrid_middleCube 
middleGrid_rightCone 
rightGrid_leftCone 
rightGrid_middleCube 
rightGrid_rightCone 
coneIntake 
cubeIntake 
stow 
invalid 

◆ ScoringRow

enum class ScoringRow
strong
Enumerator
low 
middle 
high 
invalid