diffbot_base_config.h
Go to the documentation of this file.
1 
2 
4 #define ENCODER_LEFT_H1 5
5 #define ENCODER_LEFT_H2 6
6 // Encoder resolution used for initialization
7 // will be read from parameter server
8 #define ENCODER_RESOLUTION 542
9 
10 #define ENCODER_RIGHT_H1 7
11 #define ENCODER_RIGHT_H2 8
12 
14 #define MOTOR_DRIVER_ADDR 0x60
15 #define MOTOR_LEFT 4
16 #define MOTOR_RIGHT 3
17 
18 #define K_P 0.6 // P constant
19 #define K_I 0.3 // I constant
20 #define K_D 0.5 // D constant
21 
22 #define PWM_BITS 8 // PWM Resolution of the microcontroller
23 
24 
25 #define UPDATE_RATE_CONTROL 20
26 #define UPDATE_RATE_IMU 1
27 #define UPDATE_RATE_DEBUG 5
28 
29 #define E_STOP_COMMAND_RECEIVED_DURATION 5 // Stop motors if no command was received after this amount of seconds
30 
31 
32 
33 #define PWM_MAX pow(2, PWM_BITS) - 1
34 #define PWM_MIN -(PWM_MAX)


diffbot_base
Author(s):
autogenerated on Thu Sep 7 2023 02:35:23