sdurw_models module

class sdurw_models.CompositeDevice(*args)

Bases: sdurw_models.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 (Frame) – [in] the base of the device

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

  • end (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 (Frame) – [in] the base of the device

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

  • ends (std::vector< rw::kinematics::Frame *,std::allocator< 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.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 (Frame) – [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 *,std::allocator< 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 *,std::allocator< 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.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 (Frame) – [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 *,std::allocator< 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 *,std::allocator< 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.CompositeJointDevice(*args)

Bases: sdurw_models.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 (Frame) – [in] the base of the device

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

  • end (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 (Frame) – [in] the base of the device

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

  • ends (std::vector< rw::kinematics::Frame *,std::allocator< 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.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 (Frame) – [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 *,std::allocator< 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 *,std::allocator< 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.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 (Frame) – [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 *,std::allocator< 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 *,std::allocator< 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.ControllerModel(*args)

Bases: sdurw_kinematics.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: 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: 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 (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.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.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 (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.ControllerModelPtrVector(*args)

Bases: object

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

class 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 ! :param theta: [in] \(\theta_{i-1}\)

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,std::allocator< 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.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.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,std::allocator< 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.DHParameterSetVector(*args)

Bases: object

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

sdurw_models.DHParameterSet_get(*args)
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,std::allocator< rw::models::DHParameterSet > >

Returns

The set of DH parameters

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

Bases: sdurw_models.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: 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 (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 (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 >,std::allocator< 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.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 >,std::allocator< 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,std::allocator< rw::geometry::Geometry::Ptr > > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr,std::allocator< 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,std::allocator< rw::geometry::Model3D::Ptr > > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr,std::allocator< 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.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: 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 >,std::allocator< 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 *,std::allocator< rw::kinematics::Frame * > > :return: a vector of frames

getGeometry(*args)

Overload 1:

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


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr,std::allocator< 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,std::allocator< rw::geometry::Model3D::Ptr > > :return: models for vizualization


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr,std::allocator< 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.DeformableObjectPtrVector(*args)

Bases: object

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

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

Bases: sdurw_models.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.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: Frame :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.

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


Overload 3:

State&)

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.

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.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 (Frame) – [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: Frame :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.


Overload 3:

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,std::allocator< 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)
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


Overload 3:

State&)

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

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

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.

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

Bases: sdurw_models.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.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: Frame :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

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


Overload 3:

State&)

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.

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.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 (Frame) – [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: Frame :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.


Overload 3:

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,std::allocator< 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)
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


Overload 3:

State&)

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

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

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.

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

Bases: sdurw_models.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.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: Frame :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

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


Overload 3:

State&)

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.

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.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 (Frame) – [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: Frame :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.


Overload 3:

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,std::allocator< 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)
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


Overload 3:

State&)

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

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

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.

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

Bases: sdurw_kinematics.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)

Initialize self. See help(type(self)) for accurate signature.

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 (Frame) – [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 *,std::allocator< 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.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 (Frame) – [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 *,std::allocator< 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.DeviceJacobianCalculator(devices, base, tcps, state)

Bases: sdurw_models.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 >,std::allocator< rw::core::Ptr< rw::models::Device > > >) – [in] The device to calculate for

  • base (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 *,std::allocator< 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.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.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.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 (Frame) – [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 *,std::allocator< 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.DevicePtrVector(*args)

Bases: object

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

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

Bases: object

JacobianCalculator provides an interface for obtaining a Jacobian

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

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

Bases: object

Primitive utilities for computing jacobians for joints of various types.

__init__()

Initialize self. See help(type(self)) for accurate signature.

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.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.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.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.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.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.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.Joint(*args, **kwargs)

Bases: sdurw_kinematics.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(bounds)

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

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.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: Frame :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.

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


Overload 3:

State&)

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.

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

Bases: sdurw_models.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: Frame :param base: [in] the base of the device :type end: Frame :param end: [in] the end (or tool) of the device :type joints: std::vector< rw::models::Joint *,std::allocator< 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 *,std::allocator< 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.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 (Frame) – [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 *,std::allocator< 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 *,std::allocator< 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.JointDeviceJacobianCalculator(device, base, tcps, state)

Bases: sdurw_models.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 (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 *,std::allocator< 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.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.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.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 (Frame) – [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 *,std::allocator< 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 *,std::allocator< 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.JointDevicePtrVector(*args)

Bases: object

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

class 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 (Frame) – [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: Frame :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.


Overload 3:

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,std::allocator< 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)
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


Overload 3:

State&)

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

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

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.

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

Bases: sdurw_models.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.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.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.Models

Bases: object

Utility functions for the rw::models module.

__init__()

Initialize self. See help(type(self)) for accurate signature.

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,std::allocator< 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,std::allocator< 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,std::allocator< 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,std::allocator< 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=None, end=None)

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 (Frame) – [in] Base frame for the new device.

  • end (Frame) – [in] End frame for the new device.

property thisown

The membership flag

class 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.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,std::allocator< 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,std::allocator< 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,std::allocator< 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,std::allocator< 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=None, end=None)

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 (Frame) – [in] Base frame for the new device.

  • end (Frame) – [in] End frame for the new device.

property thisown

The membership flag

sdurw_models.Models_findAllFrames(workcell)

All frames of the workcell.

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.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.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,std::allocator< 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,std::allocator< 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,std::allocator< 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,std::allocator< rw::kinematics::State > >

param result

[out] Sequence of states - one state for each configuration.

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.Models_makeDevice(device, state, base=None, end=None)

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 (Frame) – [in] Base frame for the new device.

  • end (Frame) – [in] End frame for the new device.

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

Bases: sdurw_kinematics.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)

Initialize self. See help(type(self)) for accurate signature.

addFrame(frame)

associate a frame to this Object. :type frame: 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 *,std::allocator< rw::kinematics::Frame * > > :return: a vector of frames

getGeometry(*args)

Overload 1:

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


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr,std::allocator< 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 :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

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


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr,std::allocator< 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.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,std::allocator< rw::geometry::Geometry::Ptr > > :return: geometry for collision detection


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr,std::allocator< 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 :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

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


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr,std::allocator< 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.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: 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 *,std::allocator< rw::kinematics::Frame * > > :return: a vector of frames

getGeometry(*args)

Overload 1:

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


Overload 2:

get geometry of this object :rtype: std::vector< rw::geometry::Geometry::Ptr,std::allocator< 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 :rtype: float :return: mass in kilo grams

getModels(*args)

Overload 1:

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


Overload 2:

get visualization models of this object :rtype: std::vector< rw::geometry::Model3D::Ptr,std::allocator< 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.ObjectPtrVector(*args)

Bases: object

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

class sdurw_models.ParallelDevice(*args)

Bases: sdurw_models.JointDevice

This class defines the interface for Parallel devices.

__init__(*args)

Overload 1:

Constructor

Parameters
  • legs (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: Frame :param base: [in] the base frame. :type end: Frame :param end: [in] the end frame. :type joints: std::vector< rw::models::Joint *,std::allocator< 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,std::allocator< 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 (Frame) – [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 *,std::allocator< 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< rw::models::ParallelDevice::Legs,std::allocator< rw::models::ParallelDevice::Legs > > :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,std::allocator< 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.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 *,std::allocator< 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 *,std::allocator< 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 *,std::allocator< rw::models::Joint * > > :return: all joints

getJunctions()

Get the junctions of the device. :rtype: std::vector< rw::models::ParallelDevice::Legs,std::allocator< rw::models::ParallelDevice::Legs > > :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,std::allocator< 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.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 *,std::allocator< 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 *,std::allocator< 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 *,std::allocator< rw::models::Joint * > > :return: all joints

getJunctions()

Get the junctions of the device. :rtype: std::vector< rw::models::ParallelDevice::Legs,std::allocator< rw::models::ParallelDevice::Legs > > :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,std::allocator< 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.ParallelLeg(frames)

Bases: object

Class representing a single leg in a ParallelDevice

__init__(frames)

Constructs leg from frames :type frames: std::vector< rw::kinematics::Frame *,std::allocator< 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: Frame :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: Frame :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 *,std::allocator< 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 *,std::allocator< 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 *,std::allocator< 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.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: Frame :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: Frame :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 *,std::allocator< 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.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: Frame :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: Frame :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 *,std::allocator< 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 *,std::allocator< 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 *,std::allocator< 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.PrismaticJoint(name, transform)

Bases: sdurw_models.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.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: Frame :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.

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


Overload 3:

State&)

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.

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.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 (Frame) – [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: Frame :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.


Overload 3:

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,std::allocator< 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)
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


Overload 3:

State&)

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

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

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.

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.PrismaticSphericalJoint(name, transform)

Bases: sdurw_models.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.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: Frame :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