Regbot first setup: Difference between revisions
No edit summary |
(→IMU) |
||
| Line 33: | Line 33: | ||
=== IMU === | === IMU === | ||
To measure the robot tilt, an IMU is used, | To measure the robot tilt, an IMU is used, which needs calibration. | ||
Go to the IMU tab. | Go to the IMU tab. | ||
The | The accelerometer does not need calibration for the purpose at hand. | ||
====Gyro==== | ====Gyro==== | ||
Latest revision as of 20:06, 30 December 2025
Back to Regbot
Initial settings
After a "factory reset", a few settings are needed.
Assuming that the robot is connected using the USB cable. The Regbot GUI is running and connected to the robot. I.e. robot time and name is updated.
ID
The ID must match the robot. If ID is zero, then no configuration can be saved.
If ID is wrong, go to the "Robot" tab.
Press Edit, change the ID, press "Apply" and after that "Save to flash".
Robot settings
The other settings should be:
- Hardware: 9
- Wheel base: 0.15 (m) - measure is better
- Gear: 9.68
- Pulses per rev: 48
- Wheel radius: 0.03 (m) - measure is better.
- Sample time: 0.001 (sec)
The sample time can be adjusted, but in most cases 1ms fine. The IMU cannot run faster than a 1-ms sample time. If the IMU is disabled (unplugged) and the line sensor is off (in the Edge tab), then a sample time of 0.1ms is possible.
The motor test uses 0.3ms as the sample time.
IMU
To measure the robot tilt, an IMU is used, which needs calibration.
Go to the IMU tab.
The accelerometer does not need calibration for the purpose at hand.
Gyro
- Press the "calibrate" while the robot is standing still.
- Press "save to flash"
Balance point
The IMU is almost upside down, so the board y-angle must be set between 160 and 180 degrees.
- Press "Edit"
- Keep the robot at the balance point
- The tilt angle should now be zero (within +/- 1 degree); if not, adjust the IMU board y-angle. If the tilt is too high, then reduce the angle.
- Press apply
- Press "save to flash"
Control
Switch to the "control" tab.
All controllers are disabled as default. The first use is without a controller, which is needed to make a mission.
- Click on "Velocity"
- Enable controller (checkmark)
- Set Kp to 0 (zero)
- Enable "Feed forward"
- Set Kf to 1.
- Set output limit to 8 (V)
- Press "OK" to save
- Press "save to flash"
Test
- Make sure the power switch is on (else it is running on USB power)
Go to the "Mission tab"
In the "Mission lines" field enter something like:
log=1:time=0.01 vel=3: dist=0.5 vel=0: time=1
- Press "save to robot" and ensure that it replies "No errors found".
- Press "save to flash"
Lift the robot and
- Press "start" (or the green start button on the robot)
It should now move forward 0.5m.
Test balance
This requires that the IMU is working and available!
With the robot on the floor (no cable)
- Supporting it in a close-to-balance position (and be prepared to catch if it fails to balance)
- Press the green start button twice.
It should now keep its balance for 5 seconds.