Package org.robwork.sdurw_models
Class WorkCellPtr
- java.lang.Object
- 
- org.robwork.sdurw_models.WorkCellPtr
 
- 
 public class WorkCellPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
- 
- 
Constructor SummaryConstructors Constructor Description WorkCellPtr()Default constructor yielding a NULL-pointer.WorkCellPtr(long cPtr, boolean cMemoryOwn)WorkCellPtr(WorkCell ptr)Do not take ownership of ptr.
 
 ptr can be null.
 
 The constructor is implicit on purpose.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WorkCell__ref__()Dereferencing operator.voidadd(ControllerModelPtr controller)Add controllermodel to workcellvoidadd(DevicePtr device)Add device to workcellvoidadd(ObjectPtr object)Add object to workcellvoidadd(SensorModelPtr sensor)Add sensormodel to workcellvoidaddDAF(FramePtr frame)Adds dynamically attachable frame (DAF) frame with
 parent as parent.
 
 If parent == NULL, then world is used as parent
 voidaddDAF(FramePtr frame, FramePtr parent)Adds dynamically attachable frame (DAF) frame with
 parent as parent.
 
 If parent == NULL, then world is used as parent
 voidaddDevice(DevicePtr device)Adds a Device to the WorkCell.
 
 Ownership of device is taken.
 voidaddFrame(FramePtr frame)Adds frame with parent as parent.
 
 If parent == NULL, then world is used as parent
 voidaddFrame(FramePtr frame, FramePtr parent)Adds frame with parent as parent.
 
 If parent == NULL, then world is used as parent
 WorkCellCPtrcptr()voiddelete()WorkCellderef()The pointer stored in the object.booleanequals(WorkCell p)ControllerModelPtrfindController(java.lang.String name)Returns controller with the specified name.
 
 If multiple controlelrs has the same name, the first controller
 encountered will be returned.DevicePtrfindDevice(java.lang.String name)The device named name of the workcell.
 
 NULL is returned if there is no such device.
 FixedFramefindFixedFrame(java.lang.String name)Returns FixedFrame with the specified name.
 
 If multiple frames has the same name, the first frame encountered
 will be returned.VectorFixedFramefindFixedFrames()Returns all FixedFrame.FramefindFrame(java.lang.String name)Returns frame with the specified name.
 
 If multiple frames has the same name, the first frame encountered
 will be returned.JointDevicePtrfindJointDevice(java.lang.String name)The device named name of the workcell.
 
 NULL is returned if there is no such device.
 JointDevicePtrVectorfindJointDevices()Returns a vector with pointers to the Device(s) with a
 specific type JointDevice in the WorkCell
 MovableFramefindMovableFrame(java.lang.String name)Returns MovableFrame with the specified name.
 
 If multiple frames has the same name, the first frame encountered
 will be returned.MovableFrameVectorfindMovableFrames()Returns all MovableFrames.ObjectPtrfindObject(java.lang.String name)The object named name of the workcell.
 
 NULL is returned if there is no such object.
 ParallelDevicePtrfindParallelDevice(java.lang.String name)The device named name of the workcell.
 
 NULL is returned if there is no such device.
 VectorParallelDevicePtrfindParallelDevices()Returns a vector with pointers to the Device(s) with a
 specific type ParallelDevice in the WorkCell
 SensorModelPtrfindSensor(java.lang.String name)Returns sensor with the specified name.
 
 If multiple sensors has the same name, the first sensor
 encountered will be returned.SerialDevicePtrfindSerialDevice(java.lang.String name)The device named name of the workcell.
 
 NULL is returned if there is no such device.
 VectorSerialDevicePtrfindSerialDevices()Returns a vector with pointers to the Device(s) with a
 specific type SerialDevice in the WorkCell
 TreeDevicePtrfindTreeDevice(java.lang.String name)The device named name of the workcell.
 
 NULL is returned if there is no such device.
 VectorTreeDevicePtrfindTreeDevices()Returns a vector with pointers to the Device(s) with a
 specific type TreeDevice in the WorkCell
 java.lang.StringgetCalibrationFilename()Returns the filename of the calibration associated to the
 work cell.
 
 Returns an empty string in case no calibration is associated.
 
 To load the file use the getFilePath()+getCalibrationFilename()
 to get the absolute locationSWIGTYPE_p_rw__proximity__CollisionSetupgetCollisionSetup()Returns collision setup associated to work cellControllerModelPtrVectorgetControllers()Returns all controllers in workcellstatic longgetCPtr(WorkCellPtr obj)StategetDefaultState()Returns a default StateWorkCellgetDeref()Member access operator.DevicePtrVectorgetDevices()Returns a reference to a vector with pointers to the
 Device(s) in the WorkCell
 java.lang.StringgetFilename()Returns the full path and filename of the workcell.
 
 If the workcell is loaded from file, then this method returns the
 full filename.java.lang.StringgetFilePath()Returns the path of where the work cell is located
 
 If the workcell is not loaded from file, it returns an empty
 stringFrameVectorgetFrames()Returns all frames in workcelljava.lang.StringgetName()The name of the workcell or the empty string if no name
 was provided.ObjectPtrVectorgetObjects()Returns all object in the work cell
 PropertyMapgetPropertyMap()Properties of this workcellSWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneDescriptor_tgetSceneDescriptor()Get the scene descriptor.VectorSensorModelPtrgetSensors()Returns all frames in workcellStateStructurePtrgetStateStructure()gets the complete state structure of the workcell.FramegetWorldFrame()Returns pointer to the world frame
 booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
 ownershipvoidremove(FramePtr frame)Deprecated.Since January 2018.
 Please use remove(rw::core::Ptr<rw::kinematics::Frame>)
 instead.voidremove(ControllerModelPtr controller)Remove controllermodel from workcellvoidremove(DevicePtr device)Remove device from workcellvoidremove(ObjectPtr object)Remove object from workcellvoidremove(SensorModelPtr sensor)Remove sensormodel from workcellvoidremoveObject(Object object)Removes object from workcell
 voidsetCalibrationFilename(java.lang.String calibrationFilename)Sets the filename of the calibration file
 voidsetDefaultState(State state)set the default state of the WorkCell.
 if the given state is an older state then states valid in both
 new and old version will be copied to the default state.voidsetSceneDescriptor(SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneDescriptor_t scene)Set the scene descriptor.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
WorkCellPtrpublic WorkCellPtr(long cPtr, boolean cMemoryOwn)
 - 
WorkCellPtrpublic WorkCellPtr() Default constructor yielding a NULL-pointer.
 - 
WorkCellPtrpublic WorkCellPtr(WorkCell ptr) Do not take ownership of ptr.
 
 ptr can be null.
 
 The constructor is implicit on purpose.
 
- 
 - 
Method Detail- 
getCPtrpublic static long getCPtr(WorkCellPtr obj) 
 - 
deletepublic void delete() 
 - 
derefpublic WorkCell deref() The pointer stored in the object.
 - 
__ref__public WorkCell __ref__() Dereferencing operator.
 - 
getDerefpublic WorkCell getDeref() Member access operator.
 - 
equalspublic boolean equals(WorkCell p) 
 - 
isSharedpublic boolean isShared() check if this Ptr has shared ownership or none
 ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
 
 - 
isNullpublic boolean isNull() checks if the pointer is null- Returns:
- Returns true if the pointer is null
 
 - 
cptrpublic WorkCellCPtr cptr() 
 - 
getNamepublic java.lang.String getName() The name of the workcell or the empty string if no name
 was provided.- Returns:
- the name of the workcell
 
 - 
getWorldFramepublic Frame getWorldFrame() Returns pointer to the world frame
 - Returns:
- Pointer to the world frame
 
 - 
addFramepublic void addFrame(FramePtr frame, FramePtr parent) Adds frame with parent as parent.
 
 If parent == NULL, then world is used as parent
 - Parameters:
- frame- [in] Frame to add
- parent- [in] Parent frame - uses World is parent == NULL
 
 - 
addFramepublic void addFrame(FramePtr frame) Adds frame with parent as parent.
 
 If parent == NULL, then world is used as parent
 - Parameters:
- frame- [in] Frame to add
 
 - 
addDAFpublic void addDAF(FramePtr frame, FramePtr parent) Adds dynamically attachable frame (DAF) frame with
 parent as parent.
 
 If parent == NULL, then world is used as parent
 - Parameters:
- frame- [in] Frame to add
- parent- [in] Parent frame - uses World is parent == NULL
 
 - 
addDAFpublic void addDAF(FramePtr frame) Adds dynamically attachable frame (DAF) frame with
 parent as parent.
 
 If parent == NULL, then world is used as parent
 - Parameters:
- frame- [in] Frame to add
 
 - 
removepublic void remove(FramePtr frame) Deprecated.Since January 2018.
 Please use remove(rw::core::Ptr<rw::kinematics::Frame>)
 instead.Removes frame from work cell
 - Parameters:
- frame- [in] Frame to remove
 
 - 
removepublic void remove(ObjectPtr object) Remove object from workcell
 - 
removepublic void remove(DevicePtr device) Remove device from workcell
 - 
removepublic void remove(SensorModelPtr sensor) Remove sensormodel from workcell
 - 
removepublic void remove(ControllerModelPtr controller) Remove controllermodel from workcell
 - 
removeObjectpublic void removeObject(Object object) Removes object from workcell
 - Parameters:
- object- [in] Object to remove
 
 - 
addDevicepublic void addDevice(DevicePtr device) Adds a Device to the WorkCell.
 
 Ownership of device is taken.
 - Parameters:
- device- [in] pointer to device.
 
 - 
getDevicespublic DevicePtrVector getDevices() Returns a reference to a vector with pointers to the
 Device(s) in the WorkCell
 - Returns:
- const vector with pointers to rw::models::Device(s).
 
 - 
findFramepublic Frame findFrame(java.lang.String name) Returns frame with the specified name.
 
 If multiple frames has the same name, the first frame encountered
 will be returned. If no frame is found, the method returns NULL.
 - Parameters:
- name- [in] name of Frame.
 
- Returns:
- The frame with name name or NULL if no such frame.
 
 - 
getFramespublic FrameVector getFrames() Returns all frames in workcell- Returns:
- List of all frames
 
 - 
findDevicepublic DevicePtr findDevice(java.lang.String name) The device named name of the workcell.
 
 NULL is returned if there is no such device.
 - Parameters:
- name- [in] The device name
 
- Returns:
- The device named name or NULL if no such device.
 
 - 
getDefaultStatepublic State getDefaultState() Returns a default State- Returns:
- default State
 
 - 
setDefaultStatepublic void setDefaultState(State state) set the default state of the WorkCell.
 if the given state is an older state then states valid in both
 new and old version will be copied to the default state.
 - 
findSensorpublic SensorModelPtr findSensor(java.lang.String name) Returns sensor with the specified name.
 
 If multiple sensors has the same name, the first sensor
 encountered will be returned. If no sensor is found, the method
 returns NULL.
 - Parameters:
- name- [in] name of sensor.
 
- Returns:
- The sensor with name name or NULL if no such sensor.
 
 - 
getSensorspublic VectorSensorModelPtr getSensors() Returns all frames in workcell- Returns:
- List of all frames
 
 - 
findControllerpublic ControllerModelPtr findController(java.lang.String name) Returns controller with the specified name.
 
 If multiple controlelrs has the same name, the first controller
 encountered will be returned. If no controller is found, the
 method returns NULL.
 - Parameters:
- name- [in] name of controller.
 
- Returns:
- The controller with name name or NULL if no such
 controller.
 
 - 
getControllerspublic ControllerModelPtrVector getControllers() Returns all controllers in workcell- Returns:
- List of all controllers
 
 - 
getObjectspublic ObjectPtrVector getObjects() Returns all object in the work cell
 - Returns:
- All object in work cell
 
 - 
findObjectpublic ObjectPtr findObject(java.lang.String name) The object named name of the workcell.
 
 NULL is returned if there is no such object.
 - Parameters:
- name- [in] The object name
 
- Returns:
- The object named name or NULL if no such object.
 
 - 
addpublic void add(DevicePtr device) Add device to workcell
 - 
addpublic void add(ObjectPtr object) Add object to workcell
 - 
addpublic void add(SensorModelPtr sensor) Add sensormodel to workcell
 - 
addpublic void add(ControllerModelPtr controller) Add controllermodel to workcell
 - 
getStateStructurepublic StateStructurePtr getStateStructure() gets the complete state structure of the workcell.- Returns:
- the state structure of the workcell.
 
 - 
getPropertyMappublic PropertyMap getPropertyMap() Properties of this workcell
 - 
getCollisionSetuppublic SWIGTYPE_p_rw__proximity__CollisionSetup getCollisionSetup() Returns collision setup associated to work cell- Returns:
- Collision setup
 
 - 
getSceneDescriptorpublic SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneDescriptor_t getSceneDescriptor() Get the scene descriptor.- Returns:
- the scene descriptor.
 
 - 
setSceneDescriptorpublic void setSceneDescriptor(SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneDescriptor_t scene) Set the scene descriptor.- Parameters:
- scene- [in] the scene descriptor.
 
 - 
getFilenamepublic java.lang.String getFilename() Returns the full path and filename of the workcell.
 
 If the workcell is loaded from file, then this method returns the
 full filename. Otherwise it returns an empty string.
 - 
getFilePathpublic java.lang.String getFilePath() Returns the path of where the work cell is located
 
 If the workcell is not loaded from file, it returns an empty
 string
 - 
getCalibrationFilenamepublic java.lang.String getCalibrationFilename() Returns the filename of the calibration associated to the
 work cell.
 
 Returns an empty string in case no calibration is associated.
 
 To load the file use the getFilePath()+getCalibrationFilename()
 to get the absolute location
 - 
setCalibrationFilenamepublic void setCalibrationFilename(java.lang.String calibrationFilename) Sets the filename of the calibration file
 - Parameters:
- calibrationFilename- [in] Filename of calibration file with
 path relative to the work cell path.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
findMovableFramepublic MovableFrame findMovableFrame(java.lang.String name) Returns MovableFrame with the specified name.
 
 If multiple frames has the same name, the first frame encountered
 will be returned. If no frame is found, the method returns NULL.
 - Parameters:
- name- [in] name of Frame.
 
- Returns:
- The MovableFrame with name name or NULL if no such frame.
 
 - 
findFixedFramepublic FixedFrame findFixedFrame(java.lang.String name) Returns FixedFrame with the specified name.
 
 If multiple frames has the same name, the first frame encountered
 will be returned. If no frame is found, the method returns NULL.
 - Parameters:
- name- [in] name of Frame.
 
- Returns:
- The FixedFrame with name name or NULL if no such frame.
 
 - 
findMovableFramespublic MovableFrameVector findMovableFrames() Returns all MovableFrames.- Returns:
- all frames of type MovableFrames in the workcell
 
 - 
findFixedFramespublic VectorFixedFrame findFixedFrames() Returns all FixedFrame.- Returns:
- all frames of type FixedFrame in the workcell
 
 - 
findJointDevicepublic JointDevicePtr findJointDevice(java.lang.String name) The device named name of the workcell.
 
 NULL is returned if there is no such device.
 - Parameters:
- name- [in] The device name
 
- Returns:
- The device named name or NULL if no such device.
 
 - 
findSerialDevicepublic SerialDevicePtr findSerialDevice(java.lang.String name) The device named name of the workcell.
 
 NULL is returned if there is no such device.
 - Parameters:
- name- [in] The device name
 
- Returns:
- The device named name or NULL if no such device.
 
 - 
findTreeDevicepublic TreeDevicePtr findTreeDevice(java.lang.String name) The device named name of the workcell.
 
 NULL is returned if there is no such device.
 - Parameters:
- name- [in] The device name
 
- Returns:
- The device named name or NULL if no such device.
 
 - 
findParallelDevicepublic ParallelDevicePtr findParallelDevice(java.lang.String name) The device named name of the workcell.
 
 NULL is returned if there is no such device.
 - Parameters:
- name- [in] The device name
 
- Returns:
- The device named name or NULL if no such device.
 
 - 
findJointDevicespublic JointDevicePtrVector findJointDevices() Returns a vector with pointers to the Device(s) with a
 specific type JointDevice in the WorkCell
 - Returns:
- vector with pointers to Device(s) of type T.
 
 - 
findSerialDevicespublic VectorSerialDevicePtr findSerialDevices() Returns a vector with pointers to the Device(s) with a
 specific type SerialDevice in the WorkCell
 - Returns:
- vector with pointers to Device(s) of type T.
 
 - 
findTreeDevicespublic VectorTreeDevicePtr findTreeDevices() Returns a vector with pointers to the Device(s) with a
 specific type TreeDevice in the WorkCell
 - Returns:
- vector with pointers to Device(s) of type T.
 
 - 
findParallelDevicespublic VectorParallelDevicePtr findParallelDevices() Returns a vector with pointers to the Device(s) with a
 specific type ParallelDevice in the WorkCell
 - Returns:
- vector with pointers to Device(s) of type T.
 
 
- 
 
-