32 lines
1 KiB
C++
32 lines
1 KiB
C++
#ifndef COMPLIB_SERVER_ROBOT_HPP
|
|
#define COMPLIB_SERVER_ROBOT_HPP
|
|
|
|
#include <cmath>
|
|
|
|
#define ROBOT_IR_SENSOR_COUNT 5
|
|
#define ROBOT_IR_RATE_HZ 250
|
|
|
|
#define ROBOT_MOTOR_COUNT 4
|
|
#define ROBOT_MOTOR_SPEED_CONTROL_KP 222.0
|
|
#define ROBOT_MOTOR_SPEED_CONTROL_KI 2110.0
|
|
#define ROBOT_MOTOR_SPEED_CONTROL_KD 2.22
|
|
#define ROBOT_MOTOR_SPEED_CONTROL_RAMP 0.2
|
|
#define ROBOT_MOTOR_SPEED_CONTROL_RATE_HZ 250
|
|
|
|
#define ROBOT_ODOMETRY_CONTROLLER_RATE_HZ 250
|
|
#define ROBOT_ODOMETRY_CONTROLLER_LEFT_PORT 3
|
|
#define ROBOT_ODOMETRY_CONTROLLER_RIGHT_PORT 0
|
|
#define ROBOT_ODOMETRY_CONTROLLER_LEFT_MULT 1.0
|
|
#define ROBOT_ODOMETRY_CONTROLLER_RIGHT_MULT -1.0
|
|
|
|
#define ROBOT_ENCODER_RATE_HZ 250
|
|
|
|
#define ROBOT_WHEEL_CIRCUMFERENCE_MM (71.0 * M_PI)
|
|
#define ROBOT_WHEEL_CIRCUMFERENCE_M (ROBOT_WHEEL_CIRCUMFERENCE_MM / 1000.0)
|
|
#define ROBOT_TICKS_PER_TURN (27.7 * 100.0)
|
|
#define ROBOT_ARBOR_LENGTH_MM 139.0
|
|
#define ROBOT_ARBOR_LENGTH_M (ROBOT_ARBOR_LENGTH_MM / 1000.0)
|
|
#define ROBOT_TICKS_PER_METER (1000.0 / ROBOT_WHEEL_CIRCUMFERENCE_MM * ROBOT_TICKS_PER_TURN)
|
|
|
|
|
|
#endif //COMPLIB_SERVER_ROBOT_HPP
|