Class 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 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 object
        geom - [in] the Geometry Forming the object
      • RigidObject

        public RigidObject​(FrameVector frames,
                           GeometryPtrVector geom)
        constructor
        Parameters:
        frames - [in] first frame is base frame of the object
        geom - [in] a list of geometries to form the object
    • Method Detail

      • getCPtr

        public static long getCPtr​(RigidObject obj)
      • delete

        public void delete()
        Overrides:
        delete in class Object
      • 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
      • getModels

        public Model3DPtrVector getModels()
        get visualization models for this rigid object
        Overrides:
        getModels in class Object
        Returns:
        a list of all models
      • getMass

        public double getMass​(State state)
        Description copied from class: Object
        get mass in Kg of this object
        Overrides:
        getMass in class Object
        Returns:
        mass in kilo grams
      • 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 class Object
      • getCOM

        public Vector3Dd getCOM​(State state)
        Description copied from class: Object
        get center of mass of this object
        Overrides:
        getCOM in class Object
        Parameters:
        state - [in] the state in which to get center of mass
        Returns: