Class WebotsClient

java.lang.Object
xbot.common.simulation.WebotsClient

@Singleton public class WebotsClient extends Object
  • Constructor Details

    • WebotsClient

      @Inject public WebotsClient(PropertyFactory propertyFactory)
  • Method Details

    • setFieldPoseOffset

      public void setFieldPoseOffset(FieldPose offset)
      In the case where the origin of the field doesn't match our traditional convention (with 0,0 on the bottom-left vertex of the rectangular FRC field if viewed from above with your alliance driver station at the bottom), then we need to shift X,Y coordinates to get everything to line up.
      Parameters:
      offset - A FieldPose that represents the bottom-left part of the field in Webots (in absolute inches)
    • initialize

      public void initialize()
    • sendMotors

      public org.json.JSONObject sendMotors(List<org.json.JSONObject> motorValues)
    • handleSimulatorPose

      public void handleSimulatorPose(org.json.JSONObject worldPose)
    • resetPosition

      public void resetPosition()
    • resetPosition

      public void resetPosition(double x, double y, double rotationInDegrees)
    • drawLine

      public void drawLine(String name, XYPair point1, XYPair point2, Color color, float zIndex)
    • drawArrow

      public void drawArrow(String name, XYPair point1, XYPair point2, Color color, float zIndex)
    • drawCircle

      public void drawCircle(String name, XYPair center, float radius, Color color, float zIndex)