We made more progress towards the gate task.
Moving Towards the Gate
While the robot is able to move towards the gate in most cases, sometimes, the robot would move too far in the Y direction when it first started moving. Its goal would be to align itself with the red image, but it would go past that and bump into the wall.
To fix this, we made it such that when the robot is far away, it moves in the Y direction by only half the amount it actually wants to. Thus, the robot doesn’t move too far off initially while still being able to keep the red image in its FOV. Then, when it gets closer, it would perform the full Y correction to get exactly in line with the red side of the gate before moving through.
Coin Flip
While the robot was able to successfully yaw itself back to face the gate, move_to_pos_local
would fail to complete as it would never reach its roll setpoint. The roll error would be between 0.1 and 0.2 radians, even though the robot would appear to be level. PID would not be able to correct for this, since it would have to fight the robot’s natural tendency to stay level.
We initially tried to fix this by retuning buoyancy to make the robot more level. We spent a considerable amount of time adjusting the buoyancy blocks and got it to be quite level. We retuned static power as well. We also instructed the swimmer to change the way they held the robot to keep it level when starting out. These fixes seemed to have solved the issue in the first couple runs, but the issue came back afterwards. Our temporary workaround for this is to increase the roll tolerance to 0.2 (while keeping pitch and yaw at 0.1).
The most likely explanation for this is state drift. Namely, when the robot rotates, the state drifts by a small, but significant, amount in the roll axis. Thus, after yawing, while the roll should be close to zero (and thus the roll error would be close to zero), state thinks the robot is not level and controls isn’t able to close the error, hence task planning gets stuck and the robot doesn’t proceed towards the gate.
Barrel Roll
While we had tested the barrel roll a few weeks ago, we found there were several issues with it, although we didn’t have enough time to solve them.
First, the robot would surface when flipping the second time. This could simply be fixed by submerging the robot more, or perhaps correcting the depth between barrel rolls.
Second, the robot would end up in a different yaw position from when it started the barrel roll. Thus, it seems that we will have to do the coin flip task after the barrel roll to ensure the robot faces the gate before it tries to move through it.
Final Notes
Early on in the test, the tether slowed down so we switched to fiber and used it for the rest of the test. We had some thruster Arduino issues at the beginning and halfway through, after we changed the battery. Both times, it was fixed by simply reuploading to the thruster Arduino. There were no leaks.