Package org.robwork.sdurw_models
Class RigidObject
- java.lang.Object
-
- org.robwork.sdurw_kinematics.Stateless
-
- org.robwork.sdurw_models.Object
-
- org.robwork.sdurw_models.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(FramePtr baseframe)
constructorRigidObject(FramePtr baseframe, GeometryPtr geom)
constructorRigidObject(FramePtr baseframe, VectorGeometryPtr geom)
constructorRigidObject(FrameVector frames)
constructorRigidObject(FrameVector frames, GeometryPtr geom)
constructorRigidObject(FrameVector frames, VectorGeometryPtr geom)
constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGeometry(GeometryPtr geom)
add collision geometry from this objectvoid
addModel(Model3DPtr model)
add visualization model to this objectvoid
approximateInertia()
approximates inertia based on geometry, mass and center of mass propertiesvoid
approximateInertiaCOM()
approximates inertia and center of mass based on geometry and mass propertiesvoid
delete()
Vector3D
getCOM()
get the center of mass of this rigid body seen in the base frameVector3D
getCOM(State state)
get center of mass of this objectstatic long
getCPtr(RigidObject obj)
VectorGeometryPtr
getGeometry()
get geometry of this rigid objectInertiaMatrixd
getInertia()
get the inertia matrix of this rigid body seen in the base frameInertiaMatrixd
getInertia(State state)
returns the inertia matrix of this body calculated around COM with the orientation
of the base frame.double
getMass()
returns the mass of this RigidObjectdouble
getMass(State state)
get mass in Kg of this objectModel3DPtrVector
getModels()
get visualization models for this rigid objectvoid
removeGeometry(GeometryPtr geom)
remove collision geometry from this objectvoid
removeModel(Model3DPtr model)
remove visualization model to this rigid objectvoid
setCOM(Vector3D com)
set the center of mass of this rigid body seen in the base framevoid
setInertia(InertiaMatrixd inertia)
set inertia of this rigid objectvoid
setMass(double mass)
set mass of this RigidObject-
Methods inherited from class org.robwork.sdurw_models.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(FramePtr baseframe)
constructor- Parameters:
baseframe
- [in] base frame of the object
-
RigidObject
public RigidObject(FramePtr baseframe, GeometryPtr geom)
constructor- Parameters:
baseframe
- [in] base frame of the objectgeom
- [in] the Geometry Forming the object
-
RigidObject
public RigidObject(FramePtr baseframe, VectorGeometryPtr geom)
constructor- Parameters:
baseframe
- [in] base frame of the objectgeom
- [in] the Geometry Forming 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, VectorGeometryPtr 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
- [in] 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- Parameters:
inertia
- [in] the inertia of this object
-
getCOM
public Vector3D getCOM()
get the center of mass of this rigid body seen in the base frame- Returns:
- the center of mass 3D coordinate
-
setCOM
public void setCOM(Vector3D 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 VectorGeometryPtr getGeometry()
get geometry of this rigid object- Overrides:
getGeometry
in 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:Object
get mass in Kg of this object
-
getInertia
public InertiaMatrixd getInertia(State state)
Description copied from class:Object
returns the inertia matrix of this body calculated around COM with the orientation
of the base frame.- Overrides:
getInertia
in classObject
-
-