CRINSA-team2024
2024
Documentation du Club Robot INSA Rennes 2024
Chargement...
Recherche...
Aucune correspondance
constants.h
1
#ifndef __CONSTANTS_H__
2
#define __CONSTANTS_H__
3
4
// DC motors constants
5
6
#define DCMOTORS_VELOCITY_CONSTANT 622
// RPM
7
#define DCMOTORS_REDUCTION_RATIO 19
8
#define DCMOTORS_SUPPLIED_VOLTAGE 11
// V
9
10
// Codewheels constants
11
12
#define CODEWHEELS_COUNTS_PER_REVOLUTIONR 10000
13
#define CODEWHEELS_COUNTS_PER_REVOLUTIONL 10000
14
15
// Mechanical constants
16
17
#define LEFT_WHEEL_RADIUS 23.8
// mm
18
#define RIGHT_WHEEL_RADIUS 23.8
// mm
19
#define WHEELS_AXLE_TRACK 125.0
// mm
20
21
#define LEFT_CODEWHEEL_RADIUS 22.71
// mm
22
#define RIGHT_CODEWHEEL_RADIUS -22.71
// mm
23
#define CODEWHEELS_AXLE_TRACK 357.5722465739272
//209.16 // mm
24
25
// Really traveled distance > thought traveled distance -> decrease codewheels radius
26
// Really rotated angle > thought rotated angle -> increase axle track
27
// Turn right when thinking moving forward -> increase left codewheel radius
28
// Turn left when thinking moving forward -> increase right codewheel radius
29
30
// Trajectory constants
31
32
#define MIN_LINEAR_POSITION 1
// mm
33
#define MIN_ANGULAR_POSITION 0.1
// rad
34
35
#define MAX_LINEAR_VELOCITY 500
// mm/s
36
#define MAX_ANGULAR_VELOCITY 1.5
// rad/s^2
37
38
#define MAX_LINEAR_ACCELERATION 500
//500 // mm/s^2
39
#define MAX_LINEAR_DECCELERATION 1000
// mm/s^2
40
#define MAX_ANGULAR_ACCELERATION 3.14
// rad/s^2
41
#define MAX_ANGULAR_DECCELERATION 6.28
// rad/s^2
42
43
// Timesteps
44
45
#define ODOMETRY_TIMESTEP 5e-3
// s
46
#define PID_CONTROLLERS_TIMESTEP 20e-3
// s
47
#define POSITIONCONTROL_TIMESTEP 50e-3
// s
48
49
#endif
// __CONSTANTS_H__
platformIO
wheeledbase
src
constants.h
Généré par
1.10.0