sdurw_kinematics module

class sdurw_kinematics.sdurw_kinematics.FKRange(*args)

Bases: object

Forward kinematics between a pair of frames.

FKRange finds the relative transform between a pair of frames. FKRange finds the path connecting the pair of frames and computes the total transform of this path. Following initialization, FKRange assumes that the path does not change structure because of uses of the attachFrame() feature. If the structure of the path has changed, the FKRange will produce wrong results.

FKRange is guaranteed to select the shortest path connecting the frames, i.e. the path doesn’t go all the way down to the root if it can be helped.

__init__(*args)

Overload 1:

Forward kinematics for the path leading from from to to.

If a frame of NULL is passed as argument, it is interpreted to mean the WORLD frame.

Parameters
  • from (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The start frame.

  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The end frame.

  • state (State) – [in] The path structure.


Overload 2:

Default constructor

Will always return an identity matrix as the transform

get(state)

The relative transform between the frames.

Parameters

state (State) – [in] Configuration values for the frames of the tree.

getBase()

Returns the first frame in the range.

Return type

rw::core::Ptr< rw::kinematics::Frame const >

Returns

The base frame (from).

getEnd()

Returns the last frame in the range.

Return type

rw::core::Ptr< rw::kinematics::Frame const >

Returns

The end frame (to).

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FKRangeCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

get(state)

The relative transform between the frames.

Parameters

state (State) – [in] Configuration values for the frames of the tree.

getBase()

Returns the first frame in the range.

Return type

rw::core::Ptr< rw::kinematics::Frame const >

Returns

The base frame (from).

getDeref()

Member access operator.

getEnd()

Returns the last frame in the range.

Return type

rw::core::Ptr< rw::kinematics::Frame const >

Returns

The end frame (to).

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FKRangePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

cptr()
deref()

The pointer stored in the object.

get(state)

The relative transform between the frames.

Parameters

state (State) – [in] Configuration values for the frames of the tree.

getBase()

Returns the first frame in the range.

Return type

rw::core::Ptr< rw::kinematics::Frame const >

Returns

The base frame (from).

getDeref()

Member access operator.

getEnd()

Returns the last frame in the range.

Return type

rw::core::Ptr< rw::kinematics::Frame const >

Returns

The end frame (to).

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FKTable(state)

Bases: object

Forward kinematics for a set of frames.

FKTable finds transforms for frames for a given fixed work cell state. The frame transforms are calculated relative to the world frame.

__init__(state)

Forward kinematics for the work cell state state.

Parameters

state (State) – [in] The work state for which world transforms are to be calculated.

get(frame)

Frame&) const

getState()

Returns State associated with the FKTable

The State returned is the State used to calculate the forward kinematics.

Return type

State

Returns

State used to calculate the forward kinematics

reset(state)

resets the FKTable to state :type state: State :param state:

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FKTableCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

get(frame)

Frame&) const

getDeref()

Member access operator.

getState()

Returns State associated with the FKTable

The State returned is the State used to calculate the forward kinematics.

Return type

State

Returns

State used to calculate the forward kinematics

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FKTablePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

cptr()
deref()

The pointer stored in the object.

get(frame)

Frame&) const

getDeref()

Member access operator.

getState()

Returns State associated with the FKTable

The State returned is the State used to calculate the forward kinematics.

Return type

State

Returns

State used to calculate the forward kinematics

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

reset(state)

resets the FKTable to state :type state: State :param state:

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FixedFrame(name, transform)

Bases: FixedFrame

class sdurw_kinematics.sdurw_kinematics.FixedFrameCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDeref()

Member access operator.

getFixedTransform()

get the fixed transform of this frame.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

sdurw_kinematics.sdurw_kinematics.FixedFrameClass

alias of FixedFrame

class sdurw_kinematics.sdurw_kinematics.FixedFramePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

attachTo(parent, state)

Move a frame within the tree.

The frame frame is detached from its parent and reattached to parent. The frames frame and parent must both belong to the same kinematics tree.

Only frames with no static parent (see getParent()) can be moved.

Parameters
  • parent (Ptr) – [in] The frame to attach frame to.

  • state (State) – [inout] The state to which the attachment is written.

cptr()
deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getChildren(*args)

Overload 1:


Overload 2:

Iterator pair for all children of the frame.

getChildrenList(state)

get a list of all frame children :type state: State :param state: [in] the state of to look for children in. :rtype: std::vector< rw::kinematics::Frame::Ptr > :return: a vector with the children

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDafChildren(state)
getDafParent(state)
getData(state)

An array of length size() containing the values for the state data.

It is OK to call this method also for a StateData with zero size.

Parameters

state (State) – [in] The state containing the StateData values.

Return type

std::vector< double >

Returns

The values for the frame.

getDefaultCache()

Get default cache. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDeref()

Member access operator.

getFixedTransform()

get the fixed transform of this frame.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args)

Overload 1:

The parent of the frame or NULL if the frame is a DAF.


Overload 2:

Returns the parent of the frame

If no static parent exists it look for at DAF parent. If such does not exists either it returns NULL.

Parameters

state (State) – [in] the state to consider

Return type

Frame

Returns

the parent

getPropertyMap()
getStateStructure()

Get the state structure. :rtype: StateStructure :return: the state structure.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isDAF()

Test if this frame is a Dynamically Attachable Frame :rtype: boolean :return: true if this frame is a DAF, false otherwise

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

moveTo(refTtarget, refframe, state)

Move the frame such that it is located with a relative transform refTtarget relative to refframe. :type refTtarget: rw::math::Transform3D< double > :param refTtarget: [in] the transform relative to refframe . :type refframe: rw::core::Ptr< rw::kinematics::Frame > :param refframe: [in] the reference frame. :type state: State :param state: [in] the state giving the current poses.

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

setCache(cache, state)

Set the cache values. :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] the cache. :type state: State :param state: [in/out] state updated with new cache.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
setTransform(transform)

Sets the fixed transform of this frame. :type transform: rw::math::Transform3D< double > :param transform: [in] the new transformation of this frame Notes: THIS IS NOT THREAD SAFE. If you need thread safety then use MovableFrame instead or make sure multiple threads are not using this frame when changing the transformation.

size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

class sdurw_kinematics.sdurw_kinematics.Frame(*args, **kwargs)

Bases: StateData

The type of node of forward kinematic trees.

Types of joints are implemented as subclasses of Frame. The responsibility of a joint is to implement the getTransform() method that returns the transform of the frame relative to whatever parent it is attached to.

The getTransform() method takes as parameter the set of joint values State for the tree. Joint values for a particular frame can be accessed via State::getQ(). A frame may contain pointers to other frames so that the transform of a frame may depend on the joint values for other frames also.

__init__(*args, **kwargs)

Overload 1:

A state with size number of doubles in the State vector.

size must be non-negative.

The newly created state data can be added to a structure with StateStructure::addData().

The size of the state data in nr of doubles of the state data is constant throughout the lifetime of the state data.

Parameters
  • size (int) – [in] The number of degrees of freedom of the frame.

  • name (string) – [in] The name of the frame.


Overload 2:

, const std::string&) :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] a cache.

attachTo(parent, state)

Move a frame within the tree.

The frame frame is detached from its parent and reattached to parent. The frames frame and parent must both belong to the same kinematics tree.

Only frames with no static parent (see getParent()) can be moved.

Parameters
  • parent (Ptr) – [in] The frame to attach frame to.

  • state (State) – [inout] The state to which the attachment is written.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getChildren(*args)

Overload 1:


Overload 2:

Iterator pair for all children of the frame.

getChildrenList(state)

get a list of all frame children :type state: State :param state: [in] the state of to look for children in. :rtype: std::vector< rw::kinematics::Frame::Ptr > :return: a vector with the children

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDafChildren(state)
getDafParent(state)
getParent(*args)

Overload 1:

The parent of the frame or NULL if the frame is a DAF.


Overload 2:

Returns the parent of the frame

If no static parent exists it look for at DAF parent. If such does not exists either it returns NULL.

Parameters

state (State) – [in] the state to consider

Return type

Frame

Returns

the parent

getPropertyMap()
getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

isDAF()

Test if this frame is a Dynamically Attachable Frame :rtype: boolean :return: true if this frame is a DAF, false otherwise

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

class sdurw_kinematics.sdurw_kinematics.FrameCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

class sdurw_kinematics.sdurw_kinematics.FrameMap(*args)

Bases: object

a specialized mapping implementation for frames. It uses the internal structure of Frames to provide fast O(1) lookup for mappings from Frame to anything.

Notes: A requirement is that all frames must be registered in the same StateStructure.

__init__(*args)

Overload 1:

creates a framemap :type s: int, optional :param s: [in] the default value of new instances of T


Overload 2:

creates a framemap with an initial size of s :type s: int, optional :param s: [in] nr of elements of the types T with default value “defaultVal” :type defaultVal: float :param defaultVal: [in] the default value of new instances of T


Overload 3:

creates a framemap with an initial size of s :param s: [in] nr of elements of the types T with default value “defaultVal” :type defaultVal: float :param defaultVal: [in] the default value of new instances of T

clear()

Clear the frame map.

erase(frame)

Erase an element from the map

has(frame)

True iff a value for frame has been inserted in the map (or accessed using non-const operator[]).

insert(frame, value)

inserts a value into the frame map :type frame: Frame :param frame: [in] the frame for which the value is to be associated :type value: float :param value: [in] the value that is to be associated to the frame

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FramePair(*args)

Bases: object

__init__(*args)
property first
property second
property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FramePairVector(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.FramePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

attachTo(parent, state)

Move a frame within the tree.

The frame frame is detached from its parent and reattached to parent. The frames frame and parent must both belong to the same kinematics tree.

Only frames with no static parent (see getParent()) can be moved.

Parameters
  • parent (Ptr) – [in] The frame to attach frame to.

  • state (State) – [inout] The state to which the attachment is written.

cptr()
deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getChildren(*args)

Overload 1:


Overload 2:

Iterator pair for all children of the frame.

getChildrenList(state)

get a list of all frame children :type state: State :param state: [in] the state of to look for children in. :rtype: std::vector< rw::kinematics::Frame::Ptr > :return: a vector with the children

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDafChildren(state)
getDafParent(state)
getData(state)

An array of length size() containing the values for the state data.

It is OK to call this method also for a StateData with zero size.

Parameters

state (State) – [in] The state containing the StateData values.

Return type

std::vector< double >

Returns

The values for the frame.

getDefaultCache()

Get default cache. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args)

Overload 1:

The parent of the frame or NULL if the frame is a DAF.


Overload 2:

Returns the parent of the frame

If no static parent exists it look for at DAF parent. If such does not exists either it returns NULL.

Parameters

state (State) – [in] the state to consider

Return type

Frame

Returns

the parent

getPropertyMap()
getStateStructure()

Get the state structure. :rtype: StateStructure :return: the state structure.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isDAF()

Test if this frame is a Dynamically Attachable Frame :rtype: boolean :return: true if this frame is a DAF, false otherwise

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

setCache(cache, state)

Set the cache values. :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] the cache. :type state: State :param state: [in/out] state updated with new cache.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

class sdurw_kinematics.sdurw_kinematics.FrameType(type)

Bases: object

Enumeration of all concrete frame types of RobWork.

FrameType::Type is an enumeration of all frame types defined within RobWork. For every implementation X of Frame, FrameType has an enumeration value named FrameType::X.

The type of a frame can be accessed via frameTypeAccessor().

It is the responsibility of the work cell loaders to properly initialize the frame type values.

The use of FrameType is a hack introduced due to the lack of a working dynamic_cast<>.

DependentJoint = 4
FixedFrame = 2
MovableFrame = 3
PrismaticJoint = 1
RevoluteJoint = 0
Unknown = 5
__init__(type)

Identifier for a frame of type type.

Parameters

type (int) – [in] The type of frame.

get()

The frame type.

Return type

int

Returns

The frame type.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FrameTypeCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

get()

The frame type.

Return type

int

Returns

The frame type.

getDeref()

Member access operator.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FrameTypePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

cptr()
deref()

The pointer stored in the object.

get()

The frame type.

Return type

int

Returns

The frame type.

getDeref()

Member access operator.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.FrameVector(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.Kinematics(*args, **kwargs)

Bases: object

Utility functions for the rw::kinematics module.

__init__(*args, **kwargs)
static buildFrameMap(root, state)

A map linking frame names to frames.

The map contains an entry for every frame below root in the tree with structure described by state.

Parameters
  • root (rw::core::Ptr< rw::kinematics::Frame >) – [in] Root of the kinematics tree to search.

  • state (State) – [in] The kinematics tree structure.

static childToParentChain(child, parent, state)

The chain of frames connecting child to parent.

child is included in the chain, but parent is not included. If parent is NULL then the entire path from child to the world frame is returned. If child as well as parent is NULL then the empty chain is gracefully returned.

The state gives the connectedness of the tree.

If parent is not on the chain from child towards the root, then an exception is thrown.

static findAllFrames(*args)
Overload 1:

All frames reachable from root for a tree structure of

state.

This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.

We give no guarantee on the ordering of the frames.

Parameters
  • root (rw::core::Ptr< rw::kinematics::Frame >) – [in] The root node from where the frame search is started.

  • state (State) – [in] The structure of the tree.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All reachable frames.


Overload 2:

All frames reachable from root for a tree structure.

This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.

We give no guarantee on the ordering of the frames.

DAF are not included.

Parameters

root (rw::core::Ptr< rw::kinematics::Frame >) – [in] The root node from where the frame search is started.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All reachable frames.

static frameTframe(_from, to, state)

The transform of frame to relative to frame from.

FrameTframe() is related to WorldTframe() as follows:

frameTframe(from, to, state) ==
inverse(worldTframe(from, state)) *
worldTframe(to, state);
Parameters
  • from (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The start frame.

  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The end frame.

  • state (State) – [in] The state of the kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform from the start frame to the end frame.

static getStaticFrameGroups(root, state)

Get static frame groups.

A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group. :type root: rw::core::Ptr< rw::kinematics::Frame > :param root: [in] the root frame of the tree to search. :type state: State :param state: [in] containing information about the current tree state and the Dynamically

Attachable Frames (DAF).

Return type

std::vector< rw::kinematics::FrameList >

Returns

vector with the frame groups.

static gripFrame(*args)

Overload 1:

Grip item with gripper thereby modifying state.

item must be a DAF.

Parameters
  • item (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to grip.

  • gripper (rw::core::Ptr< rw::kinematics::Frame >) – [in] the grasping frame.

  • state (State) – [in/out] the state.

Raises

An exception is thrown if item is not a DAF.

See also: See also gripFrame(Movablerw::kinematics::Frame*, rw::core::Ptr<rw::kinematics::Frame>, State&).


Overload 2:

Grip item with gripper thereby modifying state.

item must be a DAF.

Parameters
  • item (MovableFrame) – [in] the frame to grip.

  • gripper (rw::core::Ptr< rw::kinematics::Frame >) – [in] the grasping frame.

  • state (State) – [in/out] the state.

Raises

An exception is thrown if item is not a DAF.

See also: See also gripFrame( rw::core::Ptr<rw::kinematics::Frame>, rw::core::Ptr<rw::kinematics::Frame>, State&).

static isDAF(frame)

True if frame is a DAF and false otherwise.

static isFixedFrame(frame)

Check if frame is fixed. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame. :rtype: boolean :return: true if fixed, false otherwise.

static parentToChildChain(parent, child, state)

The chain of frames connecting parent to child.

parent is included in the list, but child is excluded. If

parent as well as child is NULL then the empty chain is returned.

Otherwise parent is included even if parent is NULL.

static reverseChildToParentChain(child, parent, state)

Like ChildToParentChain() except that the frames are returned in the reverse order.

property thisown

The membership flag

static worldFrame(frame, state)

Find the world frame of the workcell by traversing the path from frame to the root of the tree.

The state state is needed to retrieve the parent frames, but the world frame returned is the same for any (valid) state.

static worldTframe(to, state)

The transform of frame in relative to the world frame.

If to=NULL the method returns a \(4 \times 4\) identify matrix

Parameters
  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The transform for which to find the world frame.

  • state (State) – [in] The state of the kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to the world frame.

class sdurw_kinematics.sdurw_kinematics.KinematicsCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

getDeref()

Member access operator.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.KinematicsPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

buildFrameMap(root, state)

A map linking frame names to frames.

The map contains an entry for every frame below root in the tree with structure described by state.

Parameters
  • root (rw::core::Ptr< rw::kinematics::Frame >) – [in] Root of the kinematics tree to search.

  • state (State) – [in] The kinematics tree structure.

childToParentChain(child, parent, state)

The chain of frames connecting child to parent.

child is included in the chain, but parent is not included. If parent is NULL then the entire path from child to the world frame is returned. If child as well as parent is NULL then the empty chain is gracefully returned.

The state gives the connectedness of the tree.

If parent is not on the chain from child towards the root, then an exception is thrown.

cptr()
deref()

The pointer stored in the object.

findAllFrames(*args)
Overload 1:

All frames reachable from root for a tree structure of

state.

This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.

We give no guarantee on the ordering of the frames.

Parameters
  • root (rw::core::Ptr< rw::kinematics::Frame >) – [in] The root node from where the frame search is started.

  • state (State) – [in] The structure of the tree.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All reachable frames.


Overload 2:

All frames reachable from root for a tree structure.

This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.

We give no guarantee on the ordering of the frames.

DAF are not included.

Parameters

root (rw::core::Ptr< rw::kinematics::Frame >) – [in] The root node from where the frame search is started.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All reachable frames.

frameTframe(_from, to, state)

The transform of frame to relative to frame from.

FrameTframe() is related to WorldTframe() as follows:

frameTframe(from, to, state) ==
inverse(worldTframe(from, state)) *
worldTframe(to, state);
Parameters
  • from (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The start frame.

  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The end frame.

  • state (State) – [in] The state of the kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform from the start frame to the end frame.

getDeref()

Member access operator.

getStaticFrameGroups(root, state)

Get static frame groups.

A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group. :type root: rw::core::Ptr< rw::kinematics::Frame > :param root: [in] the root frame of the tree to search. :type state: State :param state: [in] containing information about the current tree state and the Dynamically

Attachable Frames (DAF).

Return type

std::vector< rw::kinematics::FrameList >

Returns

vector with the frame groups.

gripFrame(*args)

Overload 1:

Grip item with gripper thereby modifying state.

item must be a DAF.

Parameters
  • item (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to grip.

  • gripper (rw::core::Ptr< rw::kinematics::Frame >) – [in] the grasping frame.

  • state (State) – [in/out] the state.

Raises

An exception is thrown if item is not a DAF.

See also: See also gripFrame(Movablerw::kinematics::Frame*, rw::core::Ptr<rw::kinematics::Frame>, State&).


Overload 2:

Grip item with gripper thereby modifying state.

item must be a DAF.

Parameters
  • item (MovableFrame) – [in] the frame to grip.

  • gripper (rw::core::Ptr< rw::kinematics::Frame >) – [in] the grasping frame.

  • state (State) – [in/out] the state.

Raises

An exception is thrown if item is not a DAF.

See also: See also gripFrame( rw::core::Ptr<rw::kinematics::Frame>, rw::core::Ptr<rw::kinematics::Frame>, State&).

isDAF(frame)

True if frame is a DAF and false otherwise.

isFixedFrame(frame)

Check if frame is fixed. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame. :rtype: boolean :return: true if fixed, false otherwise.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

parentToChildChain(parent, child, state)

The chain of frames connecting parent to child.

parent is included in the list, but child is excluded. If

parent as well as child is NULL then the empty chain is returned.

Otherwise parent is included even if parent is NULL.

reverseChildToParentChain(child, parent, state)

Like ChildToParentChain() except that the frames are returned in the reverse order.

property thisown

The membership flag

worldFrame(frame, state)

Find the world frame of the workcell by traversing the path from frame to the root of the tree.

The state state is needed to retrieve the parent frames, but the world frame returned is the same for any (valid) state.

worldTframe(to, state)

The transform of frame in relative to the world frame.

If to=NULL the method returns a \(4 \times 4\) identify matrix

Parameters
  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The transform for which to find the world frame.

  • state (State) – [in] The state of the kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to the world frame.

sdurw_kinematics.sdurw_kinematics.Kinematics_buildFrameMap(root, state)

A map linking frame names to frames.

The map contains an entry for every frame below root in the tree with structure described by state.

Parameters
  • root (rw::core::Ptr< rw::kinematics::Frame >) – [in] Root of the kinematics tree to search.

  • state (State) – [in] The kinematics tree structure.

sdurw_kinematics.sdurw_kinematics.Kinematics_childToParentChain(child, parent, state)

The chain of frames connecting child to parent.

child is included in the chain, but parent is not included. If parent is NULL then the entire path from child to the world frame is returned. If child as well as parent is NULL then the empty chain is gracefully returned.

The state gives the connectedness of the tree.

If parent is not on the chain from child towards the root, then an exception is thrown.

sdurw_kinematics.sdurw_kinematics.Kinematics_findAllFrames(*args)
Overload 1:

All frames reachable from root for a tree structure of

state.

This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.

We give no guarantee on the ordering of the frames.

Parameters
  • root (rw::core::Ptr< rw::kinematics::Frame >) – [in] The root node from where the frame search is started.

  • state (State) – [in] The structure of the tree.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All reachable frames.


Overload 2:

All frames reachable from root for a tree structure.

This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.

We give no guarantee on the ordering of the frames.

DAF are not included.

Parameters

root (rw::core::Ptr< rw::kinematics::Frame >) – [in] The root node from where the frame search is started.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All reachable frames.

sdurw_kinematics.sdurw_kinematics.Kinematics_frameTframe(_from, to, state)

The transform of frame to relative to frame from.

FrameTframe() is related to WorldTframe() as follows:

frameTframe(from, to, state) ==
inverse(worldTframe(from, state)) *
worldTframe(to, state);
Parameters
  • from (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The start frame.

  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The end frame.

  • state (State) – [in] The state of the kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform from the start frame to the end frame.

sdurw_kinematics.sdurw_kinematics.Kinematics_getStaticFrameGroups(root, state)

Get static frame groups.

A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group. :type root: rw::core::Ptr< rw::kinematics::Frame > :param root: [in] the root frame of the tree to search. :type state: State :param state: [in] containing information about the current tree state and the Dynamically

Attachable Frames (DAF).

Return type

std::vector< rw::kinematics::FrameList >

Returns

vector with the frame groups.

sdurw_kinematics.sdurw_kinematics.Kinematics_gripFrame(*args)

Overload 1:

Grip item with gripper thereby modifying state.

item must be a DAF.

Parameters
  • item (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to grip.

  • gripper (rw::core::Ptr< rw::kinematics::Frame >) – [in] the grasping frame.

  • state (State) – [in/out] the state.

Raises

An exception is thrown if item is not a DAF.

See also: See also gripFrame(Movablerw::kinematics::Frame*, rw::core::Ptr<rw::kinematics::Frame>, State&).


Overload 2:

Grip item with gripper thereby modifying state.

item must be a DAF.

Parameters
  • item (MovableFrame) – [in] the frame to grip.

  • gripper (rw::core::Ptr< rw::kinematics::Frame >) – [in] the grasping frame.

  • state (State) – [in/out] the state.

Raises

An exception is thrown if item is not a DAF.

See also: See also gripFrame( rw::core::Ptr<rw::kinematics::Frame>, rw::core::Ptr<rw::kinematics::Frame>, State&).

sdurw_kinematics.sdurw_kinematics.Kinematics_isDAF(frame)

True if frame is a DAF and false otherwise.

sdurw_kinematics.sdurw_kinematics.Kinematics_isFixedFrame(frame)

Check if frame is fixed. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame. :rtype: boolean :return: true if fixed, false otherwise.

sdurw_kinematics.sdurw_kinematics.Kinematics_parentToChildChain(parent, child, state)

The chain of frames connecting parent to child.

parent is included in the list, but child is excluded. If

parent as well as child is NULL then the empty chain is returned.

Otherwise parent is included even if parent is NULL.

sdurw_kinematics.sdurw_kinematics.Kinematics_reverseChildToParentChain(child, parent, state)

Like ChildToParentChain() except that the frames are returned in the reverse order.

sdurw_kinematics.sdurw_kinematics.Kinematics_worldFrame(frame, state)

Find the world frame of the workcell by traversing the path from frame to the root of the tree.

The state state is needed to retrieve the parent frames, but the world frame returned is the same for any (valid) state.

sdurw_kinematics.sdurw_kinematics.Kinematics_worldTframe(to, state)

The transform of frame in relative to the world frame.

If to=NULL the method returns a \(4 \times 4\) identify matrix

Parameters
  • to (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The transform for which to find the world frame.

  • state (State) – [in] The state of the kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to the world frame.

class sdurw_kinematics.sdurw_kinematics.MapStringFrame(*args)

Bases: object

__init__(*args)
asdict()
begin()
clear()
count(x)
empty()
end()
erase(*args)
find(x)
get_allocator()
has_key(key)
items()
iterator()
iteritems()
iterkeys()
itervalues()
key_iterator()
keys()
lower_bound(x)
rbegin()
rend()
size()
swap(v)
property thisown

The membership flag

upper_bound(x)
value_iterator()
values()
class sdurw_kinematics.sdurw_kinematics.MovableFrame(name)

Bases: MovableFrame

class sdurw_kinematics.sdurw_kinematics.MovableFrameCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
setTransform(transform, state)

Sets the transform in the state. The transform is relative to the MovableFrame’s parent frame. :type transform: rw::math::Transform3D< double > :param transform: [in] transform to set. the transform is described relative to parent

frame

Parameters

state (State) – [out] state into which to set the transform

size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

class sdurw_kinematics.sdurw_kinematics.MovableFramePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

attachTo(parent, state)

Move a frame within the tree.

The frame frame is detached from its parent and reattached to parent. The frames frame and parent must both belong to the same kinematics tree.

Only frames with no static parent (see getParent()) can be moved.

Parameters
  • parent (Ptr) – [in] The frame to attach frame to.

  • state (State) – [inout] The state to which the attachment is written.

cptr()
deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame. :type to: CPtr :param to: [in] the other frame :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform of frame to relative to this frame.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getChildren(*args)

Overload 1:


Overload 2:

Iterator pair for all children of the frame.

getChildrenList(state)

get a list of all frame children :type state: State :param state: [in] the state of to look for children in. :rtype: std::vector< rw::kinematics::Frame::Ptr > :return: a vector with the children

getDOF()

The number of degrees of freedom (dof) of the frame.

The dof is the number of joint values that are used for controlling the frame.

Given a set joint values of type State, the getDof() number of joint values for the frame can be read and written with State::getQ() and State::setQ().

Return type

int

Returns

The number of degrees of freedom of the frame.

getDafChildren(state)
getDafParent(state)
getData(state)

An array of length size() containing the values for the state data.

It is OK to call this method also for a StateData with zero size.

Parameters

state (State) – [in] The state containing the StateData values.

Return type

std::vector< double >

Returns

The values for the frame.

getDefaultCache()

Get default cache. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args)

Overload 1:

The parent of the frame or NULL if the frame is a DAF.


Overload 2:

Returns the parent of the frame

If no static parent exists it look for at DAF parent. If such does not exists either it returns NULL.

Parameters

state (State) – [in] the state to consider

Return type

Frame

Returns

the parent

getPropertyMap()
getStateStructure()

Get the state structure. :rtype: StateStructure :return: the state structure.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters

state (State) – [in] Joint values for the forward kinematics tree.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isDAF()

Test if this frame is a Dynamically Attachable Frame :rtype: boolean :return: true if this frame is a DAF, false otherwise

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

moveTo(*args)

Overload 1:

Changes the transform in the state, such that the movable frame is located in the transform which is described relative to world. :type transform: rw::math::Transform3D< double > :param transform: [in] transform to set. transform is described relative to world frame :type state: State :param state: [out] state into which to set the transform


Overload 2:

Changes the transform in the state, such that the movable frame is located in the transform which is described relative to refframe :type transform: rw::math::Transform3D< double > :param transform: [in] transform to set. transform is described relative to refframe :type refframe: rw::core::Ptr< rw::kinematics::Frame > :param refframe: [in] the reference frame. :type state: State :param state: [out] state into which to set the transform

multiplyTransform(parent, state, result)

Post-multiply the transform of the frame to the parent transform.

The transform is calculated for the joint values of state.

The exact implementation of getTransform() depends on the type of frame. See for example RevoluteJoint and PrismaticJoint.

Parameters
  • parent (rw::math::Transform3D< double >) – [in] The world transform of the parent frame.

  • state (State) – [in] Joint values for the forward kinematics tree.

  • result (rw::math::Transform3D< double >) – [in] The transform of the frame in the world frame.

setCache(cache, state)

Set the cache values. :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] the cache. :type state: State :param state: [in/out] state updated with new cache.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
setTransform(transform, state)

Sets the transform in the state. The transform is relative to the MovableFrame’s parent frame. :type transform: rw::math::Transform3D< double > :param transform: [in] transform to set. the transform is described relative to parent

frame

Parameters

state (State) – [out] state into which to set the transform

size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world. :type state: State :param state: [in] the state. :rtype: rw::math::Transform3D< double > :return: transform relative to world.

class sdurw_kinematics.sdurw_kinematics.MovableFrameVector(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.QState(*args)

Bases: object

The configuration state of a work cell.

The configuration state contains state data values for all valid StateData in a StateStructure. The validity is defined by the StateSetup.

See Frame::getTransform() for the calculation of the relative transform of a frame for a given configuration state.

Configuration states can be freely copied and assigned.

The configuration state is a part of the StateStructure state (see State).

__init__(*args)

Overload 1:

Constructs an empty QState


Overload 2:

A configuration state.

This constructor is not available for use outside of RobWork. Instead your configuration states should be constructed via the copy constructor.

Parameters

setup (rw::core::Ptr< rw::kinematics::StateSetup >) – [in] The shared setup for configuration states.

getStateSetup()

returns the StateSetup

size()

The dimension of the state vector.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.QStateCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getStateSetup()

returns the StateSetup

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

size()

The dimension of the state vector.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.QStatePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

cptr()
deref()

The pointer stored in the object.

getDeref()

Member access operator.

getStateSetup()

returns the StateSetup

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

size()

The dimension of the state vector.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.State

Bases: Serializable

The state of a work cell (or kinematics tree).

You need a work cell state in order to calculate forward kinematics for trees of frames.

Work cell states can be copied and assigned freely.

The work cell state consists of a part for the tree structure and a part for the configuration values. You are encouraged to use the getParent(), getChildren(), getQ() and setQ() utility functions rather than explicitly type, say, state.getQState().getQ(). That way you will have a much easier time of updating the code if we decide to change the way the kinematics data structures are stored (!). Also getQ(state, frame) is shorter to type also.

The operation of a work cell state is undefined valid if the tree used for its initialization is modified. (The implementation takes some care to check for this and crashes the program in a controlled way if it takes place.)

__init__()

Default constructor giving an empty state. Beware that the state is not initialized and that passing this state to a procedure will typically cause a program crash.

clone(*args)

Overload 1:

performs a deep copy of this state and returns the clone. Both QState and TreeState are (deep) copied as normal however the cachestates will be copied using their clone method. :rtype: State :return: a deep copy of this state (clone)


Overload 2:

performs a deep copy of src into this state. :type src: State :param src: [in] the state that is to be cloned

copy(src)

copies data from a state into this state. The version of the state is allowed to be different from this state. Only state data that is valid for both states will be copied. :type src: State :param src: [in] the state that is to be copied

static getDefault(data)

Get default. :type data: StateData :param data: [in] the state data. :rtype: State :return: default state.

getFrame(id)

gets the frame with id id. If a frame with id id does not exist NULL is returned

getStateStructure()

Returns pointer to the state structure (the structure of Frame’s and StateData) :rtype: rw::core::Ptr< rw::kinematics::StateStructure > :return: Pointer to the StateStructure matching the frame

getUniqueId()

get the state id. Represents the static structure of the StateStructure that this state relates to.

read(iarchive, id)

Enable read-serialization of inherited class by implementing this method. Data is read from iarchive and filled into this object. :type iarchive: InputArchive :param iarchive: [in] the InputArchive from which to read data. :type id: string :param id: [in] The id of the serialized sobject.

Notes: the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined “Vector3D” as its default id.

setQStateInState(to)

Assign to a state the configuration state of this state.

The State can be thought of as consisting of a tree state (TreeState) (for the structure of the tree) and a configuration state (QState) (containing joint values, for example). The setQStateInState() method copies into this state the QState part of another state.

Parameters

to (State) – [out] The state to which the configuration state is written.

setTreeStateInState(to)

Assign to a state the tree state of this state.

The State can be thought of as consisting of a tree state (TreeState) (for the structure of the tree) and a configuration state (QState) (containing joint values, for example). The setTreeState() method copies into this state the TreeState part of another state.

Implementation note: setTreeStateInState() is currently a lot faster than setQStateInState() (even though they are both fast), so if you have the choice then use the former.

Parameters

to (State) – [out] The state to which the tree state is written.

size()

The dimension of the configuration state vector.

Knowing the size of the state is useful for example in error messages, so that you can report if two states seem to belong to different workcells.

property thisown

The membership flag

upgrade()

this function upgrades the current version of this State to the newest state. It will not override data values that is set in the current state.

upgradeTo(state)

this function upgrades the current version of this State with the given state. It will not override data values that is set in the current state.

write(oarchive, id)

Enable write-serialization of inherited class by implementing this method. Data is written to oarchive from this object. :type oarchive: OutputArchive :param oarchive: [out] the OutputArchive in which data should be written. :type id: string :param id: [in] The id of the serialized sobject.

Notes: the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined “Vector3D” as its default id.

class sdurw_kinematics.sdurw_kinematics.StateCache(*args, **kwargs)

Bases: object

the basic building block for the stateless desing using the StateStructure class. A StateCache represents a size, a unique id, and a unique name, when inserted into the StateStructure. The size will allocate “size”-doubles in State objects originating from the StateStructure.

__init__(*args, **kwargs)
clone()

this creates a deep copy of this cache

size()

An integer ID for the StateCache.

IDs are assigned to the state data upon insertion State. StateCache that are not in a State have an ID of -1.

StateCache present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of frame IDs yourself.

Return type

int

Returns

An integer ID for the frame.

The number of doubles allocated by this StateCache in each State object.

Return type

int

Returns

The number of doubles allocated by the StateCache

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateCacheCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

clone()

this creates a deep copy of this cache

deref()

The pointer stored in the object.

getDeref()

Member access operator.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

size()

An integer ID for the StateCache.

IDs are assigned to the state data upon insertion State. StateCache that are not in a State have an ID of -1.

StateCache present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of frame IDs yourself.

Return type

int

Returns

An integer ID for the frame.

The number of doubles allocated by this StateCache in each State object.

Return type

int

Returns

The number of doubles allocated by the StateCache

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateCachePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

clone()

this creates a deep copy of this cache

cptr()
deref()

The pointer stored in the object.

getDeref()

Member access operator.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

size()

An integer ID for the StateCache.

IDs are assigned to the state data upon insertion State. StateCache that are not in a State have an ID of -1.

StateCache present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of frame IDs yourself.

Return type

int

Returns

An integer ID for the frame.

The number of doubles allocated by this StateCache in each State object.

Return type

int

Returns

The number of doubles allocated by the StateCache

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateData(*args)

Bases: object

the basic building block for the stateless design using the StateStructure class. A StateData represents a size, a unique id, and a unique name, when inserted into the StateStructure. The size will allocate “size”-doubles in State objects originating from the StateStructure.

__init__(*args)

Overload 1:

A state with size number of doubles in the State vector.

size must be non-negative.

The newly created state data can be added to a structure with StateStructure::addData().

The size of the state data in nr of doubles of the state data is constant throughout the lifetime of the state data.

Parameters
  • size (int) – [in] The number of degrees of freedom of the frame.

  • name (string) – [in] The name of the frame.


Overload 2:

, const std::string&) :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] a cache.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getData(state)

An array of length size() containing the values for the state data.

It is OK to call this method also for a StateData with zero size.

Parameters

state (State) – [in] The state containing the StateData values.

Return type

std::vector< double >

Returns

The values for the frame.

getDefaultCache()

Get default cache. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getStateStructure()

Get the state structure. :rtype: StateStructure :return: the state structure.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

setCache(cache, state)

Set the cache values. :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] the cache. :type state: State :param state: [in/out] state updated with new cache.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateDataCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateDataPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

cptr()
deref()

The pointer stored in the object.

getCache(state)

Get the cache. :type state: State :param state: [in] the state. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getData(state)

An array of length size() containing the values for the state data.

It is OK to call this method also for a StateData with zero size.

Parameters

state (State) – [in] The state containing the StateData values.

Return type

std::vector< double >

Returns

The values for the frame.

getDefaultCache()

Get default cache. :rtype: rw::core::Ptr< rw::kinematics::StateCache > :return: the cache.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

IDs are assigned to the state data upon insertion State. StateData that are not in a State have an ID of -1.

StateData present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of StateData IDs yourself.

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getStateStructure()

Get the state structure. :rtype: StateStructure :return: the state structure.

hasCache()

Check is state data includes a cache. :rtype: boolean :return: true if cache, false otherwise.

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

setCache(cache, state)

Set the cache values. :type cache: rw::core::Ptr< rw::kinematics::StateCache > :param cache: [in] the cache. :type state: State :param state: [in/out] state updated with new cache.

setData(*args)

Overload 1:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals (std::vector< double >) – [in] The joint values to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];

Overload 2:

Assign for state data the size() of values of the array vals.

The array vals must be of length at least size().

Parameters
  • state (State) – [inout] The state to which vals are written.

  • vals – [in] The joint value to assign.

setData() and getData() are related as follows:

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i < data.getDOF(); i++)
  q_in[i] == q_out[i];
size()

The number of doubles allocated by this StateData in each State object.

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateSetup(*args)

Bases: object

Utility class to help construct a State

StateSetup contains the data to share among QState objects and TreeState objects, namely the assignment of offsets to frames, the mapping of frame indexes to indexes in the QState, the mapping of frame indexes to daf and dafparent index in the TreeState,

__init__(*args)

Overload 1:

Creates an empty StateSetup


Overload 2:

Creates a StateSetup from a StateStructure and a number of valid statedata. :type version: int :param version: [in] the version of the StateSetup :type tree: StateStructure :param tree: [in] :type stateDatas: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :param stateDatas: [in] a list of valid statedatas for this version

getCacheIdx(*args)

Overload 1:

Get the position in cache list where data is stored. :type data: StateData :param data: [in] the data to look for. :rtype: int :return: the id or a negative value if not found.


Overload 2:

Get the position in cache list where state data with id is stored. :type id: int :param id: [in] state data id. :rtype: int :return: the id or a negative value if not found.

getChildListIdx(parent)

gets the index that maps a frame parent into all its daf children. :type parent: rw::core::Ptr< rw::kinematics::Frame const > :param parent: [in] the parent to the children list :rtype: int :return: index into the childlist array in tree state

getDAFIdx(daf)

gets the index that maps a DAF into its position in the TreeState daf list :type daf: rw::core::Ptr< rw::kinematics::Frame const > :param daf: [in] the daf frame :rtype: int :return: index into the TreeState daf list

getDafs()

gets the list of DAFs that are valid in this state setup :rtype: std::vector< rw::kinematics::Frame * > :return: list of DAFs

getFrame(id)

gets the frame with index idx :type id: int :param id: [in] the unique id of the frame :rtype: Frame :return: the frame with id id, else NULL

getMaxCacheIdx()

Get the maximum number of caches possible. :rtype: int :return: number of caches.

getMaxChildListIdx()

gets the number of valid frames in the state setup

getMaxDAFIdx()

gets the nr of valid DAFs in the state setup :rtype: int :return: nr of valid DAFs

getOffset(data)

The position in QState at which the configuration for frame is stored.

getStateData()

gets all valid state data of the state setup. :rtype: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :return: list of valid state datas Notes: elements in the list is invalid if they are NULL

getTree()

gets the state structure that the state setup is part of. :rtype: StateStructure :return: state structure

getVersion()

gets the version of the StateSetup :rtype: int :return: the version of the state setup

size()

The total number of doubles allocated by all valid state data in the StateSetup. :rtype: int :return: the total number of allocated doubles Notes: This number equals the length of the QState array.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateSetupCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

getCacheIdx(*args)

Overload 1:

Get the position in cache list where data is stored. :type data: StateData :param data: [in] the data to look for. :rtype: int :return: the id or a negative value if not found.


Overload 2:

Get the position in cache list where state data with id is stored. :type id: int :param id: [in] state data id. :rtype: int :return: the id or a negative value if not found.

getChildListIdx(parent)

gets the index that maps a frame parent into all its daf children. :type parent: rw::core::Ptr< rw::kinematics::Frame const > :param parent: [in] the parent to the children list :rtype: int :return: index into the childlist array in tree state

getDAFIdx(daf)

gets the index that maps a DAF into its position in the TreeState daf list :type daf: rw::core::Ptr< rw::kinematics::Frame const > :param daf: [in] the daf frame :rtype: int :return: index into the TreeState daf list

getDafs()

gets the list of DAFs that are valid in this state setup :rtype: std::vector< rw::kinematics::Frame * > :return: list of DAFs

getDeref()

Member access operator.

getMaxCacheIdx()

Get the maximum number of caches possible. :rtype: int :return: number of caches.

getMaxChildListIdx()

gets the number of valid frames in the state setup

getMaxDAFIdx()

gets the nr of valid DAFs in the state setup :rtype: int :return: nr of valid DAFs

getOffset(data)

The position in QState at which the configuration for frame is stored.

getStateData()

gets all valid state data of the state setup. :rtype: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :return: list of valid state datas Notes: elements in the list is invalid if they are NULL

getVersion()

gets the version of the StateSetup :rtype: int :return: the version of the state setup

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

size()

The total number of doubles allocated by all valid state data in the StateSetup. :rtype: int :return: the total number of allocated doubles Notes: This number equals the length of the QState array.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateSetupPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

cptr()
deref()

The pointer stored in the object.

getCacheIdx(*args)

Overload 1:

Get the position in cache list where data is stored. :type data: StateData :param data: [in] the data to look for. :rtype: int :return: the id or a negative value if not found.


Overload 2:

Get the position in cache list where state data with id is stored. :type id: int :param id: [in] state data id. :rtype: int :return: the id or a negative value if not found.

getChildListIdx(parent)

gets the index that maps a frame parent into all its daf children. :type parent: rw::core::Ptr< rw::kinematics::Frame const > :param parent: [in] the parent to the children list :rtype: int :return: index into the childlist array in tree state

getDAFIdx(daf)

gets the index that maps a DAF into its position in the TreeState daf list :type daf: rw::core::Ptr< rw::kinematics::Frame const > :param daf: [in] the daf frame :rtype: int :return: index into the TreeState daf list

getDafs()

gets the list of DAFs that are valid in this state setup :rtype: std::vector< rw::kinematics::Frame * > :return: list of DAFs

getDeref()

Member access operator.

getFrame(id)

gets the frame with index idx :type id: int :param id: [in] the unique id of the frame :rtype: Frame :return: the frame with id id, else NULL

getMaxCacheIdx()

Get the maximum number of caches possible. :rtype: int :return: number of caches.

getMaxChildListIdx()

gets the number of valid frames in the state setup

getMaxDAFIdx()

gets the nr of valid DAFs in the state setup :rtype: int :return: nr of valid DAFs

getOffset(data)

The position in QState at which the configuration for frame is stored.

getStateData()

gets all valid state data of the state setup. :rtype: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :return: list of valid state datas Notes: elements in the list is invalid if they are NULL

getTree()

gets the state structure that the state setup is part of. :rtype: StateStructure :return: state structure

getVersion()

gets the version of the StateSetup :rtype: int :return: the version of the state setup

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

size()

The total number of doubles allocated by all valid state data in the StateSetup. :rtype: int :return: the total number of allocated doubles Notes: This number equals the length of the QState array.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateStructure

Bases: object

the StateStructure is responsible for handling a structure of StateData and Frames

__init__()

constructs a frame tree with a default root frame with the name “WORLD”.

addDAF(frame, parent)

adds a DAF to the frame tree and dynamicly associates the frame with a parent frame.

Notes: the parent frame must exist in the frame tree and cannot be NULL.

addData(*args)

Overload 1:

adds a statedata to the frame tree and allocates memory for its states. This method updates the default state.

Notes: Ownership is taken, the data object may not have been added to any StateStructure before.


Overload 2:

adds a statedata to the frame tree and allocates memory for its states. This method updates the default state.

Notes: Ownership is not taken, the data object may not have been added to any StateStructure before.

addFrame(frame, parent=0)

adds a frame to the frame tree and statically associates the frame with the parent frame. This method updates the default state.

If parent frame is null then the frame will be attached to the world frame.

cleanup(ID=-1)

destructs all frames and statedata that is not used any more. :type ID: int, optional :param ID: [in] used to include a specific StateData ID for destruction, defualt -1 to

ignore this option.

findData(name)

Find data from name. :type name: string :param name: [in] the name. :rtype: rw::core::Ptr< rw::kinematics::StateData > :return: the data if found.

findFrame(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 (string) – [in] name of Frame.

Return type

Frame

Returns

The frame with name name or NULL if no such frame.

getDAFs()

All DAFs of the tree.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All DAFs of the tree.

getDefaultState()

get the default state of the frame tree :rtype: State :return: the default tree state

getFrames()

All frames of the tree. Notice that elements in this vector can be NULL

Return type

std::vector< rw::kinematics::Frame * >

Returns

All frames of the tree.

getMaxID()

gets the max ID of any StateData/Frame currently in the tree.

All frame/data IDs (see StateData::getID()) for the data of the tree are lower than this number (and greater than or equal to zero).

getRoot()

get root of state structure :rtype: Frame :return: the root frame of the StateStructure

getStateData()

All state data in the tree. :rtype: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :return: All state data in the tree

has(data)

tests if StateData data exist in this StateStructure

Return type

boolean

Returns

true if the data was found, false otherwise

Notes: the search includes the union of StateData in all StateSetup’s that belong to the StateStructure

remove(data)

removes a StateData object from the tree. The actual deletion of the object will happen when no States depend on the StateData anymore. :type data: rw::core::Ptr< rw::kinematics::StateData > :param data: [in] pointer to object that is to be removed

Notes: if the data object is a frame and it has staticly connected children then the remove operation is illigal.

if the data object is a frame and it has dynamicly attached children then all of these will change parent relation ship such that world will become their parent.

setDefaultState(state)

set the default state of the dynamic frame tree if the given state is an older state then states valid in both new and old version will be copied to the default state.

property thisown

The membership flag

upgradeState(oldState)

upgrades the state to the default state, but without clearing the values of the state. :type oldState: State :param oldState: [in] the state that should be upgraded :rtype: State :return: the upgraded state

class sdurw_kinematics.sdurw_kinematics.StateStructureCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

findData(name)

Find data from name. :type name: string :param name: [in] the name. :rtype: rw::core::Ptr< rw::kinematics::StateData > :return: the data if found.

findFrame(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 (string) – [in] name of Frame.

Return type

Frame

Returns

The frame with name name or NULL if no such frame.

getDAFs()

All DAFs of the tree.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All DAFs of the tree.

getDefaultState()

get the default state of the frame tree :rtype: State :return: the default tree state

getDeref()

Member access operator.

getFrames()

All frames of the tree. Notice that elements in this vector can be NULL

Return type

std::vector< rw::kinematics::Frame * >

Returns

All frames of the tree.

getMaxID()

gets the max ID of any StateData/Frame currently in the tree.

All frame/data IDs (see StateData::getID()) for the data of the tree are lower than this number (and greater than or equal to zero).

getStateData()

All state data in the tree. :rtype: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :return: All state data in the tree

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.StateStructurePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

addDAF(frame, parent)

adds a DAF to the frame tree and dynamicly associates the frame with a parent frame.

Notes: the parent frame must exist in the frame tree and cannot be NULL.

addData(*args)

Overload 1:

adds a statedata to the frame tree and allocates memory for its states. This method updates the default state.

Notes: Ownership is taken, the data object may not have been added to any StateStructure before.


Overload 2:

adds a statedata to the frame tree and allocates memory for its states. This method updates the default state.

Notes: Ownership is not taken, the data object may not have been added to any StateStructure before.

addFrame(frame, parent=0)

adds a frame to the frame tree and statically associates the frame with the parent frame. This method updates the default state.

If parent frame is null then the frame will be attached to the world frame.

cleanup(ID=-1)

destructs all frames and statedata that is not used any more. :type ID: int, optional :param ID: [in] used to include a specific StateData ID for destruction, defualt -1 to

ignore this option.

cptr()
deref()

The pointer stored in the object.

findData(name)

Find data from name. :type name: string :param name: [in] the name. :rtype: rw::core::Ptr< rw::kinematics::StateData > :return: the data if found.

findFrame(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 (string) – [in] name of Frame.

Return type

Frame

Returns

The frame with name name or NULL if no such frame.

getDAFs()

All DAFs of the tree.

Return type

std::vector< rw::kinematics::Frame * >

Returns

All DAFs of the tree.

getDefaultState()

get the default state of the frame tree :rtype: State :return: the default tree state

getDeref()

Member access operator.

getFrames()

All frames of the tree. Notice that elements in this vector can be NULL

Return type

std::vector< rw::kinematics::Frame * >

Returns

All frames of the tree.

getMaxID()

gets the max ID of any StateData/Frame currently in the tree.

All frame/data IDs (see StateData::getID()) for the data of the tree are lower than this number (and greater than or equal to zero).

getRoot()

get root of state structure :rtype: Frame :return: the root frame of the StateStructure

getStateData()

All state data in the tree. :rtype: std::vector< rw::core::Ptr< rw::kinematics::StateData > > :return: All state data in the tree

has(data)

tests if StateData data exist in this StateStructure

Return type

boolean

Returns

true if the data was found, false otherwise

Notes: the search includes the union of StateData in all StateSetup’s that belong to the StateStructure

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

remove(data)

removes a StateData object from the tree. The actual deletion of the object will happen when no States depend on the StateData anymore. :type data: rw::core::Ptr< rw::kinematics::StateData > :param data: [in] pointer to object that is to be removed

Notes: if the data object is a frame and it has staticly connected children then the remove operation is illigal.

if the data object is a frame and it has dynamicly attached children then all of these will change parent relation ship such that world will become their parent.

setDefaultState(state)

set the default state of the dynamic frame tree if the given state is an older state then states valid in both new and old version will be copied to the default state.

property thisown

The membership flag

upgradeState(oldState)

upgrades the state to the default state, but without clearing the values of the state. :type oldState: State :param oldState: [in] the state that should be upgraded :rtype: State :return: the upgraded state

sdurw_kinematics.sdurw_kinematics.State_getDefault(data)

Get default. :type data: StateData :param data: [in] the state data. :rtype: State :return: default state.

class sdurw_kinematics.sdurw_kinematics.Stateless(*args, **kwargs)

Bases: object

interface for a stateless or typically a part stateless class.

__init__(*args, **kwargs)
getStateStructure()

Get the state structure. :rtype: Ptr :return: the state structure.

isRegistered()

Check if object has registered its state. :rtype: boolean :return: true if registered, false otherwise.

registerIn(*args)

Overload 1:

initialize this stateless data to a specific state :type state: State :param state: [in] the state in which to register the data.

Notes: the data will be registered in the state structure of the state and any copies or other instances of the state will therefore also contain the added states.


Overload 2:

register this stateless object in a statestructure.

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

class sdurw_kinematics.sdurw_kinematics.TreeState(*args)

Bases: object

The tree structure state of a work cell.

The tree structure state gives access to the parent and child frames of a frame.

Currently modification of the tree structure is not supported. (This implementation simply forwards to the non-public Tree data structure.)

Tree structure states can be copied and assigned freely.

__init__(*args)

Overload 1:

Construct an empty TreeState


Overload 2:

Construct an empty TreeState


Overload 3:

Copy constructor. :type other: TreeState :param other: [in] other TreeState to copy.

attachFrame(frame, parent)

Move a frame within the tree.

The frame frame is detached from its parent and reattached to parent. The frames frame and parent must both belong to the same tree.

We may want to later restrict this method so that only frames of certain types can be moved.

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame to move.

  • parent (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame to attach frame to.

getChildren(frame)

The child frames of frame.

(We should query the modifiable part of the tree here, but that is not implemented yet.)

Note that we break const-correctness. We treat TreeState as an implementation detail upon which an iterator interface in Frame is then built.

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The frame for which to retrieve the children.

Return type

rw::kinematics::TreeState::FrameList

Returns

The children of the frame if any children exist, else NULL.

getParent(*args)

Overload 1:

The parent frame of frame.

If the frame has no parent, then NULL is returned.

(We should query the modifiable part of the tree here, but that is not implemented yet.)

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The frame for which to retrieve the parent.

Return type

Frame

Returns

The parent of the frame or NULL if the frame has no parent.


Overload 2:

getStateSetup()

gets the StateSetup used to create the TreeState :rtype: rw::core::Ptr< rw::kinematics::StateSetup > :return: the StateSetup

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.TreeStateCPtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

getChildren(frame)

The child frames of frame.

(We should query the modifiable part of the tree here, but that is not implemented yet.)

Note that we break const-correctness. We treat TreeState as an implementation detail upon which an iterator interface in Frame is then built.

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The frame for which to retrieve the children.

Return type

rw::kinematics::TreeState::FrameList

Returns

The children of the frame if any children exist, else NULL.

getDeref()

Member access operator.

getParent(*args)

Overload 1:

The parent frame of frame.

If the frame has no parent, then NULL is returned.

(We should query the modifiable part of the tree here, but that is not implemented yet.)

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The frame for which to retrieve the parent.

Return type

Frame

Returns

The parent of the frame or NULL if the frame has no parent.


Overload 2:

getStateSetup()

gets the StateSetup used to create the TreeState :rtype: rw::core::Ptr< rw::kinematics::StateSetup > :return: the StateSetup

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.TreeStatePtr(*args)

Bases: object

Ptr stores a pointer and optionally takes ownership of the value.

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

attachFrame(frame, parent)

Move a frame within the tree.

The frame frame is detached from its parent and reattached to parent. The frames frame and parent must both belong to the same tree.

We may want to later restrict this method so that only frames of certain types can be moved.

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame to move.

  • parent (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame to attach frame to.

cptr()
deref()

The pointer stored in the object.

getChildren(frame)

The child frames of frame.

(We should query the modifiable part of the tree here, but that is not implemented yet.)

Note that we break const-correctness. We treat TreeState as an implementation detail upon which an iterator interface in Frame is then built.

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The frame for which to retrieve the children.

Return type

rw::kinematics::TreeState::FrameList

Returns

The children of the frame if any children exist, else NULL.

getDeref()

Member access operator.

getParent(*args)

Overload 1:

The parent frame of frame.

If the frame has no parent, then NULL is returned.

(We should query the modifiable part of the tree here, but that is not implemented yet.)

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] The frame for which to retrieve the parent.

Return type

Frame

Returns

The parent of the frame or NULL if the frame has no parent.


Overload 2:

getStateSetup()

gets the StateSetup used to create the TreeState :rtype: rw::core::Ptr< rw::kinematics::StateSetup > :return: the StateSetup

isNull()

checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null

isShared()

check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.

property thisown

The membership flag

class sdurw_kinematics.sdurw_kinematics.VectorFixedFrame(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.VectorFramePtr(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.VectorState(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.VectorStateDataPtr(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
class sdurw_kinematics.sdurw_kinematics.VectorVectorFrame(arg1=None, arg2=None)

Bases: list

This class is deprecated and is basically a wrapper around a list

__init__(arg1=None, arg2=None)
at(i)
back()
clear()

Remove all items from list.

empty()
front()
pop_back()
push_back(elem)
size()
sdurw_kinematics.sdurw_kinematics.movableFrameClass

alias of MovableFrame

sdurw_kinematics.sdurw_kinematics.ownedPtr(*args)

Overload 1:

A Ptr that takes ownership over a raw pointer ptr.


Overload 2:

A Ptr that takes ownership over a raw pointer ptr.


Overload 3:

A Ptr that takes ownership over a raw pointer ptr.


Overload 4:

A Ptr that takes ownership over a raw pointer ptr.


Overload 5:

A Ptr that takes ownership over a raw pointer ptr.


Overload 6:

A Ptr that takes ownership over a raw pointer ptr.


Overload 7:

A Ptr that takes ownership over a raw pointer ptr.


Overload 8:

A Ptr that takes ownership over a raw pointer ptr.


Overload 9:

A Ptr that takes ownership over a raw pointer ptr.


Overload 10:

A Ptr that takes ownership over a raw pointer ptr.


Overload 11:

A Ptr that takes ownership over a raw pointer ptr.


Overload 12:

A Ptr that takes ownership over a raw pointer ptr.


Overload 13:

A Ptr that takes ownership over a raw pointer ptr.


Overload 14:

A Ptr that takes ownership over a raw pointer ptr.


Overload 15:

A Ptr that takes ownership over a raw pointer ptr.


Overload 16:

A Ptr that takes ownership over a raw pointer ptr.


Overload 17:

A Ptr that takes ownership over a raw pointer ptr.


Overload 18:

A Ptr that takes ownership over a raw pointer ptr.


Overload 19:

A Ptr that takes ownership over a raw pointer ptr.


Overload 20:

A Ptr that takes ownership over a raw pointer ptr.


Overload 21:

A Ptr that takes ownership over a raw pointer ptr.


Overload 22:

A Ptr that takes ownership over a raw pointer ptr.


Overload 23:

A Ptr that takes ownership over a raw pointer ptr.


Overload 24:

A Ptr that takes ownership over a raw pointer ptr.


Overload 25:

A Ptr that takes ownership over a raw pointer ptr.


Overload 26:

A Ptr that takes ownership over a raw pointer ptr.


Overload 27:

A Ptr that takes ownership over a raw pointer ptr.


Overload 28:

A Ptr that takes ownership over a raw pointer ptr.


Overload 29:

A Ptr that takes ownership over a raw pointer ptr.