The GPS Sensor, or Game Positioning System Sensor, is a useful tool for navigating the VEX V5 Robotics Competition (V5RC) field. Read this article to learn best practices to help you get the most out of the sensor.
Keep a clear view of the Field Code
The GPS Sensor uses a video feed to detect the pattern of the Field Code around the perimeter of the Field. As such, it is important that the sensor is not blocked by mechanisms or components of your robot.
To minimize possible obstructions of the sensor's view of the Field Code from your robot, it is recommended to mount the GPS Sensor on the rear of the robot, facing behind the robot.
When testing projects with the GPS Sensor, be sure that no extraneous items are on the Field and blocking the Field Code (like team members or extra game elements).
The GPS Sensor should also be positioned at the same height as the Field Code, and not angled in any way in order to function as intended.
To learn more about Mounting the GPS Sensor on your robot, view this article.
Configure your offsets accurately
To make the most of your GPS Sensor usage, you can configure the X, Y, and Angle Offset based on a reference point on your robot. The sensor will report data based on its physical position on the Field, unless an offset is configured. Once the offset is configured, VEXcode will convert the data from the GPS Sensor to reflect the reference point on your robot.
Configuring the offset allows you to follow the mounting recommendations, but navigate from a meaningful position on your robot, like the turning center point, or the robot's arm.
To learn more about setting an offset, view this article.
Keep track of positive and negative values
The GPS Sensor reports X and Y position data based on the coordinate grid. To use this data effectively, it is helpful to keep track of how the positive and negative values align with the coordinate grid.
This image can be recreated in your engineering notebook to help you keep track of what values to expect in each quadrant of the Field, so that you can effectively use data in a project.
The same consideration of positive and negative values applies to the offset in the GPS Sensor configuration as well. Be mindful of the distance and direction from the reference point to the sensor along each axis, to ensure that you are configuring the offsets accurately.
Use data from a stationary position
The GPS Sensor uses a video feed of the Field Code around the Field to determine its position. Because the sensor is relying on visual feedback, the most accurate and clearest image will come from being in a stopped position.
Think about when you are taking a photo. Trying to take a photo while moving will result in a blurry image. Stopping and standing still while taking a picture will likely give you a much clearer result. The same is true for the GPS Sensor.
It is helpful to experiment with coding your robot to move at slower velocities to determine how quickly the robot can move while gathering accurate GPS Sensor values. Collect data, and make a data based decision that works best for your team. Be aware that environmental factors like ambient lighting can affect the reliably of these measurements, so consider the environments and lighting of your practice and competition fields when making these decisions.
Beyond just slowing down the velocity to improve accuracy, you can also stop the robot's movement entirely by building pauses of at least 0.5 seconds (500 mSec) into your project.
Think about your strategy before coding
Like any other device on your robot, how you use the GPS Sensor is going to be dependent on your strategy for playing the game. For instance, if you are trying to reach game objects on the opposite side of the Field, your robot is likely going to need to navigate around more obstacles than you would for elements that are in the same quadrant of the Field.
Thinking through what you are trying to accomplish and how you want to code the robot to complete that task with your team will help you to be able to make the most of the GPS Sensor in your project.
Practice coding with VEXcode VR
The Location Sensor on the VR Robot in VEXcode VR is modeled off of the GPS Sensor. Practicing coding with the Location Sensor in VEXcode VR can help you to focus on the coding concepts of using x, y position data in a project, that you can then apply to your physical GPS Sensor on the V5RC Field.
You can learn about how to navigate using x and y location information in Knowing Your Location Unit of the Computer Science Level 1 course (Blocks) (Python).
You can also practice coding the GPS Sensor on the Hero Bot for this year's game using the Virtual Skills Playground in VEXcode VR. Virtual Skills is a great place to test out strategy and code ideas for game play in a virtual setting, before trying to apply and build projects from scratch on the Field.
The concepts you learn and practice in Virtual Skills can easily be applied and built upon with your physical robot. View this article to learn more about getting started with Virtual Skills in VEXcode VR.
Be mindful of lighting on the Field
Since the GPS Sensor uses a video feed, the sensor will report the most accurate data in a well-lit area. Be mindful of shadows on the Field or bright lights that cause a glare on the Field Code, and avoid those situations if possible.
If you are testing in a dim or low-lit area, you can add additional ambient light try to improve the accuracy of the reported sensor data.
Use the Device Info to check GPS Sensor data
While planning your project, you can view the GPS Sensor data on the V5 Brain screen to help you determine how to build your project.
When the sensor is too close and can't get an accurate reading of its position, it'll present a circle to denote your possible position. If you see the circle in the Location view, position the sensor further away from the wall to help pull more accurate data for your project.
To learn how to view data on the V5 Brain screen, view this article.