Navigation-- Drive the robot to a specific position in the VCIQ Visual Skills Fields (2022-2023)

After identifying the specific positions for the game, we can start to plan the necessary steps to complete the tasks to score the most points possible. To accomplish any task, the first step we need to do is to drive the robot from its current position to a specific position.

Image 9

During the navigation, the algorithm utilizes the X/Y coordinates and the heading angle of the robot’s current position and target position. We can use the Pythagoras Theorem and Atan function to calculate the moving distance and the moving direction (heading angle ). (Image 2, 3, 4, 5)

Image N 2

Image N 3

Image N formula 1

Image N 4

Image N 5

Image N formula 3

Then we can design the algorithm and develop the code to calculate the moving_distance and heading_angle, and pass the value of the moving distance and heading angle to the robot to implement navigation–drive the robot from the current position to the specific position, and keep tracking its current position. (Image 6, 7, 8)

Image n 61

Image N 81

Here is the example code (Image 10) that utilizes the X/Y coordinates and the heading angles (see Image 9, Table 1) to drive the robot to specific positions and complete the tasks.

Image N 91

Image N table

Image N 102

Practice makes perfect. Exploring the Visual Skills and testing various solutions can help us optimize the algorithm, ultimately making the robot’s localization and navigation more stable, fast, and efficient when achieving a desired outcome during the limited game time. Do you have any questions, comments, or feedback? We are looking forward to hearing from you. Thank you!

vciq32