goToPoint()
This function can make the robot go to a certain point on the x, y plane and can snap to a certain heading using a PID Controller.
goToPoint(...)
Use this method if you want to use doubles instead of Pose2d for the target position, and also if you are fine with using the in-built localizer to get your current position.
Parameter Type
Parameter
double
Target X Position
double
Target Y Position
double
Target Heading in Radians
double
Maximum Translation Power(0 - 1)
double
Maximum Rotational Power(0 - 1)
goToPoint(...)
Use this method if you already have a Pose2d for target position, and also if you are fine with using the in-built localizer to get your current position.
Parameter Type
Parameter
Pose2d
Target Position
double
Maximum Translation Power(0 - 1)
double
Maximum Rotational Power(0 - 1)
goToPoint(...)
Use this method if you already have a Pose2d for target position, and if you are testing a custom localizer which gives you your current position.
Parameter Type
Parameter
Pose2d
Target Position
Pose2d
Current Position
double
Maximum Translation Power(0 - 1)
double
Maximum Rotational Power(0 - 1)
goToPoint(...)
Use this method if you want to use doubles instead of Pose2d, and also if you are testing a custom localizer which gives you your current position.
Parameter Type
Parameter
double
Target X Position
double
Target Y Position
double
Target Heading in Radians
double
Current X Position
double
Current Y Position
double
Current Heading in Radians
double
Maximum Translation Power(0 - 1)
double
Maximum Rotational Power(0 - 1)
This function can be called inside the OpMode using the syntax below:
Last updated