RobWorkProject
Static Public Member Functions | List of all members
Models Class Reference

Utility functions for the rw::models module. More...

#include <Models.hpp>

Static Public Member Functions

static std::vector< rw::kinematics::Frame * > findAllFrames (const WorkCell &workcell)
 All frames of the workcell.
 
static rw::kinematics::FramegetFrame (const WorkCell &workcell, const std::string &name)
 The frame named name of workcell workcell. More...
 
static Device::Ptr getDevice (const WorkCell &workcell, const std::string &name)
 The device named name of workcell workcell. More...
 
static bool inBounds (const rw::math::Q &q, const Device::QBox &bounds, double tolerance=0)
 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.
 
static bool inBounds (const rw::math::Q &q, const Device &device, double tolerance=0)
 True iff the configuration q is within the joint limits of the device device.
 
static bool inBounds (const rw::math::Q &val, const Joint &joint, double tolerance=0)
 True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.
 
static bool inBounds (const rw::kinematics::State &state, const WorkCell &workcell, double tolerance=0)
 True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.
 
static rw::trajectory::StatePath getStatePath (const Device &device, const rw::trajectory::QPath &path, const rw::kinematics::State &common_state)
 Convert a sequence of configurations to a sequence of states. More...
 
static void getStatePath (const Device &device, const rw::trajectory::QPath &path, const rw::kinematics::State &common_state, rw::trajectory::StatePath &result)
 Convert a sequence of configurations to a sequence of states. More...
 
static rw::models::Device::Ptr makeDevice (rw::models::Device::Ptr device, const rw::kinematics::State &state, rw::kinematics::Frame *base=NULL, rw::kinematics::Frame *end=NULL)
 Construct a new device for which the base of the device equals base and the end of the device equals end. More...
 

Detailed Description

Utility functions for the rw::models module.

Member Function Documentation

◆ getDevice()

static Device::Ptr getDevice ( const WorkCell workcell,
const std::string &  name 
)
static

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.

◆ getFrame()

static rw::kinematics::Frame& getFrame ( const WorkCell workcell,
const std::string &  name 
)
static

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.

◆ getStatePath() [1/2]

static rw::trajectory::StatePath getStatePath ( const Device device,
const rw::trajectory::QPath path,
const rw::kinematics::State common_state 
)
static

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() [2/2]

static void getStatePath ( const Device device,
const rw::trajectory::QPath path,
const rw::kinematics::State common_state,
rw::trajectory::StatePath result 
)
static

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()

static rw::models::Device::Ptr makeDevice ( rw::models::Device::Ptr  device,
const rw::kinematics::State state,
rw::kinematics::Frame base = NULL,
rw::kinematics::Frame end = NULL 
)
static

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.

The documentation for this class was generated from the following file: