RobWorkProject  23.9.11-
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 rw::models::WorkCell &workcell)
 All frames of the workcell.
 
static rw::kinematics::FramegetFrame (const rw::models::WorkCell &workcell, const std::string &name)
 The frame named name of workcell workcell. More...
 
static rw::core::Ptr< rw::models::DevicegetDevice (const rw::models::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 rw::models::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 rw::models::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 rw::models::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 std::vector< rw::kinematics::StategetStatePath (const rw::models::Device &device, const std::vector< rw::math::Q > &path, const rw::kinematics::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. More...
 
static void getStatePath (const rw::models::Device &device, const std::vector< rw::math::Q > &path, const rw::kinematics::State &common_state, std::vector< rw::kinematics::State > &result)
 Convert a sequence of configurations to a sequence of states. More...
 
static rw::core::Ptr< rw::models::DevicemakeDevice (rw::core::Ptr< rw::models::Device > device, const rw::kinematics::State &state, rw::core::Ptr< rw::kinematics::Frame > base=NULL, rw::core::Ptr< 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 rw::core::Ptr<rw::models::Device> getDevice ( const rw::models::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 rw::models::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 std::vector<rw::kinematics::State> getStatePath ( const rw::models::Device device,
const std::vector< rw::math::Q > &  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 rw::models::Device device,
const std::vector< rw::math::Q > &  path,
const rw::kinematics::State common_state,
std::vector< rw::kinematics::State > &  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::core::Ptr<rw::models::Device> makeDevice ( rw::core::Ptr< rw::models::Device device,
const rw::kinematics::State state,
rw::core::Ptr< rw::kinematics::Frame base = NULL,
rw::core::Ptr< 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: