sdurw_models module

class sdurw_models.sdurw_models.CompositeDevice(*args)

Bases: JointDevice

A device constructed from a sequence of devices.

The configuration of a composite device is equal to the concatenation of the configurations of the sequence of devices.

The devices that make up the CompositeDevice may not share joints, but the implementation does not check if this is actually the case.

A composite device implements its operations of Device by querying each Joint in the straight-forward way of JointDevice. The notable exception is Device::setQ() which is implemented by forwarding the Device::setQ() calls to the sequence of devices. This means that CompositeDevice works also for example for devices of type ParallelDevice that have an overwritten implementation of Device::setQ().

The devices from which the composite device is constructed must all be of type JointDevice. An exception is thrown by the constructor if one of the devices is not of this subtype.

The computation of Jacobians of CompositeDevice is not correct in general, but is correct only for devices for which the standard technique of JointDevice is correct. We cannot in general in RobWork do any better currently. The implementation does not check if the requirements for the computation of Jacobians are indeed satisfied.

CompositeDevice is related to TreeDevice in the sense that CompositeDevice has also multiple end-effectors (one end-effector for each device). CompositeDevice differs from TreeDevice by not requiring that the child-to-parent paths of the end-effectors connect to a common base.

__init__(*args)

Overload 1:

Constructor

Parameters
  • base (rw::core::Ptr< rw::kinematics::Frame >) – [in] the base of the device

  • devices (std::vector< rw::core::Ptr< rw::models::Device > >) – [in] the sequence of subdevices

  • end (rw::core::Ptr< rw::kinematics::Frame >) – [in] the end (or tool) of the device

  • name (string) – [in] the name of the device

  • state (State) – [in] the kinematic structure assumed for Jacobian computations


Overload 2:

Constructor

Parameters
  • base (rw::core::Ptr< rw::kinematics::Frame >) – [in] the base of the device

  • devices (std::vector< rw::core::Ptr< rw::models::Device > >) – [in] the sequence of subdevices

  • ends (std::vector< rw::kinematics::Frame * >) – [in] the end frames (or tools) of the device

  • name (string) – [in] the name of the device

  • state (State) – [in] the kinematic structure assumed for Jacobian computations

baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end-effectors (see getEnds()).

getEnds()

The end-effectors of the composite device.

The end-effectors of the composite device are the end-effectors of the devices from which the composite device was constructed.

This sequence of end-effectors may or may not include the default end-effector returned by getEnd().

setQ(q, state)

The method is implemented via forwarding to the Device::setQ() methods of the subdevices.

property thisown

The membership flag

class sdurw_models.sdurw_models.CompositeDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end-effectors (see getEnds()).

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the composite device.

The end-effectors of the composite device are the end-effectors of the devices from which the composite device was constructed.

This sequence of end-effectors may or may not include the default end-effector returned by getEnd().

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setQ(q, state)

The method is implemented via forwarding to the Device::setQ() methods of the subdevices.

property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.CompositeDevicePtr(*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.

asDeviceCPtr()
asDevicePtr()
asJointDeviceCPtr()
asJointDevicePtr()
baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end-effectors (see getEnds()).

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the composite device.

The end-effectors of the composite device are the end-effectors of the devices from which the composite device was constructed.

This sequence of end-effectors may or may not include the default end-effector returned by getEnd().

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)

The method is implemented via forwarding to the Device::setQ() methods of the subdevices.

setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.CompositeJointDevice(*args)

Bases: JointDevice

A device constructed from a sequence of devices.

The configuration of a composite device is equal to the concatenation of the configurations of the sequence of devices.

The devices that make up the CompositeJointDevice may not share joints, but the implementation does not check if this is actually the case.

A composite device implements its operations of Device by querying each Joint in the straight-forward way of JointDevice. The notable exception is Device::setQ() which is implemented by forwarding the Device::setQ() calls to the sequence of devices. This means that CompositeJointDevice works also for example for devices of type ParallelDevice that have an overwritten implementation of Device::setQ().

The devices from which the composite device is constructed must all be of type JointDevice. An exception is thrown by the constructor if one of the devices is not of this subtype.

The computation of Jacobians of CompositeJointDevice is not correct in general, but is correct only for devices for which the standard technique of JointDevice is correct. We cannot in general in RobWork do any better currently. The implementation does not check if the requirements for the computation of Jacobians are indeed satisfied.

CompositeJointDevice is related to TreeDevice in the sense that CompositeJointDevice has also multiple end-effectors (one end-effector for each device). CompositeJointDevice differs from TreeDevice by not requiring that the child-to-parent paths of the end-effectors connect to a common base.

__init__(*args)

Overload 1:

Constructor

Parameters
  • base (rw::core::Ptr< rw::kinematics::Frame >) – [in] the base of the device

  • devices (std::vector< rw::core::Ptr< rw::models::Device > >) – [in] the sequence of subdevices

  • end (rw::core::Ptr< rw::kinematics::Frame >) – [in] the end (or tool) of the device

  • name (string) – [in] the name of the device

  • state (State) – [in] the kinematic structure assumed for Jacobian computations


Overload 2:

Constructor

Parameters
  • base (rw::core::Ptr< rw::kinematics::Frame >) – [in] the base of the device

  • devices (std::vector< rw::core::Ptr< rw::models::Device > >) – [in] the sequence of subdevices

  • ends (std::vector< rw::kinematics::Frame * >) – [in] the end frames (or tools) of the device

  • name (string) – [in] the name of the device

  • state (State) – [in] the kinematic structure assumed for Jacobian computations

baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end-effectors (see getEnds()).

getEnds()

The end-effectors of the composite device.

The end-effectors of the composite device are the end-effectors of the devices from which the composite device was constructed.

This sequence of end-effectors may or may not include the default end-effector returned by getEnd().

setQ(q, state)

The method is implemented via forwarding to the Device::setQ() methods of the subdevices.

property thisown

The membership flag

class sdurw_models.sdurw_models.CompositeJointDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end-effectors (see getEnds()).

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the composite device.

The end-effectors of the composite device are the end-effectors of the devices from which the composite device was constructed.

This sequence of end-effectors may or may not include the default end-effector returned by getEnd().

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setQ(q, state)

The method is implemented via forwarding to the Device::setQ() methods of the subdevices.

property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.CompositeJointDevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end-effectors (see getEnds()).

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the composite device.

The end-effectors of the composite device are the end-effectors of the devices from which the composite device was constructed.

This sequence of end-effectors may or may not include the default end-effector returned by getEnd().

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)

The method is implemented via forwarding to the Device::setQ() methods of the subdevices.

setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.ControllerModel(*args)

Bases: Stateless

Interface to allow modelling of different types of controllers. A controller is an instance that takes an input manipulates it to an output that in effect controls something. As such controllers vary greatly and have only little in common.

__init__(*args)

Overload 1:

constructor :type name: string :param name: [in] the name of this controllermodel :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame to which this controller is attached/associated.


Overload 2:

constructor :type name: string :param name: [in] the name of this controllermodel :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame to which this controller is attached/associated. :type description: string :param description: [in] description of the controller

attachTo(frame)

Sets the frame to which the controllermodel should be attached

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame >) – The frame, which can be NULL

getDescription()

returns a description of this controllermodel :rtype: string :return: reference to this controllermodels description

getFrame()

The frame to which the controllermodel is attached.

The frame can be NULL.

getName()

returns the name of this controllermodel :rtype: string :return: name of controllermodel

getPropertyMap(*args)

Overload 1:

gets the propertymap of this controllermodel


Overload 2:

gets the propertymap of this controllermodel

setDescription(description)

sets the description of this controllermodel :type description: string :param description: [in] description of this controllermodel

setName(name)

sets the name of this controllermodel :type name: string :param name: [in] name of this controllermodel

property thisown

The membership flag

class sdurw_models.sdurw_models.ControllerModelCPtr(*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.

getDescription()

returns a description of this controllermodel :rtype: string :return: reference to this controllermodels description

getFrame()

The frame to which the controllermodel is attached.

The frame can be NULL.

getName()

returns the name of this controllermodel :rtype: string :return: name of controllermodel

getPropertyMap(*args)

Overload 1:

gets the propertymap of this controllermodel


Overload 2:

gets the propertymap of this controllermodel

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_models.sdurw_models.ControllerModelPtr(*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(frame)

Sets the frame to which the controllermodel should be attached

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame >) – The frame, which can be NULL

cptr()
deref()

The pointer stored in the object.

getDeref()

Member access operator.

getDescription()

returns a description of this controllermodel :rtype: string :return: reference to this controllermodels description

getFrame()

The frame to which the controllermodel is attached.

The frame can be NULL.

getName()

returns the name of this controllermodel :rtype: string :return: name of controllermodel

getPropertyMap(*args)

Overload 1:

gets the propertymap of this controllermodel


Overload 2:

gets the propertymap of this controllermodel

getStateStructure()

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

isNull()

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

isRegistered()

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

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.

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.

setDescription(description)

sets the description of this controllermodel :type description: string :param description: [in] description of this controllermodel

setName(name)

sets the name of this controllermodel :type name: string :param name: [in] name of this controllermodel

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

class sdurw_models.sdurw_models.ControllerModelPtrVector(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_models.sdurw_models.DHParameterSet(*args)

Bases: object

Simple class to help represent a set of Denavit-Hartenberg parameters

__init__(*args)

Overload 1:

Constructor for DHParameters initialized to zero.


Overload 2:

Constructor :type alpha: float :param alpha: [in] \(\alpha_{i-1}\) :type a: float :param a: [in] \(a_{i-1}\) :type d: float :param d: [in] \(d_{i}\) :type theta: float :param theta: [in] \(\theta_{i-1}\)


Overload 3:

Constructor :type alpha: float :param alpha: [in] \(\alpha_{i-1}\) :type a: float :param a: [in] \(a_{i-1}\) :type d: float :param d: [in] \(d_{i}\) :type theta: float :param theta: [in] \(\theta_{i-1}\) :type type: string :param type: documentation missing !


Overload 4:

Constructor :type alpha: float :param alpha: [in] \(\alpha_{i-1}\) :type a: float :param a: [in] \(a_{i-1}\) :type beta: float :param beta: [in] documentation missing ! :type b: float :param b: [in] documentation missing ! :type parallel: boolean :param parallel: [in] documentation missing !

a()

\(a_{i-1}\) *

alpha()

\(\alpha_{i-1}\) *

b()
beta()
d()

\(d_{i}\) *

static get(*args)
static getDHParameters(device)

Returns the DH-Parameters for a SerialDevice.

If no or only a partial DH representation exists only the list will be empty or non-complete.

Parameters

device (rw::core::Ptr< rw::models::SerialDevice >) – [in] SerialDevice for which to get the DH parameters

Return type

std::vector< rw::models::DHParameterSet >

Returns

The set of DH parameters

getType()

the DH-convention type

isParallel()
static set(*args)
theta()

$brief \(\theta_{i}\) *

property thisown

The membership flag

class sdurw_models.sdurw_models.DHParameterSetCPtr(*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.

a()

\(a_{i-1}\) *

alpha()

\(\alpha_{i-1}\) *

b()
beta()
d()

\(d_{i}\) *

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getType()

the DH-convention type

isNull()

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

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

theta()

$brief \(\theta_{i}\) *

property thisown

The membership flag

class sdurw_models.sdurw_models.DHParameterSetPtr(*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.

a()

\(a_{i-1}\) *

alpha()

\(\alpha_{i-1}\) *

b()
beta()
cptr()
d()

\(d_{i}\) *

deref()

The pointer stored in the object.

get(*args)
getDHParameters(device)

Returns the DH-Parameters for a SerialDevice.

If no or only a partial DH representation exists only the list will be empty or non-complete.

Parameters

device (rw::core::Ptr< rw::models::SerialDevice >) – [in] SerialDevice for which to get the DH parameters

Return type

std::vector< rw::models::DHParameterSet >

Returns

The set of DH parameters

getDeref()

Member access operator.

getType()

the DH-convention type

isNull()

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

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

set(*args)
theta()

$brief \(\theta_{i}\) *

property thisown

The membership flag

class sdurw_models.sdurw_models.DHParameterSetVector(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_models.sdurw_models.DHParameterSet_get(*args)
sdurw_models.sdurw_models.DHParameterSet_getDHParameters(device)

Returns the DH-Parameters for a SerialDevice.

If no or only a partial DH representation exists only the list will be empty or non-complete.

Parameters

device (rw::core::Ptr< rw::models::SerialDevice >) – [in] SerialDevice for which to get the DH parameters

Return type

std::vector< rw::models::DHParameterSet >

Returns

The set of DH parameters

sdurw_models.sdurw_models.DHParameterSet_set(*args)
class sdurw_models.sdurw_models.DeformableObject(*args)

Bases: Object

The deformable object is an object that contain a deformable mesh. Deformations are part of the state object and they are modeled/controlled through control nodes. each control node correspond to a vertice in the mesh. All vertices are described relative to the base frame of the object.

__init__(*args)

Overload 1:

constructor - constructs a deformable mesh with a specific number of control nodes and without any faces. Both geometry and model are created based on nodes. :type baseframe: rw::core::Ptr< rw::kinematics::Frame > :param baseframe: [in] base frame of object :type nr_of_nodes: int :param nr_of_nodes: [in] the number of controlling nodes in the deformable object


Overload 2:

constructor - control nodes are taken as vertices in the Model3D. Vertices that are equal are merged into the same control node. All faces of the model are used to define faces of the deformable object.

geometry will be created based on model information

Notes: only triangle faces are currently supported.

Parameters
  • baseframe (rw::core::Ptr< rw::kinematics::Frame >) – [in] base frame of object

  • model (rw::core::Ptr< rw::geometry::Model3D >) – [in]


Overload 3:

constructor - control nodes are taken from a triangle mesh generated from triangulating the geometry. Vertices that are equal are merged into the same control node. All faces of the geometry are used to define faces of the deformable object.

model will be created based on geometry information

Parameters
  • baseframe (rw::core::Ptr< rw::kinematics::Frame >) – [in] base frame of object

  • geom (rw::core::Ptr< rw::geometry::Geometry >) – [in] geometry to define the faces and nodes

addFace(node1, node2, node3)

add a face to three existing nodes :type node1: int :param node1: [in] idx of node 1 :type node2: int :param node2: [in] idx of node 2 :type node3: int :param node3: [in] idx of node 3

getCOM(state)

get center of mass of this object :type state: State :param state: [in] the state in which to get center of mass :rtype: rw::math::Vector3D< double > :return: Position of COM

getFaces()

get all faces of this soft body :rtype: std::vector< rw::geometry::IndexedTriangle< uint16_t > > :return: list of indexed triangles - indeces point to vertices/nodes

getInertia(state)

returns the inertia matrix of this body calculated around COM with the orientation of the base frame. :type state: State :param state: [in] the state to get the inertia in :rtype: rw::math::InertiaMatrix< double > :return: matrix with inertia

getMass(state)

get mass in Kg of this object :type state: State :param state: [in] the state :rtype: float :return: mass in kilo grams

getMesh(cstate)

return a triangle mesh representing the softbody in the current state cstate :type cstate: State :param cstate:

getNode(id, state)

get a specific node from the state :type id: int :param id: [in] id of the node to fetch :type state: State :param state: [in] current state :rtype: rw::math::Vector3D< float > :return: handle to manipulate a node in the given state.

getNrNodes(*args)

Overload 1:

get the number of controlling nodes of this deformable object. :type state: State :param state: [in] :rtype: int :return: Number of Nodes


Overload 2:

get the number of controlling nodes of this deformable object. :rtype: int :return: Number of Nodes

setNode(id, v, state)

set the value of a specific node in the state. :type id: int :param id: [in] id of the node :type v: rw::math::Vector3D< float > :param v: [in] value to set. :type state: State :param state: [in] state in which to set the value.

property thisown

The membership flag

update(model, state)

updates the model with the current state of the deformable model :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in/out] model to be updated :type state: State :param state:

class sdurw_models.sdurw_models.DeformableObjectCPtr(*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.

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(state)

get center of mass of this object :type state: State :param state: [in] the state in which to get center of mass :rtype: rw::math::Vector3D< double > :return: Position of COM

getDeref()

Member access operator.

getFaces()

get all faces of this soft body :rtype: std::vector< rw::geometry::IndexedTriangle< uint16_t > > :return: list of indexed triangles - indeces point to vertices/nodes

getGeometry(*args)

Overload 1:

get default geometries :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection.

getInertia(state)

returns the inertia matrix of this body calculated around COM with the orientation of the base frame. :type state: State :param state: [in] the state to get the inertia in :rtype: rw::math::InertiaMatrix< double > :return: matrix with inertia

getMass(state)

get mass in Kg of this object :type state: State :param state: [in] the state :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

get the default models :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for visualization

getNode(id, state)

get a specific node from the state :type id: int :param id: [in] id of the node to fetch :type state: State :param state: [in] current state :rtype: rw::math::Vector3D< float > :return: handle to manipulate a node in the given state.

getNrNodes(*args)

Overload 1:

get the number of controlling nodes of this deformable object. :type state: State :param state: [in] :rtype: int :return: Number of Nodes


Overload 2:

get the number of controlling nodes of this deformable object. :rtype: int :return: Number of Nodes

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_models.sdurw_models.DeformableObjectPtr(*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.

addFace(node1, node2, node3)

add a face to three existing nodes :type node1: int :param node1: [in] idx of node 1 :type node2: int :param node2: [in] idx of node 2 :type node3: int :param node3: [in] idx of node 3

addFrame(frame)

associate a frame to this Object. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame to associate to object

cptr()
deref()

The pointer stored in the object.

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(state)

get center of mass of this object :type state: State :param state: [in] the state in which to get center of mass :rtype: rw::math::Vector3D< double > :return: Position of COM

getDeref()

Member access operator.

getFaces()

get all faces of this soft body :rtype: std::vector< rw::geometry::IndexedTriangle< uint16_t > > :return: list of indexed triangles - indeces point to vertices/nodes

getFrames()

get all associated frames of this object :rtype: std::vector< rw::kinematics::Frame * > :return: a vector of frames

getGeometry(*args)

Overload 1:

get default geometries :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection.

getInertia(state)

returns the inertia matrix of this body calculated around COM with the orientation of the base frame. :type state: State :param state: [in] the state to get the inertia in :rtype: rw::math::InertiaMatrix< double > :return: matrix with inertia

getMass(state)

get mass in Kg of this object :type state: State :param state: [in] the state :rtype: float :return: mass in kilo grams

getMesh(cstate)

return a triangle mesh representing the softbody in the current state cstate :type cstate: State :param cstate:

getModels(*args)

Overload 1:

get the default models :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for visualization

getName()

get name of this object. Name is always the same as the name of the base frame. :rtype: string :return: name of object.

getNode(id, state)

get a specific node from the state :type id: int :param id: [in] id of the node to fetch :type state: State :param state: [in] current state :rtype: rw::math::Vector3D< float > :return: handle to manipulate a node in the given state.

getNrNodes(*args)

Overload 1:

get the number of controlling nodes of this deformable object. :type state: State :param state: [in] :rtype: int :return: Number of Nodes


Overload 2:

get the number of controlling nodes of this deformable object. :rtype: int :return: Number of Nodes

getStateStructure()

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

isNull()

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

isRegistered()

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

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.

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.

setNode(id, v, state)

set the value of a specific node in the state. :type id: int :param id: [in] id of the node :type v: rw::math::Vector3D< float > :param v: [in] value to set. :type state: State :param state: [in] state in which to set the value.

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

update(model, state)

updates the model with the current state of the deformable model :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in/out] model to be updated :type state: State :param state:

class sdurw_models.sdurw_models.DeformableObjectPtrVector(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_models.sdurw_models.DependentJoint(*args, **kwargs)

Bases: Joint

Dependent joints are 0-dof joints for which the actual joints transformation depends on one of more other joints.

DependentJoint is an abstract class from which all dependent joints should inherit.

__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.

isControlledBy(joint)

Returns true if the DependentJoint is controlled by joint.

A DependentJoint may depend on more than one joints.

Parameters

joint (Joint) – [in] Joints to test with

Return type

boolean

Returns

True if this is controlled by joint

property thisown

The membership flag

class sdurw_models.sdurw_models.DependentJointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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 from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

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.

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

isControlledBy(joint)

Returns true if the DependentJoint is controlled by joint.

A DependentJoint may depend on more than one joints.

Parameters

joint (Joint) – [in] Joints to test with

Return type

boolean

Returns

True if this is controlled by joint

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_models.sdurw_models.DependentJointPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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 from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

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.

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

isControlledBy(joint)

Returns true if the DependentJoint is controlled by joint.

A DependentJoint may depend on more than one joints.

Parameters

joint (Joint) – [in] Joints to test with

Return type

boolean

Returns

True if this is controlled by joint

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.

removeJointMapping()

removes mapping of joint values

setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.DependentPrismaticJoint(name, transform, owner, scale, offset)

Bases: DependentJoint

Dependent prismatic joint.

DependentPrismaticJoint implements a prismatic joint for which the displacement along the z-axis are linearly dependent on another joint

__init__(name, transform, owner, scale, offset)

A revolute joint with a displacement transform of transform.

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

  • transform (rw::math::Transform3D< double >) – [in] The displacement transform of the joint.

  • owner (Joint) – [in] The joint controlling the dependent joint.

  • scale (float) – [in] Scaling factor for the controlling joint value.

  • offset (float) – [in] Offset for the controlling joint value.

getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getOffset()

get offset of this joint value in relation to controlling joint

getOwner(*args)

Overload 1:

The joint controlling the passive revolute frame.


Overload 2:

The joint controlling the passive revolute frame.

getScale()

The scaling factor for the joint value of the controlling joint.

getTransform(state)

The parent to frame transform for a revolute joint.

The parent to frame transform is T * Tz(q) where:

  • T is the displacement transform of the joint;

  • q = q_owner * scale + offset is the joint value of the joint;

  • Tz(q) is the transform that translates a point an distance q in the

direction of the z-axis.

isControlledBy(joint)

Returns true if the DependentJoint is controlled by joint.

A DependentJoint may depend on more than one joints.

Parameters

joint (Joint) – [in] Joints to test with

Return type

boolean

Returns

True if this is controlled by joint

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.DependentPrismaticJointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getOffset()

get offset of this joint value in relation to controlling joint

getScale()

The scaling factor for the joint value of the controlling joint.

getTransform(state)

The parent to frame transform for a revolute joint.

The parent to frame transform is T * Tz(q) where:

  • T is the displacement transform of the joint;

  • q = q_owner * scale + offset is the joint value of the joint;

  • Tz(q) is the transform that translates a point an distance q in the

direction of the z-axis.

hasCache()

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

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

isControlledBy(joint)
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_models.sdurw_models.DependentPrismaticJointPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getOffset()

get offset of this joint value in relation to controlling joint

getOwner(*args)

Overload 1:

The joint controlling the passive revolute frame.


Overload 2:

The joint controlling the passive revolute frame.

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

The scaling factor for the joint value of the controlling joint.

getStateStructure()

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

getTransform(state)

The parent to frame transform for a revolute joint.

The parent to frame transform is T * Tz(q) where:

  • T is the displacement transform of the joint;

  • q = q_owner * scale + offset is the joint value of the joint;

  • Tz(q) is the transform that translates a point an distance q in the

direction of the z-axis.

hasCache()

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

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

isControlledBy(joint)
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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.DependentRevoluteJoint(name, transform, owner, scale, offset)

Bases: DependentJoint

Dependent revolute joints.

DependentRevoluteJoint implements a revolute joint for which the rotation about the z-axis are linearly dependent on another joint.

The parent to frame transform is T * Rz(q) where:

  • T is the displacement transform of the joint;

  • q = q_owner * scale + offset is the joint value of the joint;

  • Rz(q) is the transform that rotates a point an angle q about the

z-axis.

__init__(name, transform, owner, scale, offset)

A revolute joint with a displacement transform of transform.

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

  • transform (rw::math::Transform3D< double >) – [in] The displacement transform of the joint.

  • owner (Joint) – [in] The joint controlling the passive joint.

  • scale (float) – [in] Scaling factor for the controlling joint value.

  • offset (float) – [in] Offset for the controlling joint value.

calcQ(state)

calculate the current q of this joint :type state: State :param state: :rtype: float :return:

getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getOffset()

get offset of this joint value in relation to controlling joint

getOwner(*args)

Overload 1:

The joint controlling the passive revolute frame.


Overload 2:

The joint controlling the passive revolute frame.

getScale()

The scaling factor for the joint value of the controlling joint.

isControlledBy(joint)

Returns true if the DependentJoint is controlled by joint.

A DependentJoint may depend on more than one joints.

Parameters

joint (Joint) – [in] Joints to test with

Return type

boolean

Returns

True if this is controlled by joint

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.DependentRevoluteJointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getOffset()

get offset of this joint value in relation to controlling joint

getScale()

The scaling factor for the joint value of the controlling joint.

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

isControlledBy(joint)
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_models.sdurw_models.DependentRevoluteJointPtr(*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.

calcQ(state)

calculate the current q of this joint :type state: State :param state: :rtype: float :return:

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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getOffset()

get offset of this joint value in relation to controlling joint

getOwner(*args)

Overload 1:

The joint controlling the passive revolute frame.


Overload 2:

The joint controlling the passive revolute frame.

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

The scaling factor for the joint value of the controlling joint.

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

isControlledBy(joint)
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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.Device(*args, **kwargs)

Bases: Stateless

An abstract device class

The Device class is the basis for all other devices. It is assumed that all devices have a configuration which can be encoded by a rw::math::Q, that all have a base frame representing where in the work cell they are located and a primary end frame. Notice that some devices may have multiple end-frames.

__init__(*args, **kwargs)
baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)

DeviceJacobian for a sequence of frames.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the end-effector velocity seen from base-frame (\(\nu^{ase}_{end}\))

\[\nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

Where:

\[\begin{split}{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & \cdots & {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]\end{split}\]

where \({^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\) is defined by

\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] & \textrm{revolute joint} \end{array}\end{split}\]
\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] & \textrm{prismatic joint} \\ \end{array}\end{split}\]

By default the method forwards to baseJframe().

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

getAccelerationLimits()

Returns the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal acceleration

getBase(*args)

Overload 1:

a method to return the frame of the base of the device. :rtype: Frame :return: the base frame


Overload 2:

a method to return the frame of the base of the device. :rtype: Frame :return: the base frame

getBounds()

Returns the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Return type

QBox

Returns

std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

getDOF()

Returns number of active joints :rtype: int :return: number of active joints \(n\)

getEnd(*args)

Overload 1:

a method to return the frame of the end of the device :rtype: Frame :return: the end frame


Overload 2:

a method to return the frame of the end of the device

Return type

Frame

Returns

the end frame

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)

Gets configuration vector \(\mathbf{q}\in \mathbb{R}^n\)

Parameters

state (State) – [in] state from which which to get \(\mathbf{q}\)

Return type

Q

Returns

configuration vector \(\mathbf{q}\)

getVelocityLimits()

Returns the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal velocity

setAccelerationLimits(acclimits)

Sets the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Parameters

acclimits (Q) – [in] the maximal acceleration

setBounds(bounds)

Sets the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Parameters

bounds (QBox) – [in] std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)

Sets configuration vector \(\mathbf{q} \in \mathbb{R}^n\)

Parameters
  • q (Q) – [in] configuration vector \(\mathbf{q}\)

  • state (State) – [in] state into which to set \(\mathbf{q}\)

setVelocityLimits(vellimits)

Sets the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Parameters

vellimits (Q) – [in] Q with the maximal velocity

property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.DeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)

DeviceJacobian for a sequence of frames.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the end-effector velocity seen from base-frame (\(\nu^{ase}_{end}\))

\[\nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

Where:

\[\begin{split}{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & \cdots & {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]\end{split}\]

where \({^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\) is defined by

\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] & \textrm{revolute joint} \end{array}\end{split}\]
\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] & \textrm{prismatic joint} \\ \end{array}\end{split}\]

By default the method forwards to baseJframe().

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()

Returns the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal acceleration

getBase(*args)

Overload 1:

a method to return the frame of the base of the device. :rtype: Frame :return: the base frame


Overload 2:

a method to return the frame of the base of the device. :rtype: Frame :return: the base frame

getBounds()

Returns the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Return type

QBox

Returns

std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

getDOF()

Returns number of active joints :rtype: int :return: number of active joints \(n\)

getDeref()

Member access operator.

getEnd(*args)

Overload 1:

a method to return the frame of the end of the device :rtype: Frame :return: the end frame


Overload 2:

a method to return the frame of the end of the device

Return type

Frame

Returns

the end frame

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)

Gets configuration vector \(\mathbf{q}\in \mathbb{R}^n\)

Parameters

state (State) – [in] state from which which to get \(\mathbf{q}\)

Return type

Q

Returns

configuration vector \(\mathbf{q}\)

getVelocityLimits()

Returns the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal velocity

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.

setQ(q, state)

Sets configuration vector \(\mathbf{q} \in \mathbb{R}^n\)

Parameters
  • q (Q) – [in] configuration vector \(\mathbf{q}\)

  • state (State) – [in] state into which to set \(\mathbf{q}\)

property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.DeviceJacobianCalculator(devices, base, tcps, state)

Bases: JacobianCalculator

Calculator for Jacobians of one or several Devices.

Implements Jacobian calculations for one or several Devices.

If more than one end-effector is given a “stacked” Jacobian is returned.

__init__(devices, base, tcps, state)

Constructs JacobianCalculator.

The dimension of the jacobian wil be (tcps.size() * 6, device.getDOF()).

Parameters
  • devices (std::vector< rw::core::Ptr< rw::models::Device > >) – [in] The device to calculate for

  • base (rw::core::Ptr< rw::kinematics::Frame >) – [in] Reference base of the Jacobian. Does not have to be the same as the base of the device

  • tcps (std::vector< rw::kinematics::Frame * >) – [in] List of tool end-effectors for which to calculate the Jacobian.

  • state (State) – [in] State giving how frame are connected

get(state)

rw::kinematics::State&) const

property thisown

The membership flag

class sdurw_models.sdurw_models.DeviceJacobianCalculatorCPtr(*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)

rw::kinematics::State&) const

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_models.sdurw_models.DeviceJacobianCalculatorPtr(*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)

rw::kinematics::State&) const

getDeref()

Member access operator.

getJacobian(state)

Returns the Jacobian associated to state

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

Jacobian for state

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_models.sdurw_models.DevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)

DeviceJacobian for a sequence of frames.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the end-effector velocity seen from base-frame (\(\nu^{ase}_{end}\))

\[\nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

Where:

\[\begin{split}{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & \cdots & {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]\end{split}\]

where \({^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\) is defined by

\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] & \textrm{revolute joint} \end{array}\end{split}\]
\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] & \textrm{prismatic joint} \\ \end{array}\end{split}\]

By default the method forwards to baseJframe().

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()

Returns the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal acceleration

getBase(*args)

Overload 1:

a method to return the frame of the base of the device. :rtype: Frame :return: the base frame


Overload 2:

a method to return the frame of the base of the device. :rtype: Frame :return: the base frame

getBounds()

Returns the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Return type

QBox

Returns

std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

getDOF()

Returns number of active joints :rtype: int :return: number of active joints \(n\)

getDeref()

Member access operator.

getEnd(*args)

Overload 1:

a method to return the frame of the end of the device :rtype: Frame :return: the end frame


Overload 2:

a method to return the frame of the end of the device

Return type

Frame

Returns

the end frame

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)

Gets configuration vector \(\mathbf{q}\in \mathbb{R}^n\)

Parameters

state (State) – [in] state from which which to get \(\mathbf{q}\)

Return type

Q

Returns

configuration vector \(\mathbf{q}\)

getStateStructure()

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

getVelocityLimits()

Returns the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal velocity

isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)

Sets the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Parameters

acclimits (Q) – [in] the maximal acceleration

setBounds(bounds)

Sets the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Parameters

bounds (QBox) – [in] std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)

Sets configuration vector \(\mathbf{q} \in \mathbb{R}^n\)

Parameters
  • q (Q) – [in] configuration vector \(\mathbf{q}\)

  • state (State) – [in] state into which to set \(\mathbf{q}\)

setVelocityLimits(vellimits)

Sets the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Parameters

vellimits (Q) – [in] Q with the maximal velocity

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.DevicePtrVector(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_models.sdurw_models.JacobianCalculator(*args, **kwargs)

Bases: object

JacobianCalculator provides an interface for obtaining a Jacobian

__init__(*args, **kwargs)
get(state)

Returns the Jacobian associated to state :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: Jacobian for state

getJacobian(state)

Returns the Jacobian associated to state

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

Jacobian for state

property thisown

The membership flag

class sdurw_models.sdurw_models.JacobianCalculatorCPtr(*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)

Returns the Jacobian associated to state :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: Jacobian for state

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_models.sdurw_models.JacobianCalculatorPtr(*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)

Returns the Jacobian associated to state :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: Jacobian for state

getDeref()

Member access operator.

getJacobian(state)

Returns the Jacobian associated to state

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

Jacobian for state

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_models.sdurw_models.JacobianUtil

Bases: object

Primitive utilities for computing jacobians for joints of various types.

__init__()
static addPassiveRevoluteJacobianCol(jacobian, row, col, passive, tcp, scale)

Add to column col of jacobian the Jacobian for a passive revolute joint at position passive that controls the tool at position tcp. The joint scaling factor of the passive joint is

scale.

The Jacobian is given relative to the common world frame of joint and tcp.

static addPrismaticJacobianCol(jacobian, row, col, joint, tcp)

Add to column col of jacobian the Jacobian of a prismatic joint with transform joint for a tool position of

tcp.

The Jacobian is given relative to the common world frame of joint and tcp.

static addRevoluteJacobianCol(jacobian, row, col, joint, tcp)

Add to column col of jacobian the Jacobian of a revolute joint with transform joint for a tool position of tcp.

The Jacobian is given relative to the common world frame of joint and tcp.

static isInSubTree(parent, child, state)

True iff child is in the subtree of parent for a tree structure of state.

isInSubTree(frame, frame, state) is true always.

This utility function is used for checking if a given joint does affect some tcp frame or if the Jacobian column for that joint should be considered zero.

isInSubTree() runs in time proportional to the size of the subtree.

property thisown

The membership flag

class sdurw_models.sdurw_models.JacobianUtilCPtr(*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_models.sdurw_models.JacobianUtilPtr(*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.

addPassiveRevoluteJacobianCol(jacobian, row, col, passive, tcp, scale)

Add to column col of jacobian the Jacobian for a passive revolute joint at position passive that controls the tool at position tcp. The joint scaling factor of the passive joint is

scale.

The Jacobian is given relative to the common world frame of joint and tcp.

addPrismaticJacobianCol(jacobian, row, col, joint, tcp)

Add to column col of jacobian the Jacobian of a prismatic joint with transform joint for a tool position of

tcp.

The Jacobian is given relative to the common world frame of joint and tcp.

addRevoluteJacobianCol(jacobian, row, col, joint, tcp)

Add to column col of jacobian the Jacobian of a revolute joint with transform joint for a tool position of tcp.

The Jacobian is given relative to the common world frame of joint and tcp.

cptr()
deref()

The pointer stored in the object.

getDeref()

Member access operator.

isInSubTree(parent, child, state)

True iff child is in the subtree of parent for a tree structure of state.

isInSubTree(frame, frame, state) is true always.

This utility function is used for checking if a given joint does affect some tcp frame or if the Jacobian column for that joint should be considered zero.

isInSubTree() runs in time proportional to the size of the subtree.

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

sdurw_models.sdurw_models.JacobianUtil_addPassiveRevoluteJacobianCol(jacobian, row, col, passive, tcp, scale)

Add to column col of jacobian the Jacobian for a passive revolute joint at position passive that controls the tool at position tcp. The joint scaling factor of the passive joint is

scale.

The Jacobian is given relative to the common world frame of joint and tcp.

sdurw_models.sdurw_models.JacobianUtil_addPrismaticJacobianCol(jacobian, row, col, joint, tcp)

Add to column col of jacobian the Jacobian of a prismatic joint with transform joint for a tool position of

tcp.

The Jacobian is given relative to the common world frame of joint and tcp.

sdurw_models.sdurw_models.JacobianUtil_addRevoluteJacobianCol(jacobian, row, col, joint, tcp)

Add to column col of jacobian the Jacobian of a revolute joint with transform joint for a tool position of tcp.

The Jacobian is given relative to the common world frame of joint and tcp.

sdurw_models.sdurw_models.JacobianUtil_isInSubTree(parent, child, state)

True iff child is in the subtree of parent for a tree structure of state.

isInSubTree(frame, frame, state) is true always.

This utility function is used for checking if a given joint does affect some tcp frame or if the Jacobian column for that joint should be considered zero.

isInSubTree() runs in time proportional to the size of the subtree.

class sdurw_models.sdurw_models.Joint(*args, **kwargs)

Bases: Frame

A Joint is a Frame with assignable values for position, velocity limits and acceleration limits.

__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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

removeJointMapping()

removes mapping of joint values

setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

property thisown

The membership flag

class sdurw_models.sdurw_models.JointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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 from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

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.

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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_models.sdurw_models.JointDevice(name, base, end, joints, state)

Bases: Device

A device for a sequence of joints.

Contrary to for example SerialDevice and TreeDevice, the joints need not have any particular ordering within the kinematic tree.

A JointDevice is a joint for which the values of the configuration Q each correspond to a frame of type Joint.

To implement a Device it is common to derive from JointDevice and just add implement methods where your device differs from the standard behaviour. Subclasses typically differ in their implementation of setQ() and the Jacobian computation.

__init__(name, base, end, joints, state)

Construct the device for a sequence of joints. :type name: string :param name: [in] name of device :type base: rw::core::Ptr< rw::kinematics::Frame > :param base: [in] the base of the device :type end: rw::core::Ptr< rw::kinematics::Frame > :param end: [in] the end (or tool) of the device :type joints: std::vector< rw::models::Joint * > :param joints: [in] the joints of the device :type state: State :param state: [in] the state that shows how frames are connected as

needed for the computation of Jacobians.

baseJCframes(frames, state)

DeviceJacobian for a sequence of frames.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the end-effector velocity seen from base-frame (\(\nu^{ase}_{end}\))

\[\nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

Where:

\[\begin{split}{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & \cdots & {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]\end{split}\]

where \({^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\) is defined by

\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] & \textrm{revolute joint} \end{array}\end{split}\]
\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] & \textrm{prismatic joint} \\ \end{array}\end{split}\]

By default the method forwards to baseJframe().

getAccelerationLimits()

Returns the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal acceleration

getBase(*args)

Overload 1:


Overload 2:

getBounds()

Returns the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Return type

QBox

Returns

std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

getDOF()

Returns number of active joints :rtype: int :return: number of active joints \(n\)

getEnd(*args)

Overload 1:


Overload 2:

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getQ(state)

Gets configuration vector \(\mathbf{q}\in \mathbb{R}^n\)

Parameters

state (State) – [in] state from which which to get \(\mathbf{q}\)

Return type

Q

Returns

configuration vector \(\mathbf{q}\)

getVelocityLimits()

Returns the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal velocity

setAccelerationLimits(acclimits)

Sets the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Parameters

acclimits (Q) – [in] the maximal acceleration

setBounds(bounds)

Sets the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Parameters

bounds (QBox) – [in] std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

setQ(q, state)

Sets configuration vector \(\mathbf{q} \in \mathbb{R}^n\)

Parameters
  • q (Q) – [in] configuration vector \(\mathbf{q}\)

  • state (State) – [in] state into which to set \(\mathbf{q}\)

setVelocityLimits(vellimits)

Sets the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Parameters

vellimits (Q) – [in] Q with the maximal velocity

property thisown

The membership flag

class sdurw_models.sdurw_models.JointDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setQ(q, state)
property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.JointDeviceJacobianCalculator(device, base, tcps, state)

Bases: JacobianCalculator

Calculator for Jacobians of a JointDevice

Implements Jacobian calculations for a JointDevice. Users should generally not construct a JointDeviceJacobianCalculator themselves by obtain one directly from a JointDevice.

If more than one end-effector is given a “stacked” Jacobian is returned.

__init__(device, base, tcps, state)

Constructs JacobianCalculator.

The dimension of the jacobian wil be (tcps.size() * 6, device.getDOF()).

Parameters
  • device (rw::core::Ptr< rw::models::JointDevice >) – [in] The device to calculate for

  • base (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Reference base of the Jacobian. Does not have to be the same as the base of the device

  • tcps (std::vector< rw::kinematics::Frame * >) – [in] List of tool end-effectors for which to calculate the Jacobian.

  • state (State) – [in] State giving how frame are connected

get(state)

rw::kinematics::State& state) const

property thisown

The membership flag

class sdurw_models.sdurw_models.JointDeviceJacobianCalculatorCPtr(*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)

rw::kinematics::State& state) const

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_models.sdurw_models.JointDeviceJacobianCalculatorPtr(*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)

rw::kinematics::State& state) const

getDeref()

Member access operator.

getJacobian(state)

Returns the Jacobian associated to state

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

Jacobian for state

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_models.sdurw_models.JointDevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)
setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.JointDevicePtrVector(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_models.sdurw_models.JointPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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 from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

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.

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

removeJointMapping()

removes mapping of joint values

setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.MobileDevice(base, wheel1, wheel2, state, name)

Bases: Device

Provides a differential controlled mobile device

The MobileDevice class provides a differential controlled mobile device with non-holonomic constraints. The \(x\) direction is defined as straight forward and \(z\) vertically up. The wheels are assumed to be positioned summetrically around the base and have \(0\) \(x\) component.

When using setQ it takes 2 parameters, which corresponds to the distances travelled by the wheels. Based on this input and the current pose of the device it calcualtes a new pose as.

__init__(base, wheel1, wheel2, state, name)

Constructs a mobile device :type base: MovableFrame :param base: [in] the base of the device :type wheel1: RevoluteJoint :param wheel1: [in] the left wheel :type wheel2: RevoluteJoint :param wheel2: [in] the right wheel :type state: State :param state: [in] the state of the device :type name: string :param name: [in] name of device

baseJCframes(frames, state)

Not implemented.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the end-effector velocity seen from base-frame (\(\nu^{ase}_{end}\))

\[\nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

Where:

\[\begin{split}{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & \cdots & {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]\end{split}\]

where \({^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\) is defined by

\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] & \textrm{revolute joint} \end{array}\end{split}\]
\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] & \textrm{prismatic joint} \\ \end{array}\end{split}\]

By default the method forwards to baseJframe().

baseJframe(frame, state)

Not implemented.

baseJframes(frames, state)

Not implemented.

getAccelerationLimits()

Returns the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal acceleration

getBase(*args)

Overload 1:


Overload 2:

const

getBounds()

Returns the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Return type

QBox

Returns

std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

getDOF()

Returns number of active joints :rtype: int :return: number of active joints \(n\)

getEnd(*args)

Overload 1:


Overload 2:

const

getQ(state)

Gets configuration vector \(\mathbf{q}\in \mathbb{R}^n\)

Parameters

state (State) – [in] state from which which to get \(\mathbf{q}\)

Return type

Q

Returns

configuration vector \(\mathbf{q}\)

getVelocityLimits()

Returns the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Return type

Q

Returns

the maximal velocity

setAccelerationLimits(acclimits)

Sets the maximal acceleration of the joints \(\mathbf{\ddot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}\)

Parameters

acclimits (Q) – [in] the maximal acceleration

setBounds(bounds)

Sets the upper \(\mathbf{q}_{min} \in \mathbb{R}^n\) and lower \(\mathbf{q}_{max} \in \mathbb{R}^n\) bounds of the joint space

Parameters

bounds (QBox) – [in] std::pair containing \((\mathbf{q}_{min}, \mathbf{q}_{max})\)

setDevicePose(transform, state)

Sets the position and orientation of the base

This operation moves the base of the robot, without considering the non-holonomic constraints of the device :type transform: rw::math::Transform3D< double > :param transform: [in] new base transform :type state: State :param state: [in] state to write change to

setQ(q, state)

Sets configuration vector \(\mathbf{q} \in \mathbb{R}^n\)

Parameters
  • q (Q) – [in] configuration vector \(\mathbf{q}\)

  • state (State) – [in] state into which to set \(\mathbf{q}\)

setVelocityLimits(vellimits)

Sets the maximal velocity of the joints \(\mathbf{\dot{q}}_{max}\in \mathbb{R}^n\)

It is assumed that \(\dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}\)

Parameters

vellimits (Q) – [in] Q with the maximal velocity

property thisown

The membership flag

class sdurw_models.sdurw_models.MobileDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)

Not implemented.

baseJend(state)
baseJframe(frame, state)

Not implemented.

baseJframes(frames, state)

Not implemented.

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

const

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

const

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setQ(q, state)
property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.MobileDevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)

Not implemented.

baseJend(state)
baseJframe(frame, state)

Not implemented.

baseJframes(frames, state)

Not implemented.

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

const

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

const

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setDevicePose(transform, state)

Sets the position and orientation of the base

This operation moves the base of the robot, without considering the non-holonomic constraints of the device :type transform: rw::math::Transform3D< double > :param transform: [in] new base transform :type state: State :param state: [in] state to write change to

setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)
setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.Models

Bases: object

Utility functions for the rw::models module.

__init__()
static findAllFrames(workcell)

All frames of the workcell.

static getDevice(workcell, name)

The device named name of workcell workcell.

An exception is thrown if the device can not be found in the workcell.

See WorkCell::findDevice() for a non-throwing version.

static getFrame(workcell, name)

The frame named name of workcell workcell.

An exception is thrown if the frame can not be found in the workcell.

See WorkCell::findFrame() for a non-throwing version.

static getStatePath(*args)

Overload 1:

Convert a sequence of configurations to a sequence of states. The device configurations are assumed to belong to a common device and state. :type device: Device :param device: [in] The device for the configurations. :type path: std::vector< rw::math::Q > :param path: [in] The sequence of device configurations. :type common_state: State :param common_state: [in] State to share for all configurations. :rtype: std::vector< rw::kinematics::State > :return: Sequence of states - one state for each configuration.


Overload 2:

Convert a sequence of configurations to a sequence of states.

The device configurations are assumed to belong to a common device and state.

type device

Device

param device

[in] The device for the configurations.

type path

std::vector< rw::math::Q >

param path

[in] The sequence of device configurations.

type common_state

State

param common_state

[in] State to share for all configurations.

type result

std::vector< rw::kinematics::State >

param result

[out] Sequence of states - one state for each configuration.

static inBounds(*args)

Overload 1:

True iff the configuration q is within the box with lower and upper corners given by bounds. Each value of q is allowed to be outside of the box by the amount tolerance.


Overload 2:

True iff the configuration q is within the joint limits of the device device.


Overload 3:

True iff the configuration q is within the joint limits of the device device.


Overload 4:

True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.


Overload 5:

True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.


Overload 6:

True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.


Overload 7:

True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.

static makeDevice(device, state, base=0, end=0)

Construct a new device for which the base of the device equals base and the end of the device equals end.

For changes in the configuration of device, base should be fixed relative to device->getBase() and end should be fixed relative to device->getEnd().

If base is NULL, then device->getBase() is used as the default value.

If end is NULL, then device->getEnd() is used as the default value.

If base and end equal base and end for the device, then the original device is returned.

Parameters
  • device (rw::core::Ptr< rw::models::Device >) – [in] Original device.

  • state (State) – [in] The kinematic structure assumed for Jacobian computations.

  • base (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Base frame for the new device.

  • end (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] End frame for the new device.

property thisown

The membership flag

class sdurw_models.sdurw_models.ModelsCPtr(*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_models.sdurw_models.ModelsPtr(*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.

findAllFrames(workcell)

All frames of the workcell.

getDeref()

Member access operator.

getDevice(workcell, name)

The device named name of workcell workcell.

An exception is thrown if the device can not be found in the workcell.

See WorkCell::findDevice() for a non-throwing version.

getFrame(workcell, name)

The frame named name of workcell workcell.

An exception is thrown if the frame can not be found in the workcell.

See WorkCell::findFrame() for a non-throwing version.

getStatePath(*args)

Overload 1:

Convert a sequence of configurations to a sequence of states. The device configurations are assumed to belong to a common device and state. :type device: Device :param device: [in] The device for the configurations. :type path: std::vector< rw::math::Q > :param path: [in] The sequence of device configurations. :type common_state: State :param common_state: [in] State to share for all configurations. :rtype: std::vector< rw::kinematics::State > :return: Sequence of states - one state for each configuration.


Overload 2:

Convert a sequence of configurations to a sequence of states.

The device configurations are assumed to belong to a common device and state.

type device

Device

param device

[in] The device for the configurations.

type path

std::vector< rw::math::Q >

param path

[in] The sequence of device configurations.

type common_state

State

param common_state

[in] State to share for all configurations.

type result

std::vector< rw::kinematics::State >

param result

[out] Sequence of states - one state for each configuration.

inBounds(*args)

Overload 1:

True iff the configuration q is within the box with lower and upper corners given by bounds. Each value of q is allowed to be outside of the box by the amount tolerance.


Overload 2:

True iff the configuration q is within the joint limits of the device device.


Overload 3:

True iff the configuration q is within the joint limits of the device device.


Overload 4:

True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.


Overload 5:

True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.


Overload 6:

True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.


Overload 7:

True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.

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.

makeDevice(device, state, base=0, end=0)

Construct a new device for which the base of the device equals base and the end of the device equals end.

For changes in the configuration of device, base should be fixed relative to device->getBase() and end should be fixed relative to device->getEnd().

If base is NULL, then device->getBase() is used as the default value.

If end is NULL, then device->getEnd() is used as the default value.

If base and end equal base and end for the device, then the original device is returned.

Parameters
  • device (rw::core::Ptr< rw::models::Device >) – [in] Original device.

  • state (State) – [in] The kinematic structure assumed for Jacobian computations.

  • base (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Base frame for the new device.

  • end (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] End frame for the new device.

property thisown

The membership flag

sdurw_models.sdurw_models.Models_findAllFrames(workcell)

All frames of the workcell.

sdurw_models.sdurw_models.Models_getDevice(workcell, name)

The device named name of workcell workcell.

An exception is thrown if the device can not be found in the workcell.

See WorkCell::findDevice() for a non-throwing version.

sdurw_models.sdurw_models.Models_getFrame(workcell, name)

The frame named name of workcell workcell.

An exception is thrown if the frame can not be found in the workcell.

See WorkCell::findFrame() for a non-throwing version.

sdurw_models.sdurw_models.Models_getStatePath(*args)

Overload 1:

Convert a sequence of configurations to a sequence of states. The device configurations are assumed to belong to a common device and state. :type device: Device :param device: [in] The device for the configurations. :type path: std::vector< rw::math::Q > :param path: [in] The sequence of device configurations. :type common_state: State :param common_state: [in] State to share for all configurations. :rtype: std::vector< rw::kinematics::State > :return: Sequence of states - one state for each configuration.


Overload 2:

Convert a sequence of configurations to a sequence of states.

The device configurations are assumed to belong to a common device and state.

type device

Device

param device

[in] The device for the configurations.

type path

std::vector< rw::math::Q >

param path

[in] The sequence of device configurations.

type common_state

State

param common_state

[in] State to share for all configurations.

type result

std::vector< rw::kinematics::State >

param result

[out] Sequence of states - one state for each configuration.

sdurw_models.sdurw_models.Models_inBounds(*args)

Overload 1:

True iff the configuration q is within the box with lower and upper corners given by bounds. Each value of q is allowed to be outside of the box by the amount tolerance.


Overload 2:

True iff the configuration q is within the joint limits of the device device.


Overload 3:

True iff the configuration q is within the joint limits of the device device.


Overload 4:

True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.


Overload 5:

True iff the joint value val is within the joint limits of the joint joint with a tolerance of tolerance.


Overload 6:

True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.


Overload 7:

True iff the joint values of state are within the joint limits of the joints of workcell with a tolerance of tolerance.

sdurw_models.sdurw_models.Models_makeDevice(device, state, base=0, end=0)

Construct a new device for which the base of the device equals base and the end of the device equals end.

For changes in the configuration of device, base should be fixed relative to device->getBase() and end should be fixed relative to device->getEnd().

If base is NULL, then device->getBase() is used as the default value.

If end is NULL, then device->getEnd() is used as the default value.

If base and end equal base and end for the device, then the original device is returned.

Parameters
  • device (rw::core::Ptr< rw::models::Device >) – [in] Original device.

  • state (State) – [in] The kinematic structure assumed for Jacobian computations.

  • base (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Base frame for the new device.

  • end (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] End frame for the new device.

class sdurw_models.sdurw_models.Object(*args, **kwargs)

Bases: Stateless

The object class represents a physical thing in the scene which has geometry. An object has a base frame (similar to a Device) and may have a number of associated frames.

__init__(*args, **kwargs)
addFrame(frame)

associate a frame to this Object. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame to associate to object

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(state)

get center of mass of this object :type state: State :param state: [in] the state in which to get center of mass :rtype: rw::math::Vector3D< double > :return:

getFrames()

get all associated frames of this object :rtype: std::vector< rw::kinematics::Frame * > :return: a vector of frames

getGeometry(*args)

Overload 1:

get default geometries :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection.

getInertia(state)

returns the inertia matrix of this body calculated around COM with the orientation of the base frame.

getMass(state)

get mass in Kg of this object :type state: State :param state: [in] the state in which the mass should be gotten from :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

get the default models :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for visualization

getName()

get name of this object. Name is always the same as the name of the base frame. :rtype: string :return: name of object.

property thisown

The membership flag

class sdurw_models.sdurw_models.ObjectCPtr(*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.

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(state)

get center of mass of this object :type state: State :param state: [in] the state in which to get center of mass :rtype: rw::math::Vector3D< double > :return:

getDeref()

Member access operator.

getGeometry(*args)

Overload 1:

get default geometries :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection.

getInertia(state)

returns the inertia matrix of this body calculated around COM with the orientation of the base frame.

getMass(state)

get mass in Kg of this object :type state: State :param state: [in] the state in which the mass should be gotten from :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

get the default models :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for visualization

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_models.sdurw_models.ObjectPtr(*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.

addFrame(frame)

associate a frame to this Object. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame to associate to object

cptr()
deref()

The pointer stored in the object.

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(state)

get center of mass of this object :type state: State :param state: [in] the state in which to get center of mass :rtype: rw::math::Vector3D< double > :return:

getDeref()

Member access operator.

getFrames()

get all associated frames of this object :rtype: std::vector< rw::kinematics::Frame * > :return: a vector of frames

getGeometry(*args)

Overload 1:

get default geometries :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: geometry for collision detection.

getInertia(state)

returns the inertia matrix of this body calculated around COM with the orientation of the base frame.

getMass(state)

get mass in Kg of this object :type state: State :param state: [in] the state in which the mass should be gotten from :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

get the default models :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: models for visualization

getName()

get name of this object. Name is always the same as the name of the base frame. :rtype: string :return: name of object.

getStateStructure()

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

isNull()

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

isRegistered()

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

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.

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_models.sdurw_models.ObjectPtrVector(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_models.sdurw_models.ParallelDevice(*args)

Bases: JointDevice

This class defines the interface for Parallel devices.

__init__(*args)

Overload 1:

Constructor

Parameters
  • legs (rw::models::ParallelDevice::Legs) – [in] the serial legs connecting the endplate to the base. The base of each serial Leg must be the same frame. Likewise, the endeffector (last frame) of each Leg must transform to the same transform as each of the other legs

  • name (string) – [in] name of device

  • state (State) – [in] the state for the assembly mode


Overload 2:

Constructor for parallel device with multiple junctions. :type name: string :param name: [in] name of the device. :type base: rw::core::Ptr< rw::kinematics::Frame > :param base: [in] the base frame. :type end: rw::core::Ptr< rw::kinematics::Frame > :param end: [in] the end frame. :type joints: std::vector< rw::models::Joint * > :param joints: [in] a list of joints. Each joint can be included in multiple legs. :type state: State :param state: [in] the state used to construct a JointDevice. :type junctions: std::vector< rw::models::ParallelDevice::Legs > :param junctions: [in] a list of junctions.

Each junction is given by a list of legs that must begin and end in the same frame.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters

state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the end-effector velocity seen from base-frame (\(\nu^{ase}_{end}\))

\[\nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

Where:

\[\begin{split}{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) & \cdots & {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]\end{split}\]

where \({^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\) is defined by

\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] & \textrm{revolute joint} \end{array}\end{split}\]
\[\begin{split}{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] & \textrm{prismatic joint} \\ \end{array}\end{split}\]

By default the method forwards to baseJframe().

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

getActiveJoints()

The active joints of the parallel device.

getAllBounds()

Get bounds for all joints (includes both active and passive joints). :rtype: std::pair< rw::math::Q,rw::math::Q > :return: a pair with the lower and upper limits.

getAllJoints()

Get all joints (both active and passive). :rtype: std::vector< rw::models::Joint * > :return: a vector of all the joints.

getFullDOF()

Get the total degrees of freedom for all (active and passive) joints in the device. :rtype: int :return: the total degrees of freedom.

getFullQ(state)

Get the full configuration vector of the device. This gives the complete state of the parallel device. :type state: State :param state: [in] the state that contains the full configuration. :rtype: Q :return: the configuration vector with the joint values for both active and passive

joints.

getJunctions()

Get the junctions of the device. :rtype: std::vector< std::vector< rw::models::ParallelLeg * > > :return: a vector of junctions. Each junction is given by a two or more legs.

getLegs()

The legs of the parallel device.

setFullQ(q, state)

Set the full configuration of the device. This sets the joint values directly, and there is no checks or guarantees that the device will be in a valid connected configuration afterwards. :type q: Q :param q: [in] the configuration vector to set. :type state: State :param state: [in/out] the state to update with a new configuration.

setQ(*args)

Overload 1:

The configuration q is the configuration for the actuated joints of the parallel device. Based on the value of q the setQ() method automatically computes the values for the unactuated (passive) joints.


Overload 2:

Set only some of the actuated joints.

This version of setQ will only set a subset of the actuated joints. Based on the value of q, the function will compute the values for the unactuated (passive) joints, and the remaining actuated joints.

This is mainly useful for parallel devices that have more controlled joints than strictly required to make the kinematics determined.

Parameters
  • q (Q) – [in] the configuration of the actuated joints (the only considered elements are the ones where the corresponding elements of enabled is true).

  • enabled (std::vector< bool >) – [in] vector of same size as q, specifying which values to solve for.

  • state (State) – [in/out] the state with all active and passive joint values. The input state is expected to contain a valid and consistent configuration of the device.

property thisown

The membership flag

class sdurw_models.sdurw_models.ParallelDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJframe(frame, state)
baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()
getActiveJoints()

The active joints of the parallel device.

getAllBounds()

Get bounds for all joints (includes both active and passive joints). :rtype: std::pair< rw::math::Q,rw::math::Q > :return: a pair with the lower and upper limits.

getAllJoints()

Get all joints (both active and passive). :rtype: std::vector< rw::models::Joint * > :return: a vector of all the joints.

getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getFullDOF()

Get the total degrees of freedom for all (active and passive) joints in the device. :rtype: int :return: the total degrees of freedom.

getFullQ(state)

Get the full configuration vector of the device. This gives the complete state of the parallel device. :type state: State :param state: [in] the state that contains the full configuration. :rtype: Q :return: the configuration vector with the joint values for both active and passive

joints.

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getJunctions()

Get the junctions of the device. :rtype: std::vector< std::vector< rw::models::ParallelLeg * > > :return: a vector of junctions. Each junction is given by a two or more legs.

getLegs()

The legs of the parallel device.

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setFullQ(q, state)

Set the full configuration of the device. This sets the joint values directly, and there is no checks or guarantees that the device will be in a valid connected configuration afterwards. :type q: Q :param q: [in] the configuration vector to set. :type state: State :param state: [in/out] the state to update with a new configuration.

setQ(*args)

Overload 1:

The configuration q is the configuration for the actuated joints of the parallel device. Based on the value of q the setQ() method automatically computes the values for the unactuated (passive) joints.


Overload 2:

Set only some of the actuated joints.

This version of setQ will only set a subset of the actuated joints. Based on the value of q, the function will compute the values for the unactuated (passive) joints, and the remaining actuated joints.

This is mainly useful for parallel devices that have more controlled joints than strictly required to make the kinematics determined.

Parameters
  • q (Q) – [in] the configuration of the actuated joints (the only considered elements are the ones where the corresponding elements of enabled is true).

  • enabled (std::vector< bool >) – [in] vector of same size as q, specifying which values to solve for.

  • state (State) – [in/out] the state with all active and passive joint values. The input state is expected to contain a valid and consistent configuration of the device.

property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.ParallelDevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJframe(frame, state)
baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()
getActiveJoints()

The active joints of the parallel device.

getAllBounds()

Get bounds for all joints (includes both active and passive joints). :rtype: std::pair< rw::math::Q,rw::math::Q > :return: a pair with the lower and upper limits.

getAllJoints()

Get all joints (both active and passive). :rtype: std::vector< rw::models::Joint * > :return: a vector of all the joints.

getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getFullDOF()

Get the total degrees of freedom for all (active and passive) joints in the device. :rtype: int :return: the total degrees of freedom.

getFullQ(state)

Get the full configuration vector of the device. This gives the complete state of the parallel device. :type state: State :param state: [in] the state that contains the full configuration. :rtype: Q :return: the configuration vector with the joint values for both active and passive

joints.

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getJunctions()

Get the junctions of the device. :rtype: std::vector< std::vector< rw::models::ParallelLeg * > > :return: a vector of junctions. Each junction is given by a two or more legs.

getLegs()

The legs of the parallel device.

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setFullQ(q, state)

Set the full configuration of the device. This sets the joint values directly, and there is no checks or guarantees that the device will be in a valid connected configuration afterwards. :type q: Q :param q: [in] the configuration vector to set. :type state: State :param state: [in/out] the state to update with a new configuration.

setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(*args)

Overload 1:

The configuration q is the configuration for the actuated joints of the parallel device. Based on the value of q the setQ() method automatically computes the values for the unactuated (passive) joints.


Overload 2:

Set only some of the actuated joints.

This version of setQ will only set a subset of the actuated joints. Based on the value of q, the function will compute the values for the unactuated (passive) joints, and the remaining actuated joints.

This is mainly useful for parallel devices that have more controlled joints than strictly required to make the kinematics determined.

Parameters
  • q (Q) – [in] the configuration of the actuated joints (the only considered elements are the ones where the corresponding elements of enabled is true).

  • enabled (std::vector< bool >) – [in] vector of same size as q, specifying which values to solve for.

  • state (State) – [in/out] the state with all active and passive joint values. The input state is expected to contain a valid and consistent configuration of the device.

setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.ParallelLeg(*args)

Bases: object

Class representing a single leg in a ParallelDevice

__init__(*args)

Overload 1:

Constructs leg from frames :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] list of Frame’s


Overload 2:

Constructs leg from frames :type frames: std::vector< rw::core::Ptr< rw::kinematics::Frame > > :param frames: [in] list of Frame’s

baseJend(state)

Returns the base to end Jacobian :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: the Jacobian

baseJframe(frame, state)

Returns the Jacobian of frame relative to base frame. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame to find Jacobian for. :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: the Jacobian

baseTend(state)

Returns the base to end transformation :type state: State :param state: [in] State for which to calculate the transform :rtype: rw::math::Transform3D< double > :return: the transform

baseTframe(frame, state)

Returns the transformation of a frame relative to the base. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame to find transformation to. :type state: State :param state: [in] State for which to calculate the transform :rtype: rw::math::Transform3D< double > :return: the transform

getActuatedJoints()

Returns list of the actuated (active) joints :rtype: std::vector< rw::models::Joint * > :return: list of joints

getBase()

the base of the leg :rtype: Frame :return: the frame

getEnd()

the end of the leg :rtype: Frame :return: the frame

getJointDOFs()

Get the total degrees of freedom (includes both active and passive joints). :rtype: int :return: the total degrees of freedom.

getKinematicChain()

Returns the kinematic chain of the leg :rtype: std::vector< rw::kinematics::Frame * > :return: list of frames

getQ(state)

Get configuration of the leg. :type state: State :param state: [in] the state with the configuration values. :rtype: Q :return: the configuration.

getUnactuatedJoints()

Returns list of unactuated (passive) joints :rtype: std::vector< rw::models::Joint * > :return: list of joints

nrOfActiveJoints()

Number of active joints :rtype: int :return: number of active joints

nrOfJoints()

Number of joints (both active and passive) :rtype: int :return: number of joints

nrOfPassiveJoints()

Number of passive joints :rtype: int :return: number of passive joints

setQ(q, state)

Sets q for the leg in the state :type q: Q :param q: [in] q to set :type state: State :param state: [out] the State to modify

property thisown

The membership flag

class sdurw_models.sdurw_models.ParallelLegCPtr(*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.

baseJframe(frame, state)

Returns the Jacobian of frame relative to base frame. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame to find Jacobian for. :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: the Jacobian

baseTend(state)

Returns the base to end transformation :type state: State :param state: [in] State for which to calculate the transform :rtype: rw::math::Transform3D< double > :return: the transform

baseTframe(frame, state)

Returns the transformation of a frame relative to the base. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame to find transformation to. :type state: State :param state: [in] State for which to calculate the transform :rtype: rw::math::Transform3D< double > :return: the transform

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getJointDOFs()

Get the total degrees of freedom (includes both active and passive joints). :rtype: int :return: the total degrees of freedom.

getKinematicChain()

Returns the kinematic chain of the leg :rtype: std::vector< rw::kinematics::Frame * > :return: list of frames

getQ(state)

Get configuration of the leg. :type state: State :param state: [in] the state with the configuration values. :rtype: Q :return: the configuration.

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.

setQ(q, state)

Sets q for the leg in the state :type q: Q :param q: [in] q to set :type state: State :param state: [out] the State to modify

property thisown

The membership flag

class sdurw_models.sdurw_models.ParallelLegPtr(*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.

baseJend(state)

Returns the base to end Jacobian :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: the Jacobian

baseJframe(frame, state)

Returns the Jacobian of frame relative to base frame. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame to find Jacobian for. :type state: State :param state: [in] State for which to calculate the Jacobian :rtype: Jacobian :return: the Jacobian

baseTend(state)

Returns the base to end transformation :type state: State :param state: [in] State for which to calculate the transform :rtype: rw::math::Transform3D< double > :return: the transform

baseTframe(frame, state)

Returns the transformation of a frame relative to the base. :type frame: rw::core::Ptr< rw::kinematics::Frame const > :param frame: [in] the frame to find transformation to. :type state: State :param state: [in] State for which to calculate the transform :rtype: rw::math::Transform3D< double > :return: the transform

cptr()
deref()

The pointer stored in the object.

getActuatedJoints()

Returns list of the actuated (active) joints :rtype: std::vector< rw::models::Joint * > :return: list of joints

getBase()

the base of the leg :rtype: Frame :return: the frame

getDeref()

Member access operator.

getEnd()

the end of the leg :rtype: Frame :return: the frame

getJointDOFs()

Get the total degrees of freedom (includes both active and passive joints). :rtype: int :return: the total degrees of freedom.

getKinematicChain()

Returns the kinematic chain of the leg :rtype: std::vector< rw::kinematics::Frame * > :return: list of frames

getQ(state)

Get configuration of the leg. :type state: State :param state: [in] the state with the configuration values. :rtype: Q :return: the configuration.

getUnactuatedJoints()

Returns list of unactuated (passive) joints :rtype: std::vector< rw::models::Joint * > :return: list of joints

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.

nrOfActiveJoints()

Number of active joints :rtype: int :return: number of active joints

nrOfJoints()

Number of joints (both active and passive) :rtype: int :return: number of joints

nrOfPassiveJoints()

Number of passive joints :rtype: int :return: number of passive joints

setQ(q, state)

Sets q for the leg in the state :type q: Q :param q: [in] q to set :type state: State :param state: [out] the State to modify

property thisown

The membership flag

class sdurw_models.sdurw_models.PrismaticJoint(name, transform)

Bases: Joint

Prismatic joints.

PrismaticJoint implements a prismatic joint for the displacement in the direction of the z-axis of an arbitrary displacement transform.

__init__(name, transform)

Constructs PrismaticJoint

Parameters
  • name (string) – [in] Name of the joints

  • transform (rw::math::Transform3D< double >) – [in] Static transform of the joint

getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its displacement transform.


Overload 2:

getTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent transform.


Overload 2:

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.

multiplyJointTransform(parent, q, result)

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

The transform is calculated for the joint values of q.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

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

  • q (Q) – [in] Joint values for the joint

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

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.PrismaticJointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its displacement transform.


Overload 2:

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent transform.


Overload 2:

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

multiplyJointTransform(parent, q, result)

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

The transform is calculated for the joint values of q.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

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

  • q (Q) – [in] Joint values for the joint

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

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_models.sdurw_models.PrismaticJointPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its displacement transform.


Overload 2:

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent transform.


Overload 2:

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

multiplyJointTransform(parent, q, result)

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

The transform is calculated for the joint values of q.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

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

  • q (Q) – [in] Joint values for the joint

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

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.PrismaticSphericalJoint(name, transform)

Bases: Joint

A prismatic spherical joint that allows rotations in all directions and translation along one direction.

Rotation is allowed around all axes. The xy-position is fixed, while the z-axis is translational.

This joint is equivalent to a spherical joint followed by a translational joint.

__init__(name, transform)

Construct a prismatic spherical joint. :type name: string :param name: [in] name of the joint. :type transform: rw::math::Transform3D< double > :param transform: [in] static transform of the joint.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.PrismaticSphericalJointCPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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_models.sdurw_models.PrismaticSphericalJointPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.PrismaticUniversalJoint(name, transform)

Bases: Joint

A prismatic universal joint that allows rotations in two directions and translation along the third.

Rotation is allowed around the x and y axes. The xy-position is fixed, while the z-axis is translational.

This joint is equivalent to a universal joint followed by a translational joint.

__init__(name, transform)

Construct a prismatic universal joint. :type name: string :param name: [in] name of the joint. :type transform: rw::math::Transform3D< double > :param transform: [in] static transform of the joint.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.PrismaticUniversalJointCPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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_models.sdurw_models.PrismaticUniversalJointPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.RevoluteJoint(name, transform)

Bases: RevoluteJoint

class sdurw_models.sdurw_models.RevoluteJointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its displacement transform.


Overload 2:

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent frame.


Overload 2:

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

multiplyJointTransform(parent, q, result)

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

The transform is calculated for the joint values of q.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

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

  • q (Q) – [in] Joint values for the joint

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

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_models.sdurw_models.RevoluteJointClass

alias of RevoluteJoint

class sdurw_models.sdurw_models.RevoluteJointPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(*args)

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its displacement transform.


Overload 2:

getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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

Overload 1:

The transform of the joint relative to its parent.

The transform is calculated for the joint values of state.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

Parameters

q (float) – [in] Joint values for the joint

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent frame.


Overload 2:

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

multiplyJointTransform(parent, q, result)

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

The transform is calculated for the joint values of q.

This method is equivalent to Frame::multiplyTransform except that is operates directly on a joint vector instead of a State.

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

  • q (Q) – [in] Joint values for the joint

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

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.RigidBodyInfo(mass, Ibody)

Bases: object

A class to wrap rigid body information.

__init__(mass, Ibody)

constructs a RigidBodyInfo with a mass, inertia matrix, initial pose and velocity.

getInertia()

returns the inertia matrix of this rigid body

getMass()

returns the mass of this RigidBodyInfo :rtype: float :return: the mass

property thisown

The membership flag

class sdurw_models.sdurw_models.RigidBodyInfoCPtr(*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_models.sdurw_models.RigidBodyInfoPtr(*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.

getInertia()

returns the inertia matrix of this rigid body

getMass()

returns the mass of this RigidBodyInfo :rtype: float :return: the mass

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_models.sdurw_models.RigidObject(*args)

Bases: Object

the RigidObject defines a physical object in the workcell that is rigid in the sence that the geometry does not change. The rigid object also have basic properties such as Inertia and mass. These are default 1.0 kg and inertia of solid sphere with mass 1.0kg and radius of 10cm. The center of mass defaults to origin of the base frame.

__init__(*args)

Overload 1:

constructor :type baseframe: rw::core::Ptr< rw::kinematics::Frame > :param baseframe: [in] base frame of the object


Overload 2:

constructor :type baseframe: rw::core::Ptr< rw::kinematics::Frame > :param baseframe: [in] base frame of the object :type geom: Ptr :param geom: [in] the Geometry Forming the object


Overload 3:

constructor :type baseframe: rw::core::Ptr< rw::kinematics::Frame > :param baseframe: [in] base frame of the object :type geom: std::vector< rw::geometry::Geometry::Ptr > :param geom: [in] the Geometry Forming the object


Overload 4:

constructor :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] first frame is base frame of the object


Overload 5:

constructor :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] first frame is base frame of the object :type geom: Ptr :param geom: [in] the Geometry Forming the object


Overload 6:

constructor :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] first frame is base frame of the object :type geom: std::vector< rw::geometry::Geometry::Ptr > :param geom: [in] a list of geometries to form the object

addGeometry(geom)

add collision geometry from this object :type geom: Ptr :param geom: [in] the geometry to add

addModel(model)

add visualization model to this object :type model: Ptr :param model: [in] the model to be added

approximateInertia()

approximates inertia based on geometry, mass and center of mass properties

approximateInertiaCOM()

approximates inertia and center of mass based on geometry and mass properties

getCOM(*args)

Overload 1:

get the center of mass of this rigid body seen in the base frame :rtype: rw::math::Vector3D< double > :return: the center of mass 3D coordinate


Overload 2:

getGeometry()

get geometry of this rigid object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: a list of all Geometries

getInertia(*args)

Overload 1:

get the inertia matrix of this rigid body seen in the base frame :rtype: rw::math::InertiaMatrix< double > :return: IntertiaMatrix


Overload 2:

getMass(*args)

Overload 1:

returns the mass of this RigidObject :rtype: float :return: mass of the Object


Overload 2:

getModels()

get visualization models for this rigid object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: a list of all models

removeGeometry(geom)

remove collision geometry from this object :type geom: Ptr :param geom: [in] the geometry to remove

removeModel(model)

remove visualization model to this rigid object :type model: Ptr :param model: [in] the model to be removed

setCOM(com)

set the center of mass of this rigid body seen in the base frame

setInertia(inertia)

set inertia of this rigid object :type inertia: rw::math::InertiaMatrix< double > :param inertia: [in] the inertia of this object

setMass(mass)

set mass of this RigidObject :type mass: float :param mass: [in] the mass of this object

property thisown

The membership flag

class sdurw_models.sdurw_models.RigidObjectCPtr(*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.

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(*args)

Overload 1:

get the center of mass of this rigid body seen in the base frame :rtype: rw::math::Vector3D< double > :return: the center of mass 3D coordinate


Overload 2:

getDeref()

Member access operator.

getGeometry()

get geometry of this rigid object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: a list of all Geometries

getInertia(*args)

Overload 1:

get the inertia matrix of this rigid body seen in the base frame :rtype: rw::math::InertiaMatrix< double > :return: IntertiaMatrix


Overload 2:

getMass(*args)

Overload 1:

returns the mass of this RigidObject :rtype: float :return: mass of the Object


Overload 2:

getModels()

get visualization models for this rigid object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: a list of all models

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_models.sdurw_models.RigidObjectPtr(*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.

addFrame(frame)

associate a frame to this Object. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame to associate to object

addGeometry(geom)

add collision geometry from this object :type geom: Ptr :param geom: [in] the geometry to add

addModel(model)

add visualization model to this object :type model: Ptr :param model: [in] the model to be added

approximateInertia()

approximates inertia based on geometry, mass and center of mass properties

approximateInertiaCOM()

approximates inertia and center of mass based on geometry and mass properties

cptr()
deref()

The pointer stored in the object.

getBase(*args)

Overload 1:

get base frame of this object :rtype: Frame :return: base frame of object


Overload 2:

get base frame of this object :rtype: Frame :return: base frame of object

getCOM(*args)

Overload 1:

get the center of mass of this rigid body seen in the base frame :rtype: rw::math::Vector3D< double > :return: the center of mass 3D coordinate


Overload 2:

getDeref()

Member access operator.

getFrames()

get all associated frames of this object :rtype: std::vector< rw::kinematics::Frame * > :return: a vector of frames

getGeometry()

get geometry of this rigid object :rtype: std::vector< rw::geometry::Geometry::Ptr > :return: a list of all Geometries

getInertia(*args)

Overload 1:

get the inertia matrix of this rigid body seen in the base frame :rtype: rw::math::InertiaMatrix< double > :return: IntertiaMatrix


Overload 2:

getMass(*args)

Overload 1:

returns the mass of this RigidObject :rtype: float :return: mass of the Object


Overload 2:

getModels()

get visualization models for this rigid object :rtype: std::vector< rw::geometry::Model3D::Ptr > :return: a list of all models

getName()

get name of this object. Name is always the same as the name of the base frame. :rtype: string :return: name of object.

getStateStructure()

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

isNull()

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

isRegistered()

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

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.

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.

removeGeometry(geom)

remove collision geometry from this object :type geom: Ptr :param geom: [in] the geometry to remove

removeModel(model)

remove visualization model to this rigid object :type model: Ptr :param model: [in] the model to be removed

setCOM(com)

set the center of mass of this rigid body seen in the base frame

setInertia(inertia)

set inertia of this rigid object :type inertia: rw::math::InertiaMatrix< double > :param inertia: [in] the inertia of this object

setMass(mass)

set mass of this RigidObject :type mass: float :param mass: [in] the mass of this object

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

class sdurw_models.sdurw_models.SE3Device(name, base, mframe)

Bases: Device

A Cartesian 6-Dof device

The SE3Device is a 6-dof device with 6 independent inputs that enables the device to place its end-effector anywhere in the workspace.

The \(\mathbf{q}\in \mathbb{R}^6\) input vector maps directly to the end-effector pose \(\robabx{b}{e}{\mathbf{x}}\), thus:

\[\begin{split}\robabx{b}{e}{\mathbf{x}} = \left[ \begin{array}{c} x\\ y\\ z\\ \theta k_x\\ \theta k_y\\ \theta k_z \end{array} \right] = \left[ \begin{array}{c} q_1\\ q_2\\ q_3\\ q_4\\ q_5\\ q_6 \end{array} \right] = \mathbf{q}\end{split}\]

It is easily seen that the jacobian \({^b_6}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial^b\mathbf{x}_6}{\partial \mathbf{q}}\) equals the \(6\times 6\) identity matrix \(\mathbf{I}^{6\times 6}\)

The device can be seen as a “perfect” robot, it has no singularities anywhere in the task space, no kinematic or dynamic limits (it can instantaneous move anywhere at any time). The device is interesting in simulations where performance and stability of closed-loop control systems (for instance visual-servoing systems) must be evaluated - if a closed-loop control system does not perform well with a “perfect” robot it will probably not perform well with a real robot either.

__init__(name, base, mframe)

Constructor

Parameters
  • name (string) – [in] device name

  • base (rw::core::Ptr< rw::kinematics::Frame >) – documentation missing !

  • mframe (MovableFrame) – documentation missing !

baseJCframes(frames, state)

DeviceJacobian for a sequence of frames.

baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^b_e\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^b_e}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Where:

\[\begin{split}{^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \mathbf{I}^{6\times 6} = \left[ \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1\\ \end{array} \right]\end{split}\]
getAccelerationLimits()

get the Joint Acceleration limit :rtype: Q :return: the Acceleration limit as Q

getBase(*args)

Overload 1:

get base of the device :rtype: Frame :return: base Frame


Overload 2:

get base of the device :rtype: Frame :return: base Frame

getBounds()

Since the SE3Device robot is unconstrained and can move anywhere whithin the taskspace each of the 6 input’s are unbounded (\([-\inf, \inf]\)) in practice the inputs are limited to the numerical limits of the real datatype, thus this method returns the range ([DBL_MIN, DBL_MAX]) for each of the 6 inputs

getDOF()

This method always returns the value 6

getEnd(*args)

Overload 1:

get end of the device :rtype: Frame :return: end Frame


Overload 2:

get end of the device :rtype: Frame :return: end Frame

getQ(state)

Gets configuration vector \(\mathbf{q}\in \mathbb{R}^n\)

Parameters

state (State) – [in] state from which which to get \(\mathbf{q}\)

Return type

Q

Returns

configuration vector \(\mathbf{q}\)

getVelocityLimits()

get the Joint velocity limit :rtype: Q :return: the velocity limit as Q

setAccelerationLimits(acclimits)

set the Joint Acceleration limit :type acclimits: Q :param acclimits: [in] the acceleration limit as Q

setBounds(bounds)

set outer bound of the device :type bounds: QBox :param bounds: [in] the minimum Q and the maximum Q

setQ(q, state)

Sets configuration vector \(\mathbf{q} \in \mathbb{R}^n\)

Parameters
  • q (Q) – [in] configuration vector \(\mathbf{q}\)

  • state (State) – [in] state into which to set \(\mathbf{q}\)

setVelocityLimits(vellimits)

set the Joint velocity limit :type vellimits: Q :param vellimits: [in] the velocity limit as Q

property thisown

The membership flag

class sdurw_models.sdurw_models.SE3DeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^b_e\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^b_e}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Where:

\[\begin{split}{^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \mathbf{I}^{6\times 6} = \left[ \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1\\ \end{array} \right]\end{split}\]
baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

getAccelerationLimits()

get the Joint Acceleration limit :rtype: Q :return: the Acceleration limit as Q

getBase(*args)

Overload 1:

get base of the device :rtype: Frame :return: base Frame


Overload 2:

get base of the device :rtype: Frame :return: base Frame

getBounds()

Since the SE3Device robot is unconstrained and can move anywhere whithin the taskspace each of the 6 input’s are unbounded (\([-\inf, \inf]\)) in practice the inputs are limited to the numerical limits of the real datatype, thus this method returns the range ([DBL_MIN, DBL_MAX]) for each of the 6 inputs

getDOF()

This method always returns the value 6

getDeref()

Member access operator.

getEnd(*args)

Overload 1:

get end of the device :rtype: Frame :return: end Frame


Overload 2:

get end of the device :rtype: Frame :return: end Frame

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()

get the Joint velocity limit :rtype: Q :return: the velocity limit as Q

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.

setQ(q, state)
property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.SE3DevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)

Calculates the jacobian matrix of the end-effector described in the robot base frame \(^b_e\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^b_e}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Where:

\[\begin{split}{^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \mathbf{I}^{6\times 6} = \left[ \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1\\ \end{array} \right]\end{split}\]
baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

getAccelerationLimits()

get the Joint Acceleration limit :rtype: Q :return: the Acceleration limit as Q

getBase(*args)

Overload 1:

get base of the device :rtype: Frame :return: base Frame


Overload 2:

get base of the device :rtype: Frame :return: base Frame

getBounds()

Since the SE3Device robot is unconstrained and can move anywhere whithin the taskspace each of the 6 input’s are unbounded (\([-\inf, \inf]\)) in practice the inputs are limited to the numerical limits of the real datatype, thus this method returns the range ([DBL_MIN, DBL_MAX]) for each of the 6 inputs

getDOF()

This method always returns the value 6

getDeref()

Member access operator.

getEnd(*args)

Overload 1:

get end of the device :rtype: Frame :return: end Frame


Overload 2:

get end of the device :rtype: Frame :return: end Frame

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()

get the Joint velocity limit :rtype: Q :return: the velocity limit as Q

isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)

set the Joint Acceleration limit :type acclimits: Q :param acclimits: [in] the acceleration limit as Q

setBounds(bounds)

set outer bound of the device :type bounds: QBox :param bounds: [in] the minimum Q and the maximum Q

setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)
setVelocityLimits(vellimits)

set the Joint velocity limit :type vellimits: Q :param vellimits: [in] the velocity limit as Q

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.SerialDevice(*args)

Bases: JointDevice

The device for a serial chain.

SerialChain is like JointDevice except that SerialChain has the additional guarantee that the joints lie on a single parent to child path of the kinematic tree.

__init__(*args)

Overload 1:

Constructor

Parameters
  • first (rw::core::Ptr< rw::kinematics::Frame >) – [in] the base frame of the robot

  • last (rw::core::Ptr< rw::kinematics::Frame >) – [in] the end-effector of the robot

  • name (string) – [in] name of device

  • state (State) – [in] the connectedness of the frames


Overload 2:

Creates object

Parameters
  • serialChain (std::vector< rw::kinematics::Frame * >) – [in] a vector of connected frames. The first frame in serialChain is the base of the device and the last frame of serialChain is the end of the device. The joints of the device are the active joints of serialChain.

  • name (string) – [in] name of device

  • state (State) – [in] the initial state of everything

frames()

Frames of the device.

This method is being used when displaying the kinematic structure of devices in RobWorkStudio. The method really isn’t of much use for everyday programming.

Return type

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

Returns

list of raw Frame pointers.

property thisown

The membership flag

class sdurw_models.sdurw_models.SerialDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

frames()

Frames of the device.

This method is being used when displaying the kinematic structure of devices in RobWorkStudio. The method really isn’t of much use for everyday programming.

Return type

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

Returns

list of raw Frame pointers.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setQ(q, state)
property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.SerialDevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

frames()

Frames of the device.

This method is being used when displaying the kinematic structure of devices in RobWorkStudio. The method really isn’t of much use for everyday programming.

Return type

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

Returns

list of raw Frame pointers.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)
setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.SphericalJoint(name, transform)

Bases: Joint

A spherical joint that allows rotations in all directions.

Rotation is allowed around the x-, y- and z-axes. The position is fixed.

__init__(name, transform)

Construct a spherical joint. :type name: string :param name: [in] name of the joint. :type transform: rw::math::Transform3D< double > :param transform: [in] static transform of the joint.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.SphericalJointCPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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_models.sdurw_models.SphericalJointPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.TreeDevice(base, ends, name, state)

Bases: JointDevice

A tree structured device

This device type defines devices that are tree-structured, with multiple end effectors. Typical for dexterous hands, and multi-armed robots.

__init__(base, ends, name, state)

Constructor

Parameters
  • base (rw::core::Ptr< rw::kinematics::Frame >) – [in] the base frame of the robot

  • ends (std::vector< rw::kinematics::Frame * >) – [in] the set of end-effectors of the robot

  • name (string) – [in] name of device

  • state (State) – [in] the initial state of everything

baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end effectors.

frames()

Frames of the device.

This method is being used when displaying the kinematic structure of devices in RobWorkStudio. The method really isn’t of much use for everyday programming.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the tree device.

property thisown

The membership flag

class sdurw_models.sdurw_models.TreeDeviceCPtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end effectors.

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

deref()

The pointer stored in the object.

frames()

Frames of the device.

This method is being used when displaying the kinematic structure of devices in RobWorkStudio. The method really isn’t of much use for everyday programming.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the tree device.

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getQ(state)
getVelocityLimits()
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.

setQ(q, state)
property thisown

The membership flag

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.TreeDevicePtr(*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.

baseJCend(state)

DeviceJacobian for the end frame.

By default this method forwards to baseDJframe().

baseJCframe(frame, state)

DeviceJacobian for a particular frame.

By default this method forwards to baseDJframes().

baseJCframes(frames, state)
baseJend(state)
baseJends(state)

like Device::baseJend() but with a Jacobian calculated for all end effectors.

baseJframe(frame, state)

Calculates the jacobian matrix of a frame f described in the robot base frame \(^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

Parameters
  • frame (rw::core::Ptr< rw::kinematics::Frame const >) – [in] Frame for which to calculate the Jacobian

  • state (State) – [in] State for which to calculate the Jacobian

Return type

Jacobian

Returns

the \(6*ndof\) jacobian matrix: \({^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})\)

This method calculates the jacobian relating joint velocities (\(\mathbf{\dot{q}}\)) to the frame f velocity seen from base-frame (\(\nu^{base}_{frame}\))

\[\nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}\]

The jacobian matrix.. math:

{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

is defined as:

\[{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}\]

By default the method forwards to baseJframes().

baseJframes(frames, state)

The Jacobian for a sequence of frames.

A Jacobian is computed for each of the frames and the Jacobians are stacked on top of eachother. :type frames: std::vector< rw::kinematics::Frame * > :param frames: [in] the frames to calculate the frames from :type state: State :param state: [in] the state to calculate in :rtype: Jacobian :return: the jacobian

baseTend(state)

Calculates the homogeneous transform from base to the end frame \(\robabx{base}{end}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{base}{end}{\mathbf{T}}\)

baseTframe(f, state)

Calculates the homogeneous transform from base to a frame f \(\robabx{b}{f}{\mathbf{T}}\) :rtype: rw::math::Transform3D< double > :return: the homogeneous transform \(\robabx{b}{f}{\mathbf{T}}\)

cptr()
deref()

The pointer stored in the object.

frames()

Frames of the device.

This method is being used when displaying the kinematic structure of devices in RobWorkStudio. The method really isn’t of much use for everyday programming.

getAccelerationLimits()
getBase(*args)

Overload 1:


Overload 2:

getBounds()
getDOF()
getDeref()

Member access operator.

getEnd(*args)

Overload 1:


Overload 2:

getEnds()

The end-effectors of the tree device.

getJoints()

Get all joints of this device :rtype: std::vector< rw::models::Joint * > :return: all joints

getName()

Returns the name of the device :rtype: string :return: name of the device

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the device.

The property map of the device is provided to let the user store various settings for the device. The settings are typically loaded from setup files.

The low-level manipulations of the property map can be cumbersome. To ease these manipulations, the PropertyAccessor utility class has been provided. Instances of this class are provided for a number of common settings, however it is undecided if these properties are a public part of RobWork.

Return type

PropertyMap

Returns

The property map of the device.


Overload 2:

getQ(state)
getStateStructure()

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

getVelocityLimits()
isNull()

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

isRegistered()

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

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.

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.

setAccelerationLimits(acclimits)
setBounds(bounds)
setName(name)

Sets the name of the Device :type name: string :param name: [in] the new name of the frame

setQ(q, state)
setVelocityLimits(vellimits)
property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

worldTbase(state)

Calculates the homogeneous transform from world to base \(\robabx{w}{b}{\mathbf{T}}\)

Return type

rw::math::Transform3D< double >

Returns

the homogeneous transform \(\robabx{w}{b}{\mathbf{T}}\)

class sdurw_models.sdurw_models.UniversalJoint(name, transform)

Bases: Joint

A universal joint that allows rotations in two directions.

Rotation is allowed around the x and y axes. The position and rotation around the z axis is fixed.

__init__(name, transform)

Construct a universal joint. :type name: string :param name: [in] name of the joint. :type transform: rw::math::Transform3D< double > :param transform: [in] static transform of the joint.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.UniversalJointCPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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_models.sdurw_models.UniversalJointPtr(*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.

doGetTransform(state)
doMultiplyTransform(parent, state, result)
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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.VectorJoint_p(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_models.sdurw_models.VectorParallelDeviceLeg(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_models.sdurw_models.VectorParallelDevicePtr(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_models.sdurw_models.VectorParallelLegPtr(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_models.sdurw_models.VectorParallelLeg_p(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_models.sdurw_models.VectorRigidObjectPtr(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_models.sdurw_models.VectorSerialDevicePtr(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_models.sdurw_models.VectorTreeDevicePtr(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_models.sdurw_models.VirtualJoint(name, transform, dof)

Bases: Joint

Virtuals joints.

VirtualJoint is a joint with a role similar to a rw::kinematics::FixedFrame with

an optional number of dof allocated in the state.

Virtual joints are useful when you want a store joint values of e.g.

a number of passive joints.

__init__(name, transform, dof)

A virtual joint with a displacement transform of transform. :type name: string :param name: [in] The name of the frame. :type transform: rw::math::Transform3D< double > :param transform: [in] The displacement transform of the joint. :type dof: int :param dof: [in] Number of degrees of freedom of the joint

getFixedTransform()

get the fixed transform from parent to this joint

Notice that this does not include the actual rotation of the joint (its state) only its fixed transform.

Return type

rw::math::Transform3D< double >

Returns

fixed part of transform from paretn to joint

getJacobian(row, col, joint, tcp, state, jacobian)

Finds the Jacobian of the joints and adds it in jacobian.

Calculates the Jacobian contribution to the device Jacobian when controlling a frame tcp and given a current joint pose joint.

The values are stored from row row to row+5 and column col to col+(joint.getDOF()-1).

Parameters
  • row (int) – [in] Row where values should be stored

  • col (int) – [in] Column where values should be stored

  • joint (rw::math::Transform3D< double >) – [in] Transform of the joint

  • tcp (rw::math::Transform3D< double >) – [in] Transformation of the point to control

  • state (State) –

  • jacobian (Jacobian) – [in] Jacobian to which to add the results.

getJointTransform(state)

get the isolated joint transformation which is purely dependent on q. :type state: State :param state: [in] the state from which to extract q :rtype: rw::math::Transform3D< double > :return: the joint transformation

removeJointMapping()

removes mapping of joint values

setFixedTransform(t3d)

change the transform from parent to joint base. :type t3d: rw::math::Transform3D< double > :param t3d: [in] the new transform.

setJointMapping(function)

set the function to be used in transforming from the state q to the actual q needed.

This function can be used e.g. by a calibration. :type function: rw::math::Function1Diff< double,double,double >::Ptr :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw_models.sdurw_models.VirtualJointCPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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_models.sdurw_models.VirtualJointPtr(*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.

getBounds()

Gets joint bounds :rtype: std::pair< rw::math::Q,rw::math::Q > :return: the lower and upper bound of this joint

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

getJacobian(row, col, joint, tcp, state, jacobian)
getJointTransform(state)
getMaxAcceleration()

Gets max acceleration of joint :rtype: Q :return: the maximum acceleration of the joint

getMaxVelocity()

Gets max velocity of joint :rtype: Q :return: the maximum velocity of the joint

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.

isActive()

a joint is active if its motorized/controlled in some fasion. passive or non-active joints are typically used in parrallel robots. :rtype: boolean :return:

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.

removeJointMapping()
setActive(isActive)

set the active state of the joint :type isActive: boolean :param isActive: [in] true to enable control/motorization of joint, false otherwise

setBounds(*args)

Overload 1:

Sets joint bounds :type bounds: std::pair< rw::math::Q const,rw::math::Q const > :param bounds: [in] the lower and upper bounds of this joint


Overload 2:

Sets joint bounds :type lower: Q :param lower: [in] the lower of this joint :type upper: Q :param upper: [in] the upper of this joint

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];
setFixedTransform(t3d)
setJointMapping(function)
setMaxAcceleration(maxAcceleration)

Sets max acceleration of joint :type maxAcceleration: Q :param maxAcceleration: [in] the new maximum acceleration of the joint

setMaxVelocity(maxVelocity)

Sets max velocity of joint :type maxVelocity: Q :param maxVelocity: [in] the new maximum velocity of the joint

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_models.sdurw_models.WorkCell(*args)

Bases: object

WorkCell keeps track of devices, obstacles and objects in the scene.

WorkCell is a pretty dumb container to which you can add your devices and the frames you your GUI to show as objects or camera views.

WorkCell is responsible for keeping track of everything including all devices, object and obstacles in the environment. WorkCell contains the World Frame, which represents the root and the only frame without a parent.

STATE_DATA_ADDED = 0

StateData was added to state structure.

STATE_DATA_REMOVED = 1

StateData was removed from state structure.

WORKCELL_CHANGED = 2

WorkCell changed (such as addition or removal of Device, Frame, Object, SensorModel, or ControllerModel).

__init__(*args)

Overload 1:

Constructs an empty WorkCell

Parameters

name (string) – [in] The name of the workcell. A good name for the workcell would be the (eventual) file that the workcell was loaded from.


Overload 2:

Constructs a WorkCell

Parameters
  • tree (rw::core::Ptr< rw::kinematics::StateStructure >) – [in] The (initial) tree structure of the WorkCell

  • name (string, optional) – [in] The name of the workcell. A good name for the workcell would be the (eventual) file that the workcell was loaded from.

  • filename (string, optional) – [in] The filename from which the workcell is loaded.


Overload 3:

Constructs a WorkCell

Parameters
  • tree (rw::core::Ptr< rw::kinematics::StateStructure >) – [in] The (initial) tree structure of the WorkCell

  • name (string, optional) – [in] The name of the workcell. A good name for the workcell would be the (eventual) file that the workcell was loaded from.

  • filename – [in] The filename from which the workcell is loaded.


Overload 4:

Constructs a WorkCell

Parameters
  • tree (rw::core::Ptr< rw::kinematics::StateStructure >) – [in] The (initial) tree structure of the WorkCell

  • name – [in] The name of the workcell. A good name for the workcell would be the (eventual) file that the workcell was loaded from.

  • filename – [in] The filename from which the workcell is loaded.

add(*args)

Overload 1: Add device to workcell


Overload 2: Add object to workcell


Overload 3: Add sensormodel to workcell


Overload 4: Add controllermodel to workcell

addDAF(frame, parent=0)

Adds dynamically attachable frame (DAF) frame with parent as parent.

If parent == NULL, then world is used as parent

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

  • parent (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Parent frame - uses World is parent == NULL

addDevice(device)

Adds a Device to the WorkCell.

Ownership of device is taken.

Parameters

device (rw::core::Ptr< rw::models::Device >) – [in] pointer to device.

addFrame(frame, parent=0)

Adds frame with parent as parent.

If parent == NULL, then world is used as parent

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

  • parent (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Parent frame - uses World is parent == NULL

findController(name)

Returns controller with the specified name.

If multiple controlelrs has the same name, the first controller encountered will be returned. If no controller is found, the method returns NULL.

Parameters

name (string) – [in] name of controller.

Return type

rw::core::Ptr< rw::models::ControllerModel >

Returns

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

findDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::Device >

Returns

The device named name or NULL if no such device.

findFixedFrame(name)

Returns FixedFrame 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

FixedFrame

Returns

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

findFixedFrames()

Returns all FixedFrame. :rtype: std::vector< rw::kinematics::FixedFrame * > :return: all frames of type FixedFrame in the workcell

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.

findJointDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::JointDevice >

Returns

The device named name or NULL if no such device.

findJointDevices()

Returns a vector with pointers to the Device(s) with a specific type JointDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::JointDevice > >

Returns

vector with pointers to Device(s) of type T.

findMovableFrame(name)

Returns MovableFrame 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

MovableFrame

Returns

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

findMovableFrames()

Returns all MovableFrames. :rtype: std::vector< rw::kinematics::MovableFrame * > :return: all frames of type MovableFrames in the workcell

findObject(name)

The object named name of the workcell.

NULL is returned if there is no such object.

Parameters

name (string) – [in] The object name

Return type

rw::core::Ptr< rw::models::Object >

Returns

The object named name or NULL if no such object.

findParallelDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::ParallelDevice >

Returns

The device named name or NULL if no such device.

findParallelDevices()

Returns a vector with pointers to the Device(s) with a specific type ParallelDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::ParallelDevice > >

Returns

vector with pointers to Device(s) of type T.

findSensor(name)

Returns sensor with the specified name.

If multiple sensors has the same name, the first sensor encountered will be returned. If no sensor is found, the method returns NULL.

Parameters

name (string) – [in] name of sensor.

Return type

rw::core::Ptr< rw::sensor::SensorModel >

Returns

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

findSerialDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::SerialDevice >

Returns

The device named name or NULL if no such device.

findSerialDevices()

Returns a vector with pointers to the Device(s) with a specific type SerialDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::SerialDevice > >

Returns

vector with pointers to Device(s) of type T.

findTreeDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::TreeDevice >

Returns

The device named name or NULL if no such device.

findTreeDevices()

Returns a vector with pointers to the Device(s) with a specific type TreeDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::TreeDevice > >

Returns

vector with pointers to Device(s) of type T.

getCalibrationFilename()

Returns the filename of the calibration associated to the work cell.

Returns an empty string in case no calibration is associated.

To load the file use the getFilePath()+getCalibrationFilename() to get the absolute location

getCollisionSetup()

Returns collision setup associated to work cell :rtype: rw::proximity::CollisionSetup :return: Collision setup

getControllers()

Returns all controllers in workcell :rtype: std::vector< rw::core::Ptr< rw::models::ControllerModel > > :return: List of all controllers

getDefaultState()

Returns a default State :rtype: State :return: default State

getDevices()

Returns a reference to a vector with pointers to the Device(s) in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::Device > >

Returns

const vector with pointers to rw::models::Device(s).

getFilePath()

Returns the path of where the work cell is located

If the workcell is not loaded from file, it returns an empty string

getFilename()

Returns the full path and filename of the workcell.

If the workcell is loaded from file, then this method returns the full filename. Otherwise it returns an empty string.

getFrames()

Returns all frames in workcell :rtype: std::vector< rw::kinematics::Frame * > :return: List of all frames

getName()

The name of the workcell or the empty string if no name was provided. :rtype: string :return: the name of the workcell

getObjects()

Returns all object in the work cell

Return type

std::vector< rw::core::Ptr< rw::models::Object > >

Returns

All object in work cell

getPropertyMap(*args)

Overload 1:

Properties of this workcell


Overload 2:

Properties of this workcell :rtype: PropertyMap :return: the property map including the properties of this workcell

getSceneDescriptor()

Get the scene descriptor. :rtype: rw::core::Ptr< rw::graphics::SceneDescriptor > :return: the scene descriptor.

getSensors()

Returns all frames in workcell :rtype: std::vector< rw::core::Ptr< rw::sensor::SensorModel > > :return: List of all frames

getStateStructure()

gets the complete state structure of the workcell. :rtype: rw::core::Ptr< rw::kinematics::StateStructure > :return: the state structure of the workcell.

getWorldFrame()

Returns pointer to the world frame

Return type

Frame

Returns

Pointer to the world frame

remove(*args)

Overload 1:

Removes frame from work cell

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to remove

Deprecated: Since January 2018. Please use remove(rw::core::Ptr<rw::kinematics::Frame>) instead.


Overload 2:

Remove object from workcell


Overload 3:

Remove device from workcell


Overload 4:

Remove sensormodel from workcell


Overload 5:

Remove controllermodel from workcell

removeObject(object)

Removes object from workcell

Parameters

object (Object) – [in] Object to remove

setCalibrationFilename(calibrationFilename)

Sets the filename of the calibration file

Parameters

calibrationFilename (string) – [in] Filename of calibration file with path relative to the work cell path.

setDefaultState(state)

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

setSceneDescriptor(scene)

Set the scene descriptor. :type scene: rw::core::Ptr< rw::graphics::SceneDescriptor > :param scene: [in] the scene descriptor.

property thisown

The membership flag

class sdurw_models.sdurw_models.WorkCellCPtr(*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.

findController(name)

Returns controller with the specified name.

If multiple controlelrs has the same name, the first controller encountered will be returned. If no controller is found, the method returns NULL.

Parameters

name (string) – [in] name of controller.

Return type

rw::core::Ptr< rw::models::ControllerModel >

Returns

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

findDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::Device >

Returns

The device named name or NULL if no such device.

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.

findObject(name)

The object named name of the workcell.

NULL is returned if there is no such object.

Parameters

name (string) – [in] The object name

Return type

rw::core::Ptr< rw::models::Object >

Returns

The object named name or NULL if no such object.

findSensor(name)

Returns sensor with the specified name.

If multiple sensors has the same name, the first sensor encountered will be returned. If no sensor is found, the method returns NULL.

Parameters

name (string) – [in] name of sensor.

Return type

rw::core::Ptr< rw::sensor::SensorModel >

Returns

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

getCalibrationFilename()

Returns the filename of the calibration associated to the work cell.

Returns an empty string in case no calibration is associated.

To load the file use the getFilePath()+getCalibrationFilename() to get the absolute location

getControllers()

Returns all controllers in workcell :rtype: std::vector< rw::core::Ptr< rw::models::ControllerModel > > :return: List of all controllers

getDefaultState()

Returns a default State :rtype: State :return: default State

getDeref()

Member access operator.

getDevices()

Returns a reference to a vector with pointers to the Device(s) in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::Device > >

Returns

const vector with pointers to rw::models::Device(s).

getFilePath()

Returns the path of where the work cell is located

If the workcell is not loaded from file, it returns an empty string

getFilename()

Returns the full path and filename of the workcell.

If the workcell is loaded from file, then this method returns the full filename. Otherwise it returns an empty string.

getFrames()

Returns all frames in workcell :rtype: std::vector< rw::kinematics::Frame * > :return: List of all frames

getName()

The name of the workcell or the empty string if no name was provided. :rtype: string :return: the name of the workcell

getObjects()

Returns all object in the work cell

Return type

std::vector< rw::core::Ptr< rw::models::Object > >

Returns

All object in work cell

getPropertyMap(*args)

Overload 1:

Properties of this workcell


Overload 2:

Properties of this workcell :rtype: PropertyMap :return: the property map including the properties of this workcell

getSensors()

Returns all frames in workcell :rtype: std::vector< rw::core::Ptr< rw::sensor::SensorModel > > :return: List of all frames

getWorldFrame()

Returns pointer to the world frame

Return type

Frame

Returns

Pointer to the world frame

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_models.sdurw_models.WorkCellPtr(*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.

add(*args)

Overload 1: Add device to workcell


Overload 2: Add object to workcell


Overload 3: Add sensormodel to workcell


Overload 4: Add controllermodel to workcell

addDAF(frame, parent=0)

Adds dynamically attachable frame (DAF) frame with parent as parent.

If parent == NULL, then world is used as parent

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

  • parent (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Parent frame - uses World is parent == NULL

addDevice(device)

Adds a Device to the WorkCell.

Ownership of device is taken.

Parameters

device (rw::core::Ptr< rw::models::Device >) – [in] pointer to device.

addFrame(frame, parent=0)

Adds frame with parent as parent.

If parent == NULL, then world is used as parent

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

  • parent (rw::core::Ptr< rw::kinematics::Frame >, optional) – [in] Parent frame - uses World is parent == NULL

cptr()
deref()

The pointer stored in the object.

findController(name)

Returns controller with the specified name.

If multiple controlelrs has the same name, the first controller encountered will be returned. If no controller is found, the method returns NULL.

Parameters

name (string) – [in] name of controller.

Return type

rw::core::Ptr< rw::models::ControllerModel >

Returns

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

findDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::Device >

Returns

The device named name or NULL if no such device.

findFixedFrame(name)

Returns FixedFrame 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

FixedFrame

Returns

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

findFixedFrames()

Returns all FixedFrame. :rtype: std::vector< rw::kinematics::FixedFrame * > :return: all frames of type FixedFrame in the workcell

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.

findJointDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::JointDevice >

Returns

The device named name or NULL if no such device.

findJointDevices()

Returns a vector with pointers to the Device(s) with a specific type JointDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::JointDevice > >

Returns

vector with pointers to Device(s) of type T.

findMovableFrame(name)

Returns MovableFrame 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

MovableFrame

Returns

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

findMovableFrames()

Returns all MovableFrames. :rtype: std::vector< rw::kinematics::MovableFrame * > :return: all frames of type MovableFrames in the workcell

findObject(name)

The object named name of the workcell.

NULL is returned if there is no such object.

Parameters

name (string) – [in] The object name

Return type

rw::core::Ptr< rw::models::Object >

Returns

The object named name or NULL if no such object.

findParallelDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::ParallelDevice >

Returns

The device named name or NULL if no such device.

findParallelDevices()

Returns a vector with pointers to the Device(s) with a specific type ParallelDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::ParallelDevice > >

Returns

vector with pointers to Device(s) of type T.

findSensor(name)

Returns sensor with the specified name.

If multiple sensors has the same name, the first sensor encountered will be returned. If no sensor is found, the method returns NULL.

Parameters

name (string) – [in] name of sensor.

Return type

rw::core::Ptr< rw::sensor::SensorModel >

Returns

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

findSerialDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::SerialDevice >

Returns

The device named name or NULL if no such device.

findSerialDevices()

Returns a vector with pointers to the Device(s) with a specific type SerialDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::SerialDevice > >

Returns

vector with pointers to Device(s) of type T.

findTreeDevice(name)

The device named name of the workcell.

NULL is returned if there is no such device.

Parameters

name (string) – [in] The device name

Return type

rw::core::Ptr< rw::models::TreeDevice >

Returns

The device named name or NULL if no such device.

findTreeDevices()

Returns a vector with pointers to the Device(s) with a specific type TreeDevice in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::TreeDevice > >

Returns

vector with pointers to Device(s) of type T.

getCalibrationFilename()

Returns the filename of the calibration associated to the work cell.

Returns an empty string in case no calibration is associated.

To load the file use the getFilePath()+getCalibrationFilename() to get the absolute location

getCollisionSetup()

Returns collision setup associated to work cell :rtype: rw::proximity::CollisionSetup :return: Collision setup

getControllers()

Returns all controllers in workcell :rtype: std::vector< rw::core::Ptr< rw::models::ControllerModel > > :return: List of all controllers

getDefaultState()

Returns a default State :rtype: State :return: default State

getDeref()

Member access operator.

getDevices()

Returns a reference to a vector with pointers to the Device(s) in the WorkCell

Return type

std::vector< rw::core::Ptr< rw::models::Device > >

Returns

const vector with pointers to rw::models::Device(s).

getFilePath()

Returns the path of where the work cell is located

If the workcell is not loaded from file, it returns an empty string

getFilename()

Returns the full path and filename of the workcell.

If the workcell is loaded from file, then this method returns the full filename. Otherwise it returns an empty string.

getFrames()

Returns all frames in workcell :rtype: std::vector< rw::kinematics::Frame * > :return: List of all frames

getName()

The name of the workcell or the empty string if no name was provided. :rtype: string :return: the name of the workcell

getObjects()

Returns all object in the work cell

Return type

std::vector< rw::core::Ptr< rw::models::Object > >

Returns

All object in work cell

getPropertyMap(*args)

Overload 1:

Properties of this workcell


Overload 2:

Properties of this workcell :rtype: PropertyMap :return: the property map including the properties of this workcell

getSceneDescriptor()

Get the scene descriptor. :rtype: rw::core::Ptr< rw::graphics::SceneDescriptor > :return: the scene descriptor.

getSensors()

Returns all frames in workcell :rtype: std::vector< rw::core::Ptr< rw::sensor::SensorModel > > :return: List of all frames

getStateStructure()

gets the complete state structure of the workcell. :rtype: rw::core::Ptr< rw::kinematics::StateStructure > :return: the state structure of the workcell.

getWorldFrame()

Returns pointer to the world frame

Return type

Frame

Returns

Pointer to the world frame

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

Overload 1:

Removes frame from work cell

Parameters

frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to remove

Deprecated: Since January 2018. Please use remove(rw::core::Ptr<rw::kinematics::Frame>) instead.


Overload 2:

Remove object from workcell


Overload 3:

Remove device from workcell


Overload 4:

Remove sensormodel from workcell


Overload 5:

Remove controllermodel from workcell

removeObject(object)

Removes object from workcell

Parameters

object (Object) – [in] Object to remove

setCalibrationFilename(calibrationFilename)

Sets the filename of the calibration file

Parameters

calibrationFilename (string) – [in] Filename of calibration file with path relative to the work cell path.

setDefaultState(state)

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

setSceneDescriptor(scene)

Set the scene descriptor. :type scene: rw::core::Ptr< rw::graphics::SceneDescriptor > :param scene: [in] the scene descriptor.

property thisown

The membership flag

sdurw_models.sdurw_models.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.


Overload 30:

A Ptr that takes ownership over a raw pointer ptr.


Overload 31:

A Ptr that takes ownership over a raw pointer ptr.


Overload 32:

A Ptr that takes ownership over a raw pointer ptr.


Overload 33:

A Ptr that takes ownership over a raw pointer ptr.


Overload 34:

A Ptr that takes ownership over a raw pointer ptr.


Overload 35:

A Ptr that takes ownership over a raw pointer ptr.


Overload 36:

A Ptr that takes ownership over a raw pointer ptr.


Overload 37:

A Ptr that takes ownership over a raw pointer ptr.


Overload 38:

A Ptr that takes ownership over a raw pointer ptr.


Overload 39:

A Ptr that takes ownership over a raw pointer ptr.


Overload 40:

A Ptr that takes ownership over a raw pointer ptr.


Overload 41:

A Ptr that takes ownership over a raw pointer ptr.


Overload 42:

A Ptr that takes ownership over a raw pointer ptr.


Overload 43:

A Ptr that takes ownership over a raw pointer ptr.


Overload 44:

A Ptr that takes ownership over a raw pointer ptr.


Overload 45:

A Ptr that takes ownership over a raw pointer ptr.


Overload 46:

A Ptr that takes ownership over a raw pointer ptr.


Overload 47:

A Ptr that takes ownership over a raw pointer ptr.


Overload 48:

A Ptr that takes ownership over a raw pointer ptr.


Overload 49:

A Ptr that takes ownership over a raw pointer ptr.


Overload 50:

A Ptr that takes ownership over a raw pointer ptr.


Overload 51:

A Ptr that takes ownership over a raw pointer ptr.


Overload 52:

A Ptr that takes ownership over a raw pointer ptr.


Overload 53:

A Ptr that takes ownership over a raw pointer ptr.


Overload 54:

A Ptr that takes ownership over a raw pointer ptr.


Overload 55:

A Ptr that takes ownership over a raw pointer ptr.


Overload 56:

A Ptr that takes ownership over a raw pointer ptr.


Overload 57:

A Ptr that takes ownership over a raw pointer ptr.


Overload 58:

A Ptr that takes ownership over a raw pointer ptr.


Overload 59:

A Ptr that takes ownership over a raw pointer ptr.


Overload 60:

A Ptr that takes ownership over a raw pointer ptr.


Overload 61:

A Ptr that takes ownership over a raw pointer ptr.


Overload 62:

A Ptr that takes ownership over a raw pointer ptr.


Overload 63:

A Ptr that takes ownership over a raw pointer ptr.


Overload 64:

A Ptr that takes ownership over a raw pointer ptr.


Overload 65:

A Ptr that takes ownership over a raw pointer ptr.


Overload 66:

A Ptr that takes ownership over a raw pointer ptr.


Overload 67:

A Ptr that takes ownership over a raw pointer ptr.


Overload 68:

A Ptr that takes ownership over a raw pointer ptr.


Overload 69:

A Ptr that takes ownership over a raw pointer ptr.


Overload 70:

A Ptr that takes ownership over a raw pointer ptr.


Overload 71:

A Ptr that takes ownership over a raw pointer ptr.


Overload 72:

A Ptr that takes ownership over a raw pointer ptr.


Overload 73:

A Ptr that takes ownership over a raw pointer ptr.


Overload 74:

A Ptr that takes ownership over a raw pointer ptr.


Overload 75:

A Ptr that takes ownership over a raw pointer ptr.


Overload 76:

A Ptr that takes ownership over a raw pointer ptr.


Overload 77:

A Ptr that takes ownership over a raw pointer ptr.


Overload 78:

A Ptr that takes ownership over a raw pointer ptr.


Overload 79:

A Ptr that takes ownership over a raw pointer ptr.


Overload 80:

A Ptr that takes ownership over a raw pointer ptr.


Overload 81:

A Ptr that takes ownership over a raw pointer ptr.


Overload 82:

A Ptr that takes ownership over a raw pointer ptr.


Overload 83:

A Ptr that takes ownership over a raw pointer ptr.


Overload 84:

A Ptr that takes ownership over a raw pointer ptr.


Overload 85:

A Ptr that takes ownership over a raw pointer ptr.


Overload 86:

A Ptr that takes ownership over a raw pointer ptr.


Overload 87:

A Ptr that takes ownership over a raw pointer ptr.


Overload 88:

A Ptr that takes ownership over a raw pointer ptr.


Overload 89:

A Ptr that takes ownership over a raw pointer ptr.


Overload 90:

A Ptr that takes ownership over a raw pointer ptr.


Overload 91:

A Ptr that takes ownership over a raw pointer ptr.


Overload 92:

A Ptr that takes ownership over a raw pointer ptr.


Overload 93:

A Ptr that takes ownership over a raw pointer ptr.


Overload 94:

A Ptr that takes ownership over a raw pointer ptr.


Overload 95:

A Ptr that takes ownership over a raw pointer ptr.


Overload 96:

A Ptr that takes ownership over a raw pointer ptr.


Overload 97:

A Ptr that takes ownership over a raw pointer ptr.


Overload 98:

A Ptr that takes ownership over a raw pointer ptr.


Overload 99:

A Ptr that takes ownership over a raw pointer ptr.


Overload 100:

A Ptr that takes ownership over a raw pointer ptr.


Overload 101:

A Ptr that takes ownership over a raw pointer ptr.


Overload 102:

A Ptr that takes ownership over a raw pointer ptr.


Overload 103:

A Ptr that takes ownership over a raw pointer ptr.


Overload 104:

A Ptr that takes ownership over a raw pointer ptr.


Overload 105:

A Ptr that takes ownership over a raw pointer ptr.


Overload 106:

A Ptr that takes ownership over a raw pointer ptr.


Overload 107:

A Ptr that takes ownership over a raw pointer ptr.


Overload 108:

A Ptr that takes ownership over a raw pointer ptr.


Overload 109:

A Ptr that takes ownership over a raw pointer ptr.


Overload 110:

A Ptr that takes ownership over a raw pointer ptr.


Overload 111:

A Ptr that takes ownership over a raw pointer ptr.


Overload 112:

A Ptr that takes ownership over a raw pointer ptr.


Overload 113:

A Ptr that takes ownership over a raw pointer ptr.


Overload 114:

A Ptr that takes ownership over a raw pointer ptr.


Overload 115:

A Ptr that takes ownership over a raw pointer ptr.


Overload 116:

A Ptr that takes ownership over a raw pointer ptr.


Overload 117:

A Ptr that takes ownership over a raw pointer ptr.


Overload 118:

A Ptr that takes ownership over a raw pointer ptr.


Overload 119:

A Ptr that takes ownership over a raw pointer ptr.


Overload 120:

A Ptr that takes ownership over a raw pointer ptr.


Overload 121:

A Ptr that takes ownership over a raw pointer ptr.


Overload 122:

A Ptr that takes ownership over a raw pointer ptr.


Overload 123:

A Ptr that takes ownership over a raw pointer ptr.


Overload 124:

A Ptr that takes ownership over a raw pointer ptr.


Overload 125:

A Ptr that takes ownership over a raw pointer ptr.


Overload 126:

A Ptr that takes ownership over a raw pointer ptr.


Overload 127:

A Ptr that takes ownership over a raw pointer ptr.


Overload 128:

A Ptr that takes ownership over a raw pointer ptr.


Overload 129:

A Ptr that takes ownership over a raw pointer ptr.


Overload 130:

A Ptr that takes ownership over a raw pointer ptr.


Overload 131:

A Ptr that takes ownership over a raw pointer ptr.


Overload 132:

A Ptr that takes ownership over a raw pointer ptr.


Overload 133:

A Ptr that takes ownership over a raw pointer ptr.


Overload 134:

A Ptr that takes ownership over a raw pointer ptr.


Overload 135:

A Ptr that takes ownership over a raw pointer ptr.


Overload 136:

A Ptr that takes ownership over a raw pointer ptr.


Overload 137:

A Ptr that takes ownership over a raw pointer ptr.


Overload 138:

A Ptr that takes ownership over a raw pointer ptr.


Overload 139:

A Ptr that takes ownership over a raw pointer ptr.


Overload 140:

A Ptr that takes ownership over a raw pointer ptr.


Overload 141:

A Ptr that takes ownership over a raw pointer ptr.


Overload 142:

A Ptr that takes ownership over a raw pointer ptr.


Overload 143:

A Ptr that takes ownership over a raw pointer ptr.


Overload 144:

A Ptr that takes ownership over a raw pointer ptr.


Overload 145:

A Ptr that takes ownership over a raw pointer ptr.


Overload 146:

A Ptr that takes ownership over a raw pointer ptr.


Overload 147:

A Ptr that takes ownership over a raw pointer ptr.


Overload 148:

A Ptr that takes ownership over a raw pointer ptr.


Overload 149:

A Ptr that takes ownership over a raw pointer ptr.


Overload 150:

A Ptr that takes ownership over a raw pointer ptr.


Overload 151:

A Ptr that takes ownership over a raw pointer ptr.


Overload 152:

A Ptr that takes ownership over a raw pointer ptr.


Overload 153:

A Ptr that takes ownership over a raw pointer ptr.


Overload 154:

A Ptr that takes ownership over a raw pointer ptr.


Overload 155:

A Ptr that takes ownership over a raw pointer ptr.


Overload 156:

A Ptr that takes ownership over a raw pointer ptr.


Overload 157:

A Ptr that takes ownership over a raw pointer ptr.


Overload 158:

A Ptr that takes ownership over a raw pointer ptr.


Overload 159:

A Ptr that takes ownership over a raw pointer ptr.


Overload 160:

A Ptr that takes ownership over a raw pointer ptr.


Overload 161:

A Ptr that takes ownership over a raw pointer ptr.


Overload 162:

A Ptr that takes ownership over a raw pointer ptr.


Overload 163:

A Ptr that takes ownership over a raw pointer ptr.