Navigation Subystem#
Behavior:#
Once the autonomous system has enabled the navigation system and all necessary dependencies are acquired (ball detector, HAL, etc), now we can run the rover autonomously. There are two versions of the autonomous traversal: with computer vision and without computer vision.
Attention
The autonomy code functionality has not yet been updated to match the 2021-2022 task yet.
With Vision#
- Create a geometry_msg/PosStamped goal to use in the
ROS planner move_base. This goal a destination point a set number of meters before the entered GPS/UTM coordinates. (Configurable in
auto.yamlunder the parametermeters_before_destination)
ROS planner will send rover directly to calculated destination point.
Calculate a destination point one meter forward in the direction of the entered GPS/UTM coordinates.
ROS planner sends rover to new destination point.
Rover will rotate 360 degrees at a set interval. (Configurable in
auto.yamlunder the parameterrotate_radians_)At each interval, tag detector will search for AR tag.
- If tag is detected, tag detector will return how many meters rover is away from the tag in the x and y direction (forward and left),
and ROS planner will send the rover towards the tag location using the given x and y.
If tag is not detected, repeat steps 3-7 until either the ball detected or rover has reached the entered
GPS/UTMcoordinatesIf tag still is not detected, enter spiral mode.
- Rover will move in a square spiral, each leg of the spiral increasing by a meter every new leg. For each leg of the spiral, rover
will move forward a set number of meters (configurable in
auto.yamlunder the parameterspiral_steps). After moving forward a set number of meters, rover will rotate 360 degrees and look for the tag, similar to steps 5 and 6. If tag is found, follow step 7. Otherwise, continue.
After 30 legs, if tag is not found, the autonomous system will terminate.
Without Vision#
Create a geometry_msg/PosStamped goal to use in the ROS planner
move_base. Created with reference to entered GPS coordinates or UTM coordinatesPlanner will send rover directly to the approximate location of the GPS/UTM coordinates with reference to the rover’s own internal GPS.