This update covers three pool tests, held on the following dates:
- Saturday, June 15, 2024
- Sunday, June 16, 2024
- Thursday, June 20, 2024
These pool tests have been entirely focused on completing the prequal.
We initially picked up where we left off with regards to our prequal strategy:
- Dead reckon about halfway down the lane
- Use CV to track a glyph on the buoy behind the marker
- Dead reckon around the marker
- Dead reckon back or turn around and track a glyph located on or behind the gate
This strategy quickly proved to be difficult to execute because of the following issues
- The robot drifts a lot when dead reckoning along the Y, Z, and yaw axes, so it’s impossible to make it go straight reliably.
- With the new color correction code added to the DepthAI pipeline, the pipeline runs at a slower rate with more latency, so glyph detections are very delayed and not reliable enough for the robot to track them.
Given these issues, we switched to an alternate strategy. This strategy centers around performing HSV filtering on the bottom mono camera to track the lane line painted on the bottom of the lane. Thus, the robot uses detections of the lane line to occasionally correct its yaw and Y drift and keep itself centered in the lane.
Another important part of the strategy is to move in only small increments of one meter at a time due to inaccuracies in transforming local poses to global poses. For example, if we call move_to_pos_local(x=10, y=0, z=0)
, then we would expect the Y and Z set points to be the same as the current state. However, in practice, the Y and Z setpoints have small but significant differences from the current state, which contributes to drift. Instead, if we call move_to_pos_local(x=1, y=0, z=0)
, then the set points are what we would expect: everything remains the same except for X. Thus, to make the robot move 10 meters forward, instead of doing the former, it is better to repeat the latter 10 times to minimize drift.
Another observation is that over time, state’s Z pose diverges from the depth reported by the pressure sensor. Thus, the robot changes depth even though the Z set point remains the same. Since the pressure sensor’s depth is far more accurate than the state, occasionally the robot needs to correct its depth by calling move_to_pos_local(x=0, y=0, z=(current_depth - desired_depth))
.
Combining these strategies yields the following loop, which is used to go down and back the lane.
- Move one meter forward/backward.
- If the lane line is cut off in the camera feed, move a fixed amount in Y to get it back into view.
- Yaw to ensure that the lane line is parallel to the edges of the camera frame.
- Compute the distance from the center of the lane line to the camera’s center and move that distance in Y.
- Compute the difference in current depth and desired depth and adjust Z position.
This combination of steps enables the robot to consistently go straight down the lane, albeit slowly since it stops every one meter to stabilize and correct drift.
Going around the marker is still done using dead reckoning, but it is now performed in increments of one meter at a time.
A few other issues we encountered were that sometimes the robot moved in the opposite direction of what was expected. This was caused by the robot getting too close to the bottom of the pool, which made the DVL go crazy.
Finally, sometimes the robot would seemingly have steady-state error, despite not having that most of the time. This was fixed by restarting motion.launch. Thus, it is a good idea to restart motion.launch approximately every 10 minutes.
So far, we’ve been able to get the robot to move down the lane and around the marker, and we’re very confident that we’ll be able to complete the prequal soon.
In all of these pool tests, humidity starts at 60-65% and slowly creeps up to around 70-75%. When we remove the capsule after the test, we’ve found small amounts of water on the bottom of the plate. This occurs in spite of re-greasing the o-ring every time we do a test and using one of the new capsules.
The gate stays together very well with the holes and zip ties and the marker stays stable since we now put heavy weights on its base.
At the end of today’s pool test, the monitor fell into the pool, so it is likely dead. Will check at the next pool test.