Package xbot.common.simulation
Class WebotsClient
java.lang.Object
xbot.common.simulation.WebotsClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddrawCircle(String name, XYPair center, float radius, Color color, float zIndex) voidvoidhandleSimulatorPose(org.json.JSONObject worldPose) voidvoidvoidresetPosition(double x, double y, double rotationInDegrees) org.json.JSONObjectsendMotors(List<org.json.JSONObject> motorValues) voidsetFieldPoseOffset(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.
-
Constructor Details
-
WebotsClient
-
-
Method Details
-
setFieldPoseOffset
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
-
handleSimulatorPose
public void handleSimulatorPose(org.json.JSONObject worldPose) -
resetPosition
public void resetPosition() -
resetPosition
public void resetPosition(double x, double y, double rotationInDegrees) -
drawLine
-
drawArrow
-
drawCircle
-