Рет қаралды 74
AFRS means "Active Front & Rear Steering", i.e., four wheel independent steering. And of course, each of the four motors has its own independently-set speed.
To go from driving forward to gradually tightening the steering into a loop, the angles of the four steering servos and the speed of the four motors must be coordinated carefully. That's not happening here. This is a first test that simply sets the steering servos at a steadily-increasing, same angle (reversed of course per servo), and likewise keeps the motor speed the same for all four motors.
What should happen is that the inner and outer steering servos should vary their angles depending upon the differing radius set by the robot's wheel track (the width between the wheels), and the inner motors should be moving slower since they're not covering the same distance as the outer motors, again, because they're traversing a different radius.
There's some trigonometry involved in the solution and I've not figured this out yet in code, so this is just a preliminary test. You can see the wheels shuddering on the deck as the rather-imperfect movement occurs.