We have now managed to make the Chasso Robot turn to exactly the azimuth/heading we want. That was a very big problem, because if we couldn't achieve it we couldn't command properly the robot. Our main concern was the latency and the different responses that the Lego motors do to the same command.
After the tests and tryouts we manage to create an algorithm for the turn to the correct direction that works like this:
- One motor lowers the base to the floor, lifting the robot on the air;
- The other motor does a rotation of 70% the estimated rotation (we calculated this rotations value based on tests ran by us), with the speed of 50% the power of the motor;
- We then do a loop where we do turns on 20% the power of the motor with cycles of 200 degrees revolutions. This way we can read the compass heading on each cycle and determine if we are on the pretended heading;
- After this we recollect the base, not at 50% the power as we were doing on the descent but at 20%. We discover that doing this we had less chances of the Chasso balance and provoke a change of 2 degrees on the compass heading. This means the robot is again on the floor on exactly the defined azimuth;
- After that we turn the base 70% of the estimate rotation on the opposite direction, again at 50% the power;
- Then we do a cycle using the color sensor the see if the base is in the correct position. If not, we continue rotating the base at 20% the power until that occurs.
We still have some "minor" problems, but they seem very difficult to overcome:
- Changes of heading with less than 10 degrees. The Lego motors are not very good in responding to this small rotations, specially when they carry the weight we use on Chasso;
- The weight of the Chasso makes to down and up base operations not always presenting the same results, does the end of the operation isn't always the expected. We have to ran tests on some dozen times to check if this becomes a problem or not.
The "turn to the heading" operation became more slower, but it's much more accurate (even if the compass only gives even readings - therefore we always turn when we have at least one degree of what we want).
Another good news is the the battery on Chasso wi-fi camera still is above 60%. On the technical specifications we read that for our consumption, it should last at least 10 hours, but it seems it lasts much more than that. We have now about 20 hours after it's initial charging.






















