Skip to main content
Version: 2.x

Drive Constructors

Integrated Encoders

This is the standard setup that uses built in motor encoders.

left_motor_ports a vector of left motor ports, negative reverses the port. first motor is used for sensing right_motor_ports a vector of right motor ports, negative reverses the port. first motor is used for sensing imu_port the port an imu is in wheel_diameter diameter of your drive wheel ticks cartridge rpm ratio external ratio of your drive. should be wheel gear / motor gear

Drive(std::vector<int> left_motor_ports, std::vector<int> right_motor_ports, int imu_port, 
double wheel_diameter, double ticks, double ratio);

ADI Encoders in Brain

Only supports parallel trackers.

left_motor_ports a vector of left motor ports, negative reverses the port right_motor_ports a vector of right motor ports, negative reverses the port imu_port the port an imu is in wheel_diameter diameter of your tracking wheel ticks ticks per rotation of your sensor. 360 if using ADI quadrature encoders ratio external ratio of your tracking wheel. should be wheel gear / motor gear left_tracker_ports vector of left tracker ports, negative will reverse the encoder right_tracker_ports vector of right tracker ports, negative will reverse the encoder

Drive(std::vector<int> left_motor_ports, std::vector<int> right_motor_ports, int imu_port, 
double wheel_diameter, double ticks, double ratio, std::vector<int> left_tracker_ports,
std::vector<int> right_tracker_ports);

ADI Encoders in Expander

Only supports parallel trackers.

left_motor_ports a vector of left motor ports, negative reverses the port right_motor_ports a vector of right motor ports, negative reverses the port imu_port the port an imu is in wheel_diameter diameter of your tracking wheel ticks ticks per rotation of your sensor. 360 if using ADI quadrature encoders ratio external ratio of your tracking wheel. should be wheel gear / motor gear left_tracker_ports vector of left tracker ports, negative will reverse the encoder right_tracker_ports vector of right tracker ports, negative will reverse the encoder expander_smart_port port of the 3 wire expander

Drive(std::vector<int> left_motor_ports, std::vector<int> right_motor_ports, int imu_port, 
double wheel_diameter, double ticks, double ratio, std::vector<int> left_tracker_ports,
std::vector<int> right_tracker_ports, int expander_smart_port);

Rotation Sensor

warning

Note: smart encoders might not work as intended as of of 2.0.0

Only supports parallel trackers.

left_motor_ports a vector of left motor ports, negative reverses the port right_motor_ports a vector of right motor ports, negative reverses the port imu_port the port an imu is in wheel_diameter diameter of your tracking wheel ticks ticks per rotation of your sensor. 360 if using ADI quadrature encoders ratio external ratio of your tracking wheel. should be wheel gear / motor gear left_rotation_port port for left rotation sensor, negative reverses the port right_rotation_port port for right rotation sensor, negative reverses the port

Drive(std::vector<int> left_motor_ports, std::vector<int> right_motor_ports, int imu_port, 
double wheel_diameter, double ratio, int left_rotation_port, int right_rotation_port);