Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gxiang
Mobilebot
Commits
04b39cd3
Commit
04b39cd3
authored
Oct 04, 2021
by
gxiang
Browse files
calibrate odometry
parent
51a3cc73
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/mb_defs.h
View file @
04b39cd3
...
...
@@ -27,7 +27,7 @@
#define GEAR_RATIO 78.0 // gear ratio of motor
#define ENCODER_RES 20.0 // encoder counts per motor shaft revolution
#define WHEEL_DIAMETER 0.084 // diameter of wheel in meters
#define WHEEL_BASE 0.1
59
// wheel separation distance in meters
#define WHEEL_BASE 0.1
61
// wheel separation distance in meters
#define MAX_FWD_VEL 0.8 // maximum forwad speed (m/s)
#define MAX_TURN_VEL 2.5 // maximum turning speed (rad/s)
...
...
common/mb_odometry.c
View file @
04b39cd3
...
...
@@ -39,7 +39,7 @@ void mb_update_odometry(mb_odometry_t* mb_odometry, mb_state_t* mb_state){
//del_thresh Needs to be tuned
//IF DON'T WANT GYRO, SET IT AS F!
float
enc2meters
=
(
WHEEL_DIAMETER
*
PI
)
/
(
GEAR_RATIO
*
ENCODER_RES
);
float
del_thresh
=
0
.
1
;
//0.125/DT;
float
del_thresh
=
100
;
//0.125/DT;
boolean
Gyro
=
T
;
float
del_left
=
mb_state
->
left_encoder_delta
*
1
.
0
*
enc2meters
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment