Package xbot.common.simulation
Class WebotsClient
java.lang.Object
xbot.common.simulation.WebotsClient
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
drawCircle
(String name, XYPair center, float radius, Color color, float zIndex) void
void
handleSimulatorPose
(org.json.JSONObject worldPose) void
void
void
resetPosition
(double x, double y, double rotationInDegrees) org.json.JSONObject
sendMotors
(List<org.json.JSONObject> motorValues) 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.
-
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
-