File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
java/edu/wpi/first/math/kinematics
native/include/frc/kinematics Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 8
8
import edu .wpi .first .math .geometry .Rotation2d ;
9
9
10
10
/**
11
- * Represents the speed of a robot chassis. Although this struct contains similar members compared
12
- * to a Twist2d, they do NOT represent the same thing. Whereas a Twist2d represents a change in pose
13
- * w.r.t to the robot frame of reference, this ChassisSpeeds struct represents a velocity w.r.t to
14
- * the robot frame of reference.
11
+ * Represents the speed of a robot chassis. Although this class contains similar members compared to
12
+ * a Twist2d, they do NOT represent the same thing. Whereas a Twist2d represents a change in pose
13
+ * w.r.t to the robot frame of reference, a ChassisSpeeds object represents a robot's velocity.
15
14
*
16
15
* <p>A strictly non-holonomic drivetrain, such as a differential drive, should never have a dy
17
16
* component because it can never move sideways. Holonomic drivetrains such as swerve and mecanum
18
17
* will often have all three components.
19
18
*/
20
19
public class ChassisSpeeds {
21
- /** Represents forward velocity w.r.t the robot frame of reference . (Fwd is +) */
20
+ /** Velocity along the x-axis . (Fwd is +) */
22
21
public double vxMetersPerSecond ;
23
22
24
- /** Represents sideways velocity w.r.t the robot frame of reference . (Left is +) */
23
+ /** Velocity along the y-axis . (Left is +) */
25
24
public double vyMetersPerSecond ;
26
25
27
26
/** Represents the angular velocity of the robot frame. (CCW is +) */
Original file line number Diff line number Diff line change @@ -16,21 +16,20 @@ namespace frc {
16
16
* Represents the speed of a robot chassis. Although this struct contains
17
17
* similar members compared to a Twist2d, they do NOT represent the same thing.
18
18
* Whereas a Twist2d represents a change in pose w.r.t to the robot frame of
19
- * reference, this ChassisSpeeds struct represents a velocity w.r.t to the robot
20
- * frame of reference.
19
+ * reference, a ChassisSpeeds struct represents a robot's velocity.
21
20
*
22
21
* A strictly non-holonomic drivetrain, such as a differential drive, should
23
22
* never have a dy component because it can never move sideways. Holonomic
24
23
* drivetrains such as swerve and mecanum will often have all three components.
25
24
*/
26
25
struct WPILIB_DLLEXPORT ChassisSpeeds {
27
26
/* *
28
- * Represents forward velocity w.r.t the robot frame of reference . (Fwd is +)
27
+ * Velocity along the x-axis . (Fwd is +)
29
28
*/
30
29
units::meters_per_second_t vx = 0_mps;
31
30
32
31
/* *
33
- * Represents strafe velocity w.r.t the robot frame of reference . (Left is +)
32
+ * Velocity along the y-axis . (Left is +)
34
33
*/
35
34
units::meters_per_second_t vy = 0_mps;
36
35
You can’t perform that action at this time.
0 commit comments