Skip to main content

Unlock Locations

Create a coordinate system on the Full Volume Virtual Skills Field with the position of the red dot as the origin (0, 0) and the initial position of the Hero Bot Center located at coordinates (0, 36). Use [Drive for], [Turn for], [Spin to position], and [Spin for] blocks to code the Hero Bot to pick up the Red Block highlighted in orange, score it into Goal I, and partially park the robot in the Supply Zone. Create an algorithm to find the X and Y coordinates of the location for the robot to pick up and score the Red Block and the X and Y coordinates of the location for the robot to park the Hero Bot.

  • Select the VIQRC Virtual Skills - Full Volume Playground.
  • Create an algorithm to calculate and record the X and Y coordinates of the robot’s position after driving for a certain distance using the drive distance and the drivetrain heading. 
  • Code the Hero Bot to drive to the Red Block highlighted in orange and pick it up. 
    • Use the algorithm to track the X and Y coordinates of the robot’s position.
  • Use the [print] block to print the X and Y coordinates of the location for the robot to pick up the Block to the Print Console.
  • Code the Hero Bot to drive toward Goal I and drop the Block into the Goal. 
    • Use the algorithm to track the X and Y coordinates of the robot’s position.
  • Use the [print] block to print the X and Y coordinates of the location for the robot to drop the Block into Goal I to the Print Console.
  • Drive the Hero Bot to a position to be partially within the Supply Zone.
    • Use the algorithm to track the X and Y coordinates of the robot’s position.
  • Use the [print] block to print the X and Y coordinates of the location for the robot to be partially parked within the Supply Zone to the Print Console.

Helpful Hints

  • To identify the X and Y coordinates of the Hero Bot on the VIQRC Virtual Skills Field, set the initial position of the Hero Bot as the origin(0,0) of the coordinate system. 
  • Declare two variables to store the X and Y coordinates of the Hero Bot. Use the set blocks from the Variables category to set the values of the X and Y coordinates to 0 at the beginning of the project. 
    • Matching Python command:
  • Use the Reporter blocks from the Sensing category to get the drivetrain heading value from the Inertial Sensor.
    • Matching Python command:
  • Use the drive distance and drivetrain heading to calculate the X and Y coordinates after driving for a certain distance.
    • Math function (drive forward):

      X2 = X1+ drive_distance * sin (drive_heading)

      Y2 = Y1+ drive_distance * cos (drive_heading)

  •  Use the function block from the Operators category to express math functions.
    • Matching Python command:
  • For more information about VIQRC Virtual Skills Field Dimensions, please click here.