Package swervelib.math
Class Matter
java.lang.Object
swervelib.math.Matter
Object with significant mass that needs to be taken into account.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMatter
(edu.wpi.first.math.geometry.Translation3d position, double mass) Construct an object representing some significant matter on the robot. -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.math.geometry.Translation3d
Get the center mass of the object.
-
Field Details
-
position
public edu.wpi.first.math.geometry.Translation3d positionPosition in meters from robot center in 3d space. -
mass
public double massMass in kg of object.
-
-
Constructor Details
-
Matter
public Matter(edu.wpi.first.math.geometry.Translation3d position, double mass) Construct an object representing some significant matter on the robot.- Parameters:
position
- Position of the matter in meters.mass
- Mass in kg.
-
-
Method Details
-
massMoment
public edu.wpi.first.math.geometry.Translation3d massMoment()Get the center mass of the object.- Returns:
- center mass = position * mass
-