linorobot / linorobot2

Autonomous mobile robots (2WD, 4WD, Mecanum Drive)
Apache License 2.0
437 stars 148 forks source link

robot model in rviz move faster then real world robot #10

Closed raidhu closed 2 years ago

raidhu commented 2 years ago

which would be wrong is it motor calibration.

grassjelly commented 2 years ago

Yes. Make sure you get these parameters right: https://github.com/linorobot/linorobot2_hardware/blob/master/config/lino_base_config.h#L50-L62

raidhu commented 2 years ago

I give those parameters as per my bot parameter. I get count per rev value by running sample. Is encoder counts is responsible for robot movement in rviz.

raidhu commented 2 years ago

`//define your robot' specs here

define MOTOR_MAX_RPM 100 // motor's max RPM

define MAX_RPM_RATIO 0.30 // max RPM allowed for each MAX_RPM_ALLOWED = MOTOR_MAX_RPM * MAX_RPM_RATIO

define MOTOR_OPERATING_VOLTAGE 12 // motor's operating voltage (used to calculate max RPM)

define MOTOR_POWER_MAX_VOLTAGE 13.2 // max voltage of the motor's power source (used to calculate max RPM)

define MOTOR_POWER_MEASURED_VOLTAGE 12.9 // current voltage reading of the power connected to the motor (used for calibration)

define COUNTS_PER_REV1 3899 // wheel1 encoder's no of ticks per rev

define COUNTS_PER_REV2 3708 // wheel2 encoder's no of ticks per rev

define COUNTS_PER_REV3 3844 // wheel3 encoder's no of ticks per rev

define COUNTS_PER_REV4 3701 // wheel4 encoder's no of ticks per rev

define WHEEL_DIAMETER 0.100 // wheel's diameter in meters

define LR_WHEELS_DISTANCE 0.465 // distance between left and right wheels

define PWM_BITS 10 // PWM Resolution of the microcontroller

define PWM_FREQUENCY 20000 // PWM Frequency

`

raidhu commented 2 years ago

fixed