Package org.robwork.sdurw_models
Class ModelsPtr
- java.lang.Object
-
- org.robwork.sdurw_models.ModelsPtr
-
public class ModelsPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Models
__ref__()
Dereferencing operator.ModelsCPtr
cptr()
void
delete()
Models
deref()
The pointer stored in the object.boolean
equals(Models p)
FrameVector
findAllFrames(WorkCell workcell)
All frames of the workcell.static long
getCPtr(ModelsPtr obj)
Models
getDeref()
Member access operator.DevicePtr
getDevice(WorkCell workcell, java.lang.String name)
The device named name of workcell workcell.
An exception is thrown if the device can not be found in the workcell.
See WorkCell::findDevice() for a non-throwing version.Frame
getFrame(WorkCell workcell, java.lang.String name)
The frame named name of workcell workcell.
An exception is thrown if the frame can not be found in the workcell.
See WorkCell::findFrame() for a non-throwing version.VectorState
getStatePath(Device device, VectorQ path, State common_state)
Convert a sequence of configurations to a sequence of states.
The device configurations are assumed to belong to a common device
and state.void
getStatePath(Device device, VectorQ path, State common_state, VectorState result)
Convert a sequence of configurations to a sequence of states.
The device configurations are assumed to belong to a common device
and state.
boolean
inBounds(State state, WorkCell workcell)
True iff the joint values of state are within the joint limits
of the joints of workcell with a tolerance of tolerance.boolean
inBounds(State state, WorkCell workcell, double tolerance)
True iff the joint values of state are within the joint limits
of the joints of workcell with a tolerance of tolerance.boolean
inBounds(Q q, PairQ bounds)
True iff the configuration q is within the box with lower and
upper corners given by bounds.boolean
inBounds(Q q, PairQ bounds, double tolerance)
True iff the configuration q is within the box with lower and
upper corners given by bounds.boolean
inBounds(Q q, Device device)
True iff the configuration q is within the joint limits of the
device device.boolean
inBounds(Q q, Device device, double tolerance)
True iff the configuration q is within the joint limits of the
device device.boolean
inBounds(Q val, Joint joint)
True iff the joint value val is within the joint limits of the
joint joint with a tolerance of tolerance.boolean
inBounds(Q val, Joint joint, double tolerance)
True iff the joint value val is within the joint limits of the
joint joint with a tolerance of tolerance.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipDevicePtr
makeDevice(DevicePtr device, State state)
Construct a new device for which the base of the device equals
base and the end of the device equals end.
For changes in the configuration of device, base should be
fixed relative to device->getBase() and end should be fixed
relative to device->getEnd().
If base is NULL, then device->getBase() is used as the default
value.
If end is NULL, then device->getEnd() is used as the default
value.
If base and end equal base and end for the device, then the
original device is returned.
DevicePtr
makeDevice(DevicePtr device, State state, FramePtr base)
Construct a new device for which the base of the device equals
base and the end of the device equals end.
For changes in the configuration of device, base should be
fixed relative to device->getBase() and end should be fixed
relative to device->getEnd().
If base is NULL, then device->getBase() is used as the default
value.
If end is NULL, then device->getEnd() is used as the default
value.
If base and end equal base and end for the device, then the
original device is returned.
DevicePtr
makeDevice(DevicePtr device, State state, FramePtr base, FramePtr end)
Construct a new device for which the base of the device equals
base and the end of the device equals end.
For changes in the configuration of device, base should be
fixed relative to device->getBase() and end should be fixed
relative to device->getEnd().
If base is NULL, then device->getBase() is used as the default
value.
If end is NULL, then device->getEnd() is used as the default
value.
If base and end equal base and end for the device, then the
original device is returned.
-
-
-
Constructor Detail
-
ModelsPtr
public ModelsPtr(long cPtr, boolean cMemoryOwn)
-
ModelsPtr
public ModelsPtr()
Default constructor yielding a NULL-pointer.
-
ModelsPtr
public ModelsPtr(Models ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ModelsPtr obj)
-
delete
public void delete()
-
deref
public Models deref()
The pointer stored in the object.
-
__ref__
public Models __ref__()
Dereferencing operator.
-
getDeref
public Models getDeref()
Member access operator.
-
equals
public boolean equals(Models p)
-
isShared
public 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.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public ModelsCPtr cptr()
-
findAllFrames
public FrameVector findAllFrames(WorkCell workcell)
All frames of the workcell.
-
getFrame
public Frame getFrame(WorkCell workcell, java.lang.String name)
The frame named name of workcell workcell.
An exception is thrown if the frame can not be found in the workcell.
See WorkCell::findFrame() for a non-throwing version.
-
getDevice
public DevicePtr getDevice(WorkCell workcell, java.lang.String name)
The device named name of workcell workcell.
An exception is thrown if the device can not be found in the workcell.
See WorkCell::findDevice() for a non-throwing version.
-
inBounds
public boolean inBounds(Q q, PairQ bounds, double tolerance)
True iff the configuration q is within the box with lower and
upper corners given by bounds. Each value of q is allowed to be
outside of the box by the amount tolerance.
-
inBounds
public boolean inBounds(Q q, PairQ bounds)
True iff the configuration q is within the box with lower and
upper corners given by bounds. Each value of q is allowed to be
outside of the box by the amount tolerance.
-
inBounds
public boolean inBounds(Q q, Device device, double tolerance)
True iff the configuration q is within the joint limits of the
device device.
-
inBounds
public boolean inBounds(Q q, Device device)
True iff the configuration q is within the joint limits of the
device device.
-
inBounds
public boolean inBounds(Q val, Joint joint, double tolerance)
True iff the joint value val is within the joint limits of the
joint joint with a tolerance of tolerance.
-
inBounds
public boolean inBounds(Q val, Joint joint)
True iff the joint value val is within the joint limits of the
joint joint with a tolerance of tolerance.
-
inBounds
public boolean inBounds(State state, WorkCell workcell, double tolerance)
True iff the joint values of state are within the joint limits
of the joints of workcell with a tolerance of tolerance.
-
inBounds
public boolean inBounds(State state, WorkCell workcell)
True iff the joint values of state are within the joint limits
of the joints of workcell with a tolerance of tolerance.
-
getStatePath
public VectorState getStatePath(Device device, VectorQ path, State common_state)
Convert a sequence of configurations to a sequence of states.
The device configurations are assumed to belong to a common device
and state.- Parameters:
device
- [in] The device for the configurations.path
- [in] The sequence of device configurations.common_state
- [in] State to share for all configurations.- Returns:
- Sequence of states - one state for each configuration.
-
getStatePath
public void getStatePath(Device device, VectorQ path, State common_state, VectorState result)
Convert a sequence of configurations to a sequence of states.
The device configurations are assumed to belong to a common device
and state.
- Parameters:
device
- [in] The device for the configurations.path
- [in] The sequence of device configurations.common_state
- [in] State to share for all configurations.result
- [out] Sequence of states - one state for each configuration.
-
makeDevice
public DevicePtr makeDevice(DevicePtr device, State state, FramePtr base, FramePtr end)
Construct a new device for which the base of the device equals
base and the end of the device equals end.
For changes in the configuration of device, base should be
fixed relative to device->getBase() and end should be fixed
relative to device->getEnd().
If base is NULL, then device->getBase() is used as the default
value.
If end is NULL, then device->getEnd() is used as the default
value.
If base and end equal base and end for the device, then the
original device is returned.
- Parameters:
device
- [in] Original device.
state
- [in] The kinematic structure assumed for Jacobian
computations.
base
- [in] Base frame for the new device.end
- [in] End frame for the new device.
-
makeDevice
public DevicePtr makeDevice(DevicePtr device, State state, FramePtr base)
Construct a new device for which the base of the device equals
base and the end of the device equals end.
For changes in the configuration of device, base should be
fixed relative to device->getBase() and end should be fixed
relative to device->getEnd().
If base is NULL, then device->getBase() is used as the default
value.
If end is NULL, then device->getEnd() is used as the default
value.
If base and end equal base and end for the device, then the
original device is returned.
- Parameters:
device
- [in] Original device.
state
- [in] The kinematic structure assumed for Jacobian
computations.
base
- [in] Base frame for the new device.
-
makeDevice
public DevicePtr makeDevice(DevicePtr device, State state)
Construct a new device for which the base of the device equals
base and the end of the device equals end.
For changes in the configuration of device, base should be
fixed relative to device->getBase() and end should be fixed
relative to device->getEnd().
If base is NULL, then device->getBase() is used as the default
value.
If end is NULL, then device->getEnd() is used as the default
value.
If base and end equal base and end for the device, then the
original device is returned.
- Parameters:
device
- [in] Original device.
state
- [in] The kinematic structure assumed for Jacobian
computations.
-
-