1516X High Stakes 2.0
Codebase for 1516X High Stakes season
Loading...
Searching...
No Matches
Robot::Globals Namespace Reference

Functions

pros::Controller controller (pros::E_CONTROLLER_MASTER)
 
pros::Controller partner (pros::E_CONTROLLER_PARTNER)
 
pros::Motor RightFront (13, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor LeftFront (-19, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor LeftBack (-18, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor RightBack (12, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor LeftMid (20, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor RightMid (-11, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor IntakeMotor (-1, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
 
pros::Motor HookMotor (-2, pros::v5::MotorGears::green, pros::v5::MotorUnits::degrees)
 
pros::Motor LadyBrownMotor (3, pros::v5::MotorGears::green, pros::v5::MotorUnits::degrees)
 
pros::adi::Pneumatics LatchControl ('A', false)
 
pros::adi::Pneumatics HangControl ('C', false)
 
pros::adi::Pneumatics SweeperControl ('B', false)
 
pros::Distance distance_sensor (10)
 
pros::Rotation lateral_sensor (16)
 
pros::Rotation horizontal_sensor (17)
 
pros::Imu inertial_sensor (14)
 
pros::Vision colorSensor (4)
 
pros::MotorGroup drive_left ({LeftFront.get_port(), LeftMid.get_port(), LeftBack.get_port()})
 
pros::MotorGroup drive_right ({RightFront.get_port(), RightMid.get_port(), RightBack.get_port()})
 
pros::MotorGroup drive_ ({LeftFront.get_port(), RightFront.get_port(), LeftMid.get_port(), RightMid.get_port(), LeftBack.get_port(), RightBack.get_port()})
 
lemlib::ControllerSettings lateral_controller (5.25, 0, 13, 3, 1, 100, 3, 500, 20)
 
lemlib::ControllerSettings angular_controller (1.73, 0, 9, 3, 1, 100, 2, 500, 0)
 
lemlib::ExpoDriveCurve throttle_curve (3, 15, 1.019)
 
lemlib::ExpoDriveCurve steer_curve (3, 17, 1.01)
 
lemlib::Chassis chassis (drivetrain, lateral_controller, angular_controller, sensors, &throttle_curve, &steer_curve)
 

Variables

pros::vision_signature_s_t RED_SIG
 
pros::vision_signature_s_t BLUE_SIG
 
pros::vision_signature_s_t BLUE_DARK_SIG
 
lemlib::TrackingWheel horizontal_tracking_wheel & horizontal_sensor
 
lemlib::TrackingWheel vertical_tracking_wheel & lateral_sensor
 
lemlib::Drivetrain drivetrain
 
lemlib::OdomSensors sensors
 

Function Documentation

◆ angular_controller()

lemlib::ControllerSettings Robot::Globals::angular_controller ( 1. 73,
0 ,
9 ,
3 ,
1 ,
100 ,
2 ,
500 ,
0  )

Referenced by chassis().

◆ chassis()

◆ colorSensor()

pros::Vision Robot::Globals::colorSensor ( 4 )

◆ controller()

◆ distance_sensor()

pros::Distance Robot::Globals::distance_sensor ( 10 )

◆ drive_()

pros::MotorGroup Robot::Globals::drive_ ( {LeftFront.get_port(), RightFront.get_port(), LeftMid.get_port(), RightMid.get_port(), LeftBack.get_port(), RightBack.get_port()} )

◆ drive_left()

pros::MotorGroup Robot::Globals::drive_left ( {LeftFront.get_port(), LeftMid.get_port(), LeftBack.get_port()} )

References LeftBack(), LeftFront(), and LeftMid().

◆ drive_right()

pros::MotorGroup Robot::Globals::drive_right ( {RightFront.get_port(), RightMid.get_port(), RightBack.get_port()} )

References RightBack(), RightFront(), and RightMid().

◆ HangControl()

pros::adi::Pneumatics Robot::Globals::HangControl ( 'C' ,
false  )

Referenced by Robot::Hang::toggle().

◆ HookMotor()

pros::Motor Robot::Globals::HookMotor ( - 2,
pros::v5::MotorGears::green ,
pros::v5::MotorUnits::degrees  )

Referenced by Robot::Intake::run().

◆ horizontal_sensor()

pros::Rotation Robot::Globals::horizontal_sensor ( 17 )

◆ inertial_sensor()

pros::Imu Robot::Globals::inertial_sensor ( 14 )

◆ IntakeMotor()

pros::Motor Robot::Globals::IntakeMotor ( - 1,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by Robot::Intake::run().

◆ LadyBrownMotor()

pros::Motor Robot::Globals::LadyBrownMotor ( 3 ,
pros::v5::MotorGears::green ,
pros::v5::MotorUnits::degrees  )

◆ LatchControl()

pros::adi::Pneumatics Robot::Globals::LatchControl ( 'A' ,
false  )

Referenced by Robot::Latch::toggle().

◆ lateral_controller()

lemlib::ControllerSettings Robot::Globals::lateral_controller ( 5. 25,
0 ,
13 ,
3 ,
1 ,
100 ,
3 ,
500 ,
20  )

Referenced by chassis().

◆ lateral_sensor()

pros::Rotation Robot::Globals::lateral_sensor ( 16 )

◆ LeftBack()

pros::Motor Robot::Globals::LeftBack ( - 18,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by drive_(), and drive_left().

◆ LeftFront()

pros::Motor Robot::Globals::LeftFront ( - 19,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by drive_(), and drive_left().

◆ LeftMid()

pros::Motor Robot::Globals::LeftMid ( 20 ,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by drive_(), and drive_left().

◆ partner()

pros::Controller Robot::Globals::partner ( pros::E_CONTROLLER_PARTNER )

◆ RightBack()

pros::Motor Robot::Globals::RightBack ( 12 ,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by drive_(), and drive_right().

◆ RightFront()

pros::Motor Robot::Globals::RightFront ( 13 ,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by drive_(), and drive_right().

◆ RightMid()

pros::Motor Robot::Globals::RightMid ( - 11,
pros::v5::MotorGears::blue ,
pros::v5::MotorUnits::degrees  )

Referenced by drive_(), and drive_right().

◆ steer_curve()

lemlib::ExpoDriveCurve Robot::Globals::steer_curve ( 3 ,
17 ,
1. 01 )

Referenced by chassis().

◆ SweeperControl()

pros::adi::Pneumatics Robot::Globals::SweeperControl ( 'B' ,
false  )

Referenced by Robot::Sweeper::run().

◆ throttle_curve()

lemlib::ExpoDriveCurve Robot::Globals::throttle_curve ( 3 ,
15 ,
1. 019 )

Referenced by chassis().

Variable Documentation

◆ BLUE_DARK_SIG

pros::vision_signature_s_t Robot::Globals::BLUE_DARK_SIG
Initial value:
=
pros::c::vision_signature_from_utility(3, -4793, -4173, -4483, 1069, 2765, 1917, 3, 0)

Definition at line 54 of file globals.cpp.

◆ BLUE_SIG

pros::vision_signature_s_t Robot::Globals::BLUE_SIG
Initial value:
=
pros::c::vision_signature_from_utility(2, 9187, 12161, 10674, -375, 1327, 476, 2.5, 0)

Definition at line 52 of file globals.cpp.

◆ drivetrain

lemlib::Drivetrain Robot::Globals::drivetrain
Initial value:
{
12.25,
lemlib::Omniwheel::OLD_325,
450,
2
}
pros::MotorGroup drive_right({RightFront.get_port(), RightMid.get_port(), RightBack.get_port()})
pros::MotorGroup drive_left({LeftFront.get_port(), LeftMid.get_port(), LeftBack.get_port()})

Definition at line 69 of file globals.cpp.

69 {
70 &drive_left, // left drivetrain motors
71 &drive_right, // right drivetrain motors
72 12.25, // track width
73 lemlib::Omniwheel::OLD_325,
74 450, // drivetrain rpm is 450
75 2 // horizontal drift is 2
76};

Referenced by chassis().

◆ horizontal_sensor

lemlib::TrackingWheel horizontal_tracking_wheel& Robot::Globals::horizontal_sensor

Definition at line 64 of file globals.cpp.

Referenced by initialize().

◆ lateral_sensor

lemlib::TrackingWheel vertical_tracking_wheel& Robot::Globals::lateral_sensor

Definition at line 65 of file globals.cpp.

Referenced by initialize().

◆ RED_SIG

pros::vision_signature_s_t Robot::Globals::RED_SIG
Initial value:
=
pros::c::vision_signature_from_utility(1, -4653, -3619, -4136, 9831, 11725, 10778, 2.5, 0)

Definition at line 49 of file globals.cpp.

◆ sensors

lemlib::OdomSensors Robot::Globals::sensors
Initial value:
{
&vertical_tracking_wheel,
nullptr,
&horizontal_tracking_wheel,
nullptr,
}
pros::Imu inertial_sensor(14)

Definition at line 78 of file globals.cpp.

78 {
79 &vertical_tracking_wheel, // vertical tracking wheel 1
80 nullptr, // vertical tracking wheel 2
81 &horizontal_tracking_wheel, // horizontal tracking wheel 1
82 nullptr, // we don't have a second tracking wheel, so we set it to nullptr
83 &inertial_sensor // inertial sensor
84};

Referenced by chassis().