The Navigation Kit enables you to place waypoints on the Playground and view data about that location. This is helpful when path planning to determine the parameters needed to drive or turn your robot to a location on the field. This article offers an overview of the Navigation Kit and how to get started using it to help you build a project.
Note: The VIQRC 25-26 Mix & Match Playground is shown in the images in this article, however all of the information applies to the V5RC 25-26 Push Back Playground as well.
Waypoints
Waypoints are your target locations on the Playground that you want to navigate to. Waypoints are indicated with a plus (+) symbol on the Playground. You can use multiple waypoints to help you plan a path around the Playground. A waypoint can be added anywhere on the Playground to get data about its distance, angle, and x and y-coordinate location.
Adding the First Waypoint
Select the Navigation Kit button to open the Navigation Kit.
Select the Waypoint button to turn on the Navigation Kit. Once selected, the button will be outlined in yellow, indicating you are ready to add a waypoint to the Playground.
Select your desired location on the Playground to place a waypoint. Once selected, a + symbol will appear to show the waypoint, and navigation data about that point will appear in the box beside it.
A blue line also appears, showing the trajectory from the turning center point of the robot to the waypoint. You will learn more about the navigation data and trajectory later in this article.
A small green arrow extends from the front of the robot, indicating the robot's forward direction. This shows the trajectory the robot will move when it drives forward.
Adding Additional Waypoints
You can add additional waypoints to your path by selecting other locations on the Playground.
Select the next location you want to navigate to, and another + symbol will appear.
Editing a Waypoint
Once a waypoint is added to the Playground, it can be moved or removed.
To move a waypoint, be sure the Waypoint button is highlighted, indicating the waypoints are editable.
Select the desired waypoint and drag it to the new location. As the waypoint moves, you will notice the trajectory line and the navigation data change in real time, as shown in the video to the left.
To delete the most recent waypoint added, right click on the waypoint and it will disappear, as shown in the video to the left. Right clicking again will remove the waypoint before that.
Clearing All Waypoints
You can also clear a whole path at once.
Select the Trash button to delete all waypoints currently on the Playground at once, as shown in the video to the left.
Navigation Data
When a waypoint is placed, the navigation data provided can be used in a project to move the robot to that location.
By default, navigation data for the first waypoint is determined from the turning center point of the robot. For all waypoints added after the first, the trajectory line, distance, and angle navigation data will be relative to the previous waypoint.
Distance
The distance in millimeters (mm) shows the distance from the turning center point of the robot to the waypoint. As the robot moves, the distance data will change accordingly.
The distance value is the first line of the navigation data box.
In the video to the left, the distance of 605mm from the navigation data is input as the parameter of the drive for block. When the project is started, the robot drives 605mm forward, as the trajectory line and distance data adjust. Once the center of the robot has reached the waypoint, the navigation data disappears.
Angle
The angle in degrees shows the turn angle from the turning center point of the robot to the waypoint.
The angle value is the second line of the navigation data box.
A positive turn angle indicates a turn to the right, while a negative angle indicates a turn to the left.
In the video to the left, the angle of 45 degrees to the right from the navigation data are input as the parameters of the turn for block. When the project is started, the robot turns right 45 degrees, as the trajectory line and navigation data adjust.
Note that the distance data changes as the robot rotates.
X and Y-Coordinates
The x and y-values in the navigation data show the x and y-coordinates of the waypoint on the Playground. The origin (0, 0) is the center of the Playground.
The x and y-coordinate data will not change as the robot moves, as the waypoint location is fixed within the coordinate system. To learn more about the coordinates of a VR Playground, view the VEXcode API Reference.
The x and y-coordinate values are the third and fourth lines, respectively, of the navigation data box.
The x and y-coordinates are in relation to the origin, and can be used in a project with VR robots that have Location or GPS sensors.
Navigation Kit Settings
The turning center point of the robot is used as the default location for navigation data. You can adjust the point on the robot that navigation data is generated from. This can be helpful if looking to position a different part of your robot, like a claw or intake, at a waypoint.
Changing the Offset
Within the Navigation Kit, select the Settings button.
Use the Distance Offset in mm options to change the location where navigation data is generated from. The Distance Offset value will update based on your selection.
You will see a graphical representation of the position on the right side, to help you position the offset to your desired location on the robot.
Select Confirm to save your settings.
Showing Navigation Data
By default, navigation data is shown when a project is running, so that both the waypoints and navigation data boxes appear on the Field. To hide navigation data, and only show waypoints during a run, uncheck the box.
Select Confirm to save your settings.
Best Practices for Using the Navigation Kit
The Navigation Kit is a useful project and path planning tool to help you explore paths around the Playground. The following considerations can help you use the Navigation Kit in the most effective way as you build your project.
- Place one or two waypoints at a time. Plotting out your entire path around the Playground at once can make it more difficult to get and use accurate data for your project.
- Build and test your project one waypoint at a time. Since the waypoint data is relative to the pivot point on the robot, the robot's location on the Playground will affect the navigation data. Once you have coded the robot to get to the first waypoint, then look at the navigation data for the next point and code that step in the path.
- Clear one path and start a new one when moving to the next task in your project. For instance, once you have navigated to a waypoint and completed your first task, clear all the waypoints and place the next one based on the robot's current position.
- Stop a project without resetting the Field to create a new path with the robot's current position. You can clear the Match Results window without resetting the Field by selecting the x in the upper left corner. Then you can add waypoints using the robot's position at the end of the project.