Identifying Location Details Using the GPS Sensor in VRC Virtual Skills

You can use the GPS Sensor to help you navigate the Field in VRC Virtual Skills, with the (X, Y) coordinates of locations.

This article will cover:


How the GPS Sensor Works in Virtual Skills

image12.png

The GPS (Game Positioning System) Sensor, uses the VEX Field Code on the interior of the VRC Field to triangulate X, Y position and heading. That checkerboard pattern in the Field Code is used to identify the location for each individual block in that pattern. The VEX GPS is an absolute position system, so it does not drift nor does it require calibration on a per-field basis.

To sense the Field Code, the VEX GPS Sensor, a black and white camera, is mounted on the rear of the robot and faces rearwards.

The GPS Sensor reports the (X, Y) coordinates of the center of rotation of Moby on the Field, in millimeters or inches.


Identifying (X, Y) Coordinates on the VRC Field

The Field in VRC Virtual Skills ranges from approximately -1800mm to 1800mm for the X and Y positions. The starting location of Moby depends on the starting position selected.

The center location, or the origin (0,0), is located at the Neutral Mobile Goal in the center of the Field.

image9.png


Identifying the (X, Y) Coordinates of the GPS Sensor

Moby-TurnRadius.png

The GPS Sensor can be used to identify the X and Y coordinates of Moby on the Field. These coordinates reflect the location of Moby’s center of rotation, which is located between the Forks, as indicated in this image.

 

image11.png

Reporter blocks from the Sensing category in the Toolbox can be used to report positional values from the GPS Sensor in your project.

 

xy_coordinates_example.png

The current X and Y coordinates of Moby’s GPS Sensor on the Field can be displayed in the Print Console using blocks from the Looks category in the Toolbox.


Using the GPS Sensor to Help Moby Navigate the Field

You can use the GPS Sensor to help Moby navigate the Field by driving to specific locations using your knowledge of the Cartesian coordinate system. Using the GPS Sensor, Moby can drive along the X or Y-axes until the value of the sensor is greater than or less than a threshold value. This allows Moby to drive using sensor feedback instead of set distances.

navigating_field_example.png

In this project, Moby will drive forward from starting position D, until the value of the X-axis is less than 600mm, then stop, placing Moby’s center of rotation on the white tape line.

Note: You may have to account for the robot’s inertia or drift when setting your parameters.


GPS Sensor Location and the Center of Rotation on Moby

image8.jpg

The GPS Sensor is mounted in the rear of the robot, whereas Moby’s center of rotation is located in the front of the robot.

The GPS Sensor is configured in VRC Virtual Skills to account for this offset (approximately 260mm), so that the values that are reported reflect the center of rotation of Moby.


The Radius of the Mobile Goals

image3.png

The Mobile Goals have a maximal diameter of 330.2mm (13 inches), so the distance from the center point to the edge of the Mobile Goal (the radius) is approximately 165mm (6.5 inches).


(X, Y) Coordinates of Game Elements in VRC Virtual Skills

Knowing the coordinates of game elements, like Mobile Goals, can help you plan your projects in VRC Virtual Skills.

The following reference is provided as a guide, based on the Field setup at the start of each Match, for the approximate center point coordinate locations of the game elements on the VRC Field. Remember to account for the radius of the Mobile Goal when using these coordinates to build your projects.

Mobile Goal Coordinates

image10.png

Ring Cluster Coordinates

Ring_cluster_coordinates.png

Platform Edge Coordinates

image2.png


Identifying the GPS Heading of Moby

image5.png

The GPS Sensor can also be used to identify the GPS heading. The heading ranges from 0 degrees to 359.9 degrees, following a compass heading style.

When using the GPS Sensor to detect location, the GPS heading will remain constant in relation to the Field, regardless of the starting position of the robot.