Package org.robwork.sdurw
Class RigidObject
- java.lang.Object
-
- org.robwork.sdurw_kinematics.Stateless
-
- org.robwork.sdurw.Object
-
- org.robwork.sdurw.RigidObject
-
public class RigidObject extends Object
the RigidObject defines a physical object in the workcell that is rigid in the sence that
the geometry does not change. The rigid object also have basic properties such as Inertia and mass.
These are default 1.0 kg and inertia of solid sphere with mass 1.0kg and radius of 10cm. The center
of mass defaults to origin of the base frame.
-
-
Constructor Summary
Constructors Constructor Description RigidObject(long cPtr, boolean cMemoryOwn)RigidObject(Frame baseframe)constructorRigidObject(Frame baseframe, GeometryPtr geom)constructor
RigidObject(Frame baseframe, GeometryPtrVector geom)constructor
RigidObject(FrameVector frames)constructorRigidObject(FrameVector frames, GeometryPtr geom)constructorRigidObject(FrameVector frames, GeometryPtrVector geom)constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGeometry(GeometryPtr geom)add collision geometry from this objectvoidaddModel(Model3DPtr model)add visualization model to this objectvoidapproximateInertia()approximates inertia based on geometry, mass and center of mass propertiesvoidapproximateInertiaCOM()approximates inertia and center of mass based on geometry and mass propertiesvoiddelete()Vector3DdgetCOM(State state)get center of mass of this objectstatic longgetCPtr(RigidObject obj)GeometryPtrVectorgetGeometry()get geometry of this rigid objectInertiaMatrixdgetInertia()get the inertia matrix of this rigid body seen in the base frameInertiaMatrixdgetInertia(State state)returns the inertia matrix of this body calculated around COM with the orientation
of the base frame.doublegetMass()returns the mass of this RigidObjectdoublegetMass(State state)get mass in Kg of this objectModel3DPtrVectorgetModels()get visualization models for this rigid objectvoidremoveGeometry(GeometryPtr geom)remove collision geometry from this objectvoidremoveModel(Model3DPtr model)remove visualization model to this rigid objectvoidsetCOM(Vector3Dd com)set the center of mass of this rigid body seen in the base framevoidsetInertia(InertiaMatrixd inertia)set inertia of this rigid objectvoidsetMass(double mass)set mass of this RigidObject-
Methods inherited from class org.robwork.sdurw.Object
addFrame, getBase, getCPtr, getFrames, getGeometry, getModels, getName
-
Methods inherited from class org.robwork.sdurw_kinematics.Stateless
getCPtr, getStateStructure, isRegistered, registerIn, registerIn, unregister
-
-
-
-
Constructor Detail
-
RigidObject
public RigidObject(long cPtr, boolean cMemoryOwn)
-
RigidObject
public RigidObject(Frame baseframe)
constructor
-
RigidObject
public RigidObject(Frame baseframe, GeometryPtr geom)
constructor
- Parameters:
geom- [in] the Geometry Forming the object
-
RigidObject
public RigidObject(Frame baseframe, GeometryPtrVector geom)
constructor
- Parameters:
geom- [in] a list of geometries to form the object
-
RigidObject
public RigidObject(FrameVector frames)
constructor- Parameters:
frames- [in] first frame is base frame of the object
-
RigidObject
public RigidObject(FrameVector frames, GeometryPtr geom)
constructor- Parameters:
frames- [in] first frame is base frame of the objectgeom- [in] the Geometry Forming the object
-
RigidObject
public RigidObject(FrameVector frames, GeometryPtrVector geom)
constructor- Parameters:
frames- [in] first frame is base frame of the objectgeom- [in] a list of geometries to form the object
-
-
Method Detail
-
getCPtr
public static long getCPtr(RigidObject obj)
-
addGeometry
public void addGeometry(GeometryPtr geom)
add collision geometry from this object- Parameters:
geom- the geometry to add
-
removeGeometry
public void removeGeometry(GeometryPtr geom)
remove collision geometry from this object- Parameters:
geom- [in] the geometry to remove
-
addModel
public void addModel(Model3DPtr model)
add visualization model to this object- Parameters:
model- [in] the model to be added
-
removeModel
public void removeModel(Model3DPtr model)
remove visualization model to this rigid object- Parameters:
model- [in] the model to be removed
-
getMass
public double getMass()
returns the mass of this RigidObject- Returns:
- mass of the Object
-
setMass
public void setMass(double mass)
set mass of this RigidObject- Parameters:
mass- [in] the mass of this object
-
getInertia
public InertiaMatrixd getInertia()
get the inertia matrix of this rigid body seen in the base frame- Returns:
- IntertiaMatrix
-
setInertia
public void setInertia(InertiaMatrixd inertia)
set inertia of this rigid object
-
setCOM
public void setCOM(Vector3Dd com)
set the center of mass of this rigid body seen in the base frame
-
approximateInertia
public void approximateInertia()
approximates inertia based on geometry, mass and center of mass properties
-
approximateInertiaCOM
public void approximateInertiaCOM()
approximates inertia and center of mass based on geometry and mass properties
-
getGeometry
public GeometryPtrVector getGeometry()
get geometry of this rigid object- Overrides:
getGeometryin classObject- Returns:
- a list of all Geometries
-
getModels
public Model3DPtrVector getModels()
get visualization models for this rigid object
-
getMass
public double getMass(State state)
Description copied from class:Objectget mass in Kg of this object
-
getInertia
public InertiaMatrixd getInertia(State state)
Description copied from class:Objectreturns the inertia matrix of this body calculated around COM with the orientation
of the base frame.- Overrides:
getInertiain classObject
-
-