WisconsinRobotics / WRover_Software_23-24

The software system for the 2024 Wisconsin Robotics URC rover.
https://wisconsinrobotics.github.io/WRover_Software/
MIT License
7 stars 1 forks source link

Search Pattern PR #87

Closed rusmilov closed 7 months ago

Tzanccc commented 8 months ago

In terms of changes to the overall autonomous navigation structure as well as fitting search pattern into the system, here are my thoughts. @co-li I'd like to hear your opinions as well.

In the current code, both long-range navigation (obstacle_avoidance.py) and short-range navigation (vision_navigation.py) publish their respective mock motor drive power node. Instead, the drive mux (drive_mux_select.py) chooses one of the two mock outputs and routes it to the real drive power node depending on what state we're in.

For the existing vision code for detecting Aruco tags, the target detection code continuously publishes to its topic, even when it sees nothing (see code here). This is done to accommodate the existing rudimentary search pattern logic, which simply rotates the rover clockwise to look for the Aruco tag (see code here).

For the new code, I'm thinking that we should modify the mux code to introduce the search pattern as a third output source. The search pattern code should subscribe to the vision topic while running the search pattern sequence. When the camera detects the Aruco tag (example code here), the search pattern code should trigger the appropriate state machine event such that vision navigation takes control of the drive motors. The code for mallet/water bottle detection should also be formatted in a similar manner.

rusmilov commented 7 months ago

I added in the file level comments to those three scripts, but it seems that merging is blocked for me now. Was I not supposed to commit and push the changes? I will re-request a review.