Add encoder with filter
This commit is contained in:
parent
5ecf92426a
commit
8537e8504b
60 changed files with 593 additions and 8208 deletions
22
server/include/robot.hpp
Normal file
22
server/include/robot.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef COMPLIB_SERVER_ROBOT_HPP
|
||||
#define COMPLIB_SERVER_ROBOT_HPP
|
||||
|
||||
#define PI 3.14159265359L
|
||||
|
||||
#define WHEEL_CIRCUMFERENCE_MM (71.0L * PI)
|
||||
#define TICKS_PER_TURN (27.7L * 100.0L)
|
||||
#define ARBOR_LENGTH_MM 139.0L
|
||||
#define ARBOR_LENGTH_M (ARBOR_LENGTH_MM / 1000.0L)
|
||||
#define TICKS_PER_METER (1000.0L / WHEEL_CIRCUMFERENCE_MM * TICKS_PER_TURN)
|
||||
|
||||
#define MOTOR_COUNT 4
|
||||
#define MAX_MOTOR_SPEED 65535
|
||||
|
||||
#define MOTOR_MAX_DELTA_TIME_S 0.1L
|
||||
#define MOTOR_FILTER_ALPHA 0.05L
|
||||
#define MOTOR_FILTER_RESET_DELAY_US (1000 * 10)
|
||||
|
||||
#define LEFT_PORT 3
|
||||
#define RIGHT_PORT 0
|
||||
|
||||
#endif // COMPLIB_SERVER_ROBOT_HPP
|
Reference in a new issue