Package org.robwork.sdurw
Class Wrench6Df
- java.lang.Object
-
- org.robwork.sdurw.Wrench6Df
-
public class Wrench6Df extends java.lang.Object
Class for representing 6 degrees of freedom wrenches.
\mathbf{\nu} = \left[ \begin{array}{c} f_x\\ f_y\\ f_z\\ \tau_x\\ \tau_y\\ \tau_z \end{array} \right]
A Wrench is the description of a frames linear force and rotational torque
with respect to some reference frame.
-
-
Constructor Summary
Constructors Constructor Description Wrench6Df()
Default Constructor.Wrench6Df(float fx, float fy, float fz, float tx, float ty, float tz)
Constructs a 6 degrees of freedom velocity screw
Wrench6Df(long cPtr, boolean cMemoryOwn)
Wrench6Df(Vector3Df force, Vector3Df torque)
Constructs a wrench from a force and torque
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Wrench6Df
add(Wrench6Df rhs)
Adds two wrenches together \mathbf{w}_{12}=\mathbf{w}_1+\mathbf{w}_2
void
delete()
EigenVector6f
e()
Converter to Eigen data typeboolean
equals(Wrench6Df b)
Compares a and b for equality.Vector3Df
force()
Extracts the force
float
get(long i)
static long
getCPtr(Wrench6Df obj)
Wrench6Df
multiply(float s)
Scales wrench and returns scaled versionfloat
norm1()
Takes the 1-norm of the wrench.float
norm2()
Takes the 2-norm of the wrench.float
normInf()
Takes the infinite norm of the wrench.void
set(long i, float d)
void
setForce(Vector3Df force)
Sets the force component
void
setTorque(Vector3Df torque)
Sets the torque component
Wrench6Df
subtract(Wrench6Df wrench)
Subtracts two velocity screws
\mathbf{\nu}_{12}=\mathbf{\nu}_1-\mathbf{\nu}_2
Vector3Df
torque()
Extracts the torque and represents it using an Vector3D<T>
java.lang.String
toString()
-
-
-
Constructor Detail
-
Wrench6Df
public Wrench6Df(long cPtr, boolean cMemoryOwn)
-
Wrench6Df
public Wrench6Df(float fx, float fy, float fz, float tx, float ty, float tz)
Constructs a 6 degrees of freedom velocity screw
- Parameters:
fx
- [in] f_xfy
- [in] f_yfz
- [in] f_ztx
- [in] \tau_xty
- [in] \tau_ytz
- [in] \tau_z
-
Wrench6Df
public Wrench6Df()
Default Constructor. Initialized the wrench to 0
-
-
Method Detail
-
getCPtr
public static long getCPtr(Wrench6Df obj)
-
delete
public void delete()
-
setForce
public void setForce(Vector3Df force)
Sets the force component
- Parameters:
force
- [in] linear force
-
setTorque
public void setTorque(Vector3Df torque)
Sets the torque component
- Parameters:
torque
- [in] angular torque
-
force
public Vector3Df force()
Extracts the force
- Returns:
- the force
-
torque
public Vector3Df torque()
Extracts the torque and represents it using an Vector3D<T>
- Returns:
- the torque
-
multiply
public Wrench6Df multiply(float s)
Scales wrench and returns scaled version- Parameters:
s
- [in] scaling value- Returns:
- Scaled wrench
-
add
public Wrench6Df add(Wrench6Df rhs)
Adds two wrenches together \mathbf{w}_{12}=\mathbf{w}_1+\mathbf{w}_2
- Parameters:
rhs
- [in] \mathbf{\nu}_1
- Returns:
- the wrench \mathbf{w}_{12}
-
subtract
public Wrench6Df subtract(Wrench6Df wrench)
Subtracts two velocity screws
\mathbf{\nu}_{12}=\mathbf{\nu}_1-\mathbf{\nu}_2
- Returns:
- the wrench \mathbf{w}_{12}
-
norm1
public float norm1()
Takes the 1-norm of the wrench. All elements both
force and torque are given the same weight.- Returns:
- the 1-norm
-
norm2
public float norm2()
Takes the 2-norm of the wrench. All elements both
force and torque are given the same weight- Returns:
- the 2-norm
-
normInf
public float normInf()
Takes the infinite norm of the wrench. All elements
both force and torque are given the same weight.
- Returns:
- the infinite norm
-
e
public EigenVector6f e()
Converter to Eigen data type
-
equals
public boolean equals(Wrench6Df b)
Compares a and b for equality.- Parameters:
b
- [in] other wrench to compare with.- Returns:
- True if a equals b, false otherwise.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
get
public float get(long i)
-
set
public void set(long i, float d)
-
-