Package org.robwork.sdurw_models
Class Models
- java.lang.Object
-
- org.robwork.sdurw_models.Models
-
public class Models extends java.lang.Object
Utility functions for the rw::models module.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static FrameVector
findAllFrames(WorkCell workcell)
All frames of the workcell.static long
getCPtr(Models obj)
static 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.static 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.static 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.static 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.
static 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.static 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.static boolean
inBounds(Q q, PairQ bounds)
True iff the configuration q is within the box with lower and
upper corners given by bounds.static 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.static boolean
inBounds(Q q, Device device)
True iff the configuration q is within the joint limits of the
device device.static boolean
inBounds(Q q, Device device, double tolerance)
True iff the configuration q is within the joint limits of the
device device.static 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.static 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.static 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.
static 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.
static 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.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Models obj)
-
delete
public void delete()
-
findAllFrames
public static FrameVector findAllFrames(WorkCell workcell)
All frames of the workcell.
-
getFrame
public static 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 static 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 static 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 static 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 static boolean inBounds(Q q, Device device, double tolerance)
True iff the configuration q is within the joint limits of the
device device.
-
inBounds
public static boolean inBounds(Q q, Device device)
True iff the configuration q is within the joint limits of the
device device.
-
inBounds
public static 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 static 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 static 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 static 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 static 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 static 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 static 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 static 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 static 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.
-
-