sdurw module

class sdurw.BlendQ(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t)
dx(t)
tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendQPtr(*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.

ddx(t)
deref()

The pointer stored in the object.

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

tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendR1(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t)
dx(t)
tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendR1Ptr(*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.

ddx(t)
deref()

The pointer stored in the object.

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

tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendR2(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t)
dx(t)
tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendR2Ptr(*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.

ddx(t)
deref()

The pointer stored in the object.

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

tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendR3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t)
dx(t)
tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendR3Ptr(*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.

ddx(t)
deref()

The pointer stored in the object.

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

tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendSE3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t)
dx(t)
tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendSE3Ptr(*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.

ddx(t)
deref()

The pointer stored in the object.

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

tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendSO3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t)
dx(t)
tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.BlendSO3Ptr(*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.

ddx(t)
deref()

The pointer stored in the object.

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

tau1()
tau2()
property thisown

The membership flag

x(t)
class sdurw.Box(*args)

Bases: sdurw.Primitive

__init__(*args)

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

createMesh(resolution)
getParameters()
getType()

the type of this primitive

Return type

int

Returns

the type of primitive.

property thisown

The membership flag

class sdurw.Camera(*args, **kwargs)

Bases: sdurw.Sensor

The Camera class defines a generel interface to a camera. A great deal of the interface resembles the DCAM standard since DCAM allready defines a very wide interface.

typical usage: Camera c; // setup camera features modes and so on c.initialize(); c.start(); // acquire images c.stop();

__init__(*args, **kwargs)

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

acquire()

aquires an image from the camera. This method is not blocking. Use isImageReady to poll for completion of acquire.

addListener(listener)

adds a CameraListener to this camera :type listener: CameraListener :param listener: [in] the CameraListener that is to be added :rtype: boolean :return: true if listener was added succesfully, false otherwise

getFrameRate()

returns the framerate that this camera is setup with

Return type

float

Returns

the framerate in frames per second

getGain()

Get actual gain value. Note: If gain is not available then a dummy implementation returning -1 is used and an error message is produced.

Return type

float

Returns

Gain value.

getHeight()

get width of the captured images

Return type

int

Returns

width

getImage()

returns the last image acquired from the camera. This method is not blocking, if no image has been acquired yet an empty image is returned. The image returned can for some specific drivers be read only.

Return type

Image

Returns

last image captured from camera.

getModelInfo()

returns the camera model information (version, type, size, etc.)

Return type

string

Returns

camera model information

getShutter()

Get actual shutter value. Note: If shutter is not available then a dummy implementation will throw an error message.

Return type

float

Returns

shutter value in micro-seconds.

getShutterBounds()

gets the shutter bounds. Note: If shutter is not available then a dummy implementation will throw an error message. :rtype: std::pair< double,double > :return: first value is the min bound and second value is the max bound

getWidth()

get width of the captured images

Return type

int

Returns

width

initialize()

initializes the camera to the current settings (CaptureMode,ColorMode,etc.)

Return type

boolean

Returns

true if initialization is succesfully, false otherwise.

isGainAvailable()

Check if gain is available.

Return type

boolean

Returns

True if zoom is available

isImageReady()

tests whether a image has been acquired

Return type

boolean

Returns

true if an image has been acquired, false otherwise.

isInitialized()

returns whether this camera is initialized or not.

Return type

boolean

Returns

true if intialized, false otherwise

isShutterAvailable()

Check if shutter is available.

Return type

boolean

Returns

True if shutter is available

isStarted()

returns whether this camera is started or not.

Return type

boolean

Returns

true if started, false otherwise

removeListener(listener)

removes a CameraListener from this cameras listener list. :type listener: CameraListener :param listener: [in] the listener that is to be removed :rtype: boolean :return: true if listener was removed succesfully, false otherwise.

setFrameRate(framerate)

sets the framerate of this camera. If the framerate is not supported the closest supported framerate is choosen.

Parameters

framerate (float) – [in] the framerate

setGain(Value)

Set gain value. If the given value is not possible the nearest value are choosen. Note: If gain is not available then a dummy implementation returning -1 is used and an error message is produced.

Parameters

Value (float) – New gain value.

Return type

float

Returns

New nearest gain value.

setShutter(Value)

Set shutter value. If the given value is not possible the nearest value are choosen. Note: If shutter is not available then a dummy implementation will throw an error message.

Parameters

Value (float) – New shutter value.

start()

starts this camera, if the camera has not been initialized the initialize function will be called.

Return type

boolean

Returns

true if camera was successfully started, false otherwise

stop()

stops this camera. When the camera is stopped it can be reinitialized using initialize()

property thisown

The membership flag

class sdurw.CameraFirewire(*args, **kwargs)

Bases: sdurw.Camera

The Camera class defines a generel interface to a camera. A great deal of the interface resembles the DCAM standard since DCAM allready defines a very wide interface.

typical usage: Camera c; // setup camera features modes and so on c.initialize(); c.start(); // acquire images c.stop();

AUTOEXPOSURE = 11
BRIGHTNESS = 10
CONTINUES = 1
CONTINUES_BUFFERED = 2
F7MODE0 = 0
F7MODE1 = 1
F7MODE2 = 2
F7MODE3 = 3
F7MODE4 = 4
F7MODE5 = 5
F7MODE6 = 6
F7MODE7 = 7
FAILURE = 1
FOCUS = 3
GAIN = 2
GAMMA = 9
HUE = 5
IRIS = 4
M1024x768 = 4
M1280x960 = 5
M1600x1200 = 6
M160x120 = 0
M320x240 = 1
M640x480 = 2
M800x600 = 3
MFORMAT7 = 7
MODE0 = 0
MODE1 = 1
MODE14 = 6
MODE15 = 7
MODE2 = 2
MODE3 = 3
MODE4 = 4
MODE5 = 5
MONO16 = 5
MONO16S = 7
MONO8 = 0
NOT_INITIALIZED = 2
NOT_STARTED = 3
RAW16 = 10
RAW8 = 9
RGB16 = 6
RGB16S = 8
RGB24 = 11
RGB8 = 4
SATURATION = 8
SHARPNESS = 7
SHUTTER = 0
SINGLE_SHOT = 0
SUCCES = 0
UNSUPPORTED_CAPTURE_MODE = 4
UNSUPPORTED_FEATURE = 5
WHITEBALANCE = 6
YUV411 = 1
YUV422 = 2
YUV444 = 3
ZOOM = 1
__init__(*args, **kwargs)

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

getCaptureMode()

returns the CaptureMode of this camera :rtype: int :return: the camera capturemode

getCapturePolicy()

returns the capture policy of this camera. :rtype: int :return: capture policy of the camera

getColorMode()

returns the CaptureMode of this camera :rtype: int :return: the camera capturemode

getError()

returns the errorcode of the latest error. If no error has occured then SUCCES is returned. :rtype: int :return: the error code

getFeature(setting)

returns the value of the specified camera setting. If the camera is not initialized or the setting is unsupported -1 is returned. :type setting: int :param setting: [in] the CameraFeature :rtype: float :return: value of the setting if setting is supported and camera is

initilized, else -1 is returned.

isError()

tests whether this camera is in an error state. :rtype: boolean :return: true if camera is in error state, false otherwise

isFeatureAvailable(option)

returns whether the specified camera option is supported by the camera. :type option: int :param option: [in] the specific CameraOption :rtype: boolean :return: true if the option is available, false otherwise.

setCaptureMode(mode)

sets the CaptureMode of this camera. :type mode: int :param mode: [in] the wanted capture mode :rtype: boolean :return: true if CaptureMode was set successfully, false otherwise

setCapturePolicy(policy)

sets the capture policy of this camera :type policy: int :param policy: [in] the capture policy :rtype: boolean :return: true if capture policy was set succesfully, false otherwise

setColorMode(mode)

sets the CaptureMode of this camera. :type mode: int :param mode: [in] the wanted capture mode :rtype: boolean :return: true if CaptureMode was set successfully, false otherwise

setFeature(setting, value)

sets the value of the specified camera setting. If the camera is not initialized or the setting is unsupported false is returned. :type setting: int :param setting: [in] the CameraFeature :type value: float :param value: [in] the value of the feature :rtype: boolean :return: true if the setting was succesfully changed, false otherwise.

property thisown

The membership flag

class sdurw.CameraListener(*args, **kwargs)

Bases: object

interface used for listening for camera events

__init__(*args, **kwargs)

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

notifyChanged()

called when the camera wish to signal a change.

property thisown

The membership flag

class sdurw.CameraMatrixd(r11, r12, r13, r21, r22, r23, r31, r32, r33)

Bases: object

The PerspectiveTransform2D is a perspective transform in 2D. The homographic transform can be used to map one arbitrary 2D quadrilateral into another.

__init__(r11, r12, r13, r21, r22, r23, r31, r32, r33)

constructor

e()

Returns reference to the internal camera matrix

Return type

Eigen::Matrix< double,4,4 >

Returns

\(\mathbf{M}\in SO(3)\)

property thisown

The membership flag

class sdurw.CameraModel(*args)

Bases: sdurw.SensorModel

The CameraModel class defines a generel pinhole camera model where camera parameters and state values are stored.

__init__(*args)

constructor

Parameters
  • projection (ProjectionMatrix) – [in] pinhole projection model

  • name (string) – [in] name of camera

  • frame (Frame) – [in] frame that camera is attached/referenced to

  • modelInfo (string) – [in] text description of the camera

getFarClippingPlane()

get far clipping plane :rtype: float :return: distance to far clipping plane in meters.

getFieldOfViewX()

get horisontal field of view. :rtype: float :return: field of view in degrees

getFieldOfViewY()

get Vertical field of view. :rtype: float :return: field of view in degrees

getImage(state)

returns the image if it has been saved in the State. Else null is returned. :type state: State :param state: [in] which state the image is taken from. :rtype: rw::core::Ptr< Image > :return: last image captured from camera.

getNearClippingPlane()

get near clipping plane :rtype: float :return: distance to near clipping plane in meters.

getProjectionMatrix()

get the camera projection matrix

setImage(img, state)

set the image in the state

Parameters
  • img (rw::core::Ptr< Image >) – [in] image to set in state

  • state (State) – [in/out] the state in which to set the image.

property thisown

The membership flag

class sdurw.CameraModelCPtr(*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 sensor

Return type

string

Returns

reference to this sensors description

getFarClippingPlane()

get far clipping plane :rtype: float :return: distance to far clipping plane in meters.

getFieldOfViewX()

get horisontal field of view. :rtype: float :return: field of view in degrees

getFieldOfViewY()

get Vertical field of view. :rtype: float :return: field of view in degrees

getFrame()

The frame to which the sensor is attached.

The frame can be NULL.

getName()

returns the name of this sensor

Return type

string

Returns

name of sensor

getNearClippingPlane()

get near clipping plane :rtype: float :return: distance to near clipping plane in meters.

getProjectionMatrix()

get the camera projection matrix

getStateStructure(*args)

Overload 1:

Get the state structure. :rtype: rw::core::Ptr< StateStructure > :return: the state structure.


Overload 2:

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.CameraModelPtr(*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 sensor should be attached

Parameters

frame (Frame) – The frame, which can be NULL

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getDescription()

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getFarClippingPlane()

get far clipping plane :rtype: float :return: distance to far clipping plane in meters.

getFieldOfViewX()

get horisontal field of view. :rtype: float :return: field of view in degrees

getFieldOfViewY()

get Vertical field of view. :rtype: float :return: field of view in degrees

getFrame()

The frame to which the sensor is attached.

The frame can be NULL.

getImage(state)

returns the image if it has been saved in the State. Else null is returned. :type state: State :param state: [in] which state the image is taken from. :rtype: rw::core::Ptr< Image > :return: last image captured from camera.

getName()

returns the name of this sensor

Return type

string

Returns

name of sensor

getNearClippingPlane()

get near clipping plane :rtype: float :return: distance to near clipping plane in meters.

getProjectionMatrix()

get the camera projection matrix

getPropertyMap()

gets the propertymap of this sensor :rtype: PropertyMap :return: reference to rw::core::PropertyMap

getStateStructure(*args)

Overload 1:

Get the state structure. :rtype: rw::core::Ptr< StateStructure > :return: the state structure.


Overload 2:

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 sensor

Parameters

description (string) – [in] description of this sensor

setImage(img, state)

set the image in the state

Parameters
  • img (rw::core::Ptr< Image >) – [in] image to set in state

  • state (State) – [in/out] the state in which to set the image.

setName(name)

sets the name of this sensor

Parameters

name (string) – [in] name of this sensor

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

class sdurw.CameraPtr(*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.

acquire()

aquires an image from the camera. This method is not blocking. Use isImageReady to poll for completion of acquire.

addListener(listener)

adds a CameraListener to this camera :type listener: CameraListener :param listener: [in] the CameraListener that is to be added :rtype: boolean :return: true if listener was added succesfully, false otherwise

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getDescription()

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getFrameRate()

returns the framerate that this camera is setup with

Return type

float

Returns

the framerate in frames per second

getGain()

Get actual gain value. Note: If gain is not available then a dummy implementation returning -1 is used and an error message is produced.

Return type

float

Returns

Gain value.

getHeight()

get width of the captured images

Return type

int

Returns

width

getImage()

returns the last image acquired from the camera. This method is not blocking, if no image has been acquired yet an empty image is returned. The image returned can for some specific drivers be read only.

Return type

Image

Returns

last image captured from camera.

getModelInfo()

returns the camera model information (version, type, size, etc.)

Return type

string

Returns

camera model information

getName()

returns the name of this sensor

Return type

string

Returns

name of sensor

getPropertyMap()

gets the propertymap of this sensor

getSensorModel()

The frame to which the sensor is attached.

The frame can be NULL. :rtype: rw::core::Ptr< SensorModel > :return: pointer to sensor model

getShutter()

Get actual shutter value. Note: If shutter is not available then a dummy implementation will throw an error message.

Return type

float

Returns

shutter value in micro-seconds.

getShutterBounds()

gets the shutter bounds. Note: If shutter is not available then a dummy implementation will throw an error message. :rtype: std::pair< double,double > :return: first value is the min bound and second value is the max bound

getWidth()

get width of the captured images

Return type

int

Returns

width

initialize()

initializes the camera to the current settings (CaptureMode,ColorMode,etc.)

Return type

boolean

Returns

true if initialization is succesfully, false otherwise.

isGainAvailable()

Check if gain is available.

Return type

boolean

Returns

True if zoom is available

isImageReady()

tests whether a image has been acquired

Return type

boolean

Returns

true if an image has been acquired, false otherwise.

isInitialized()

returns whether this camera is initialized or not.

Return type

boolean

Returns

true if intialized, 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.

isShutterAvailable()

Check if shutter is available.

Return type

boolean

Returns

True if shutter is available

isStarted()

returns whether this camera is started or not.

Return type

boolean

Returns

true if started, false otherwise

removeListener(listener)

removes a CameraListener from this cameras listener list. :type listener: CameraListener :param listener: [in] the listener that is to be removed :rtype: boolean :return: true if listener was removed succesfully, false otherwise.

setFrameRate(framerate)

sets the framerate of this camera. If the framerate is not supported the closest supported framerate is choosen.

Parameters

framerate (float) – [in] the framerate

setGain(Value)

Set gain value. If the given value is not possible the nearest value are choosen. Note: If gain is not available then a dummy implementation returning -1 is used and an error message is produced.

Parameters

Value (float) – New gain value.

Return type

float

Returns

New nearest gain value.

setSensorModel(smodel)

Sets the frame to which the sensor should be attached

Parameters

smodel (rw::core::Ptr< SensorModel >) – set the sensor model

setShutter(Value)

Set shutter value. If the given value is not possible the nearest value are choosen. Note: If shutter is not available then a dummy implementation will throw an error message.

Parameters

Value (float) – New shutter value.

start()

starts this camera, if the camera has not been initialized the initialize function will be called.

Return type

boolean

Returns

true if camera was successfully started, false otherwise

stop()

stops this camera. When the camera is stopped it can be reinitialized using initialize()

property thisown

The membership flag

class sdurw.ClosedFormIK(*args, **kwargs)

Bases: sdurw.InvKinSolver

Interface for closed form inverse kinematics algorithms.

The ClosedFormIK interface provides an interface for calculating the inverse kinematics of a device.

By default it solves the problem beginning at the robot base and ending with the frame defined as the end of the devices, and which is accessible through the Device::getEnd() method.

__init__(*args, **kwargs)

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

static make(device, state)

Closed-form IK solver for a device.

The device must be a serial device with 6 revolute joints described by DH parameters.

The IK solver is currently implemented in terms of PieperSolver. See the documentation of PieperSolver for the specific requirements for the DH parameters.

An exception is thrown if closed-form IK for the device is not supported, except that all such cases are currently not discovered. You should check for yourself that the closed-form IK for the device is correct.

property thisown

The membership flag

class sdurw.ClosedFormIKPtr(*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.

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

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.

make(device, state)

Closed-form IK solver for a device.

The device must be a serial device with 6 revolute joints described by DH parameters.

The IK solver is currently implemented in terms of PieperSolver. See the documentation of PieperSolver for the specific requirements for the DH parameters.

An exception is thrown if closed-form IK for the device is not supported, except that all such cases are currently not discovered. You should check for yourself that the closed-form IK for the device is correct.

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

solve(baseTend, state)

Calculates the inverse kinematics

Given a desired transform and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.

property thisown

The membership flag

class sdurw.ClosedFormIKSolverKukaIIWA(device, state)

Bases: sdurw.ClosedFormIK

Analytical inverse solver for the Kuka LBR IIWA 7 R800 robot.

Notice that this is a 7 DOF robot and that there is an infinite number of solutions. The extra DOF means that the middle joint of the robot is able to move in a circle. This solver will choose a point on this circle randomly and return up to 8 possible solutions.

__init__(device, state)

Construct new closed form solver for a Kuka 7 DOF IIWA robot.

Parameters
  • device (rw::core::Ptr< SerialDevice const >) – [in] the device.

  • state (State) – [in] the state to get the frame structure and extract the dimensions from.

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

solve(*args)

Overload 1:

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.


Overload 2:

Find inverse kinematic solutions deterministically by pulling joint 4 as much in the given direction as possible.

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations.

  • dir4 (rw::math::Vector3D< double >) – [in] unit vector giving the direction to pull joint 4 in (given in base coordinate system).

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of up to 8 solutions. Notice that the list may be empty.

property thisown

The membership flag

class sdurw.ClosedFormIKSolverKukaIIWAPtr(*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.

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

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.

make(device, state)

Closed-form IK solver for a device.

The device must be a serial device with 6 revolute joints described by DH parameters.

The IK solver is currently implemented in terms of PieperSolver. See the documentation of PieperSolver for the specific requirements for the DH parameters.

An exception is thrown if closed-form IK for the device is not supported, except that all such cases are currently not discovered. You should check for yourself that the closed-form IK for the device is correct.

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

solve(*args)

Overload 1:

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.


Overload 2:

Find inverse kinematic solutions deterministically by pulling joint 4 as much in the given direction as possible.

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations.

  • dir4 (rw::math::Vector3D< double >) – [in] unit vector giving the direction to pull joint 4 in (given in base coordinate system).

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of up to 8 solutions. Notice that the list may be empty.

property thisown

The membership flag

class sdurw.ClosedFormIKSolverUR(device, state)

Bases: sdurw.ClosedFormIK

Analytical inverse kinematics solver to the kinematics of a Universal Robots.

__init__(device, state)

Construct new closed form solver for a Universal Robot.

Notes: The dimensions will be automatically extracted from the device, using an arbitrary state.

Parameters
  • device (rw::core::Ptr< SerialDevice const >) – [in] the device.

  • state (State) – [in] the state to use to extract dimensions.

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

solve(baseTend, state)

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.

property thisown

The membership flag

class sdurw.ClosedFormIKSolverURCPtr(*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.

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

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.

solve(baseTend, state)

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.

property thisown

The membership flag

class sdurw.ClosedFormIKSolverURPtr(*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.

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

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.

make(device, state)

Closed-form IK solver for a device.

The device must be a serial device with 6 revolute joints described by DH parameters.

The IK solver is currently implemented in terms of PieperSolver. See the documentation of PieperSolver for the specific requirements for the DH parameters.

An exception is thrown if closed-form IK for the device is not supported, except that all such cases are currently not discovered. You should check for yourself that the closed-form IK for the device is correct.

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

solve(baseTend, state)

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.

property thisown

The membership flag

sdurw.ClosedFormIK_make(device, state)

Closed-form IK solver for a device.

The device must be a serial device with 6 revolute joints described by DH parameters.

The IK solver is currently implemented in terms of PieperSolver. See the documentation of PieperSolver for the specific requirements for the DH parameters.

An exception is thrown if closed-form IK for the device is not supported, except that all such cases are currently not discovered. You should check for yourself that the closed-form IK for the device is correct.

class sdurw.CollisionDetector(*args)

Bases: object

The CollisionDetector implements an efficient way of checking a

complete frame tree for collisions.

It relies on a BroadPhaseDetector to do initial filtering which removes obviously not colliding frame pairs.

After the filtering the remaining frame pairs are tested for collision using an CollisionStrategy which is a narrow phase collision detector.

The collision detector does not dictate a specific detection strategy or algorithm, instead it relies on the CollisionStrategy interface for the actual collision checking between two frames.

Notes: The collision detector is not thread safe and as such should not be used by multiple threads at a time.

__init__(*args)

Overload 1:

Collision detector for a workcell with only broad-phase collision checking.

The default collision setup stored in the workcell is used for broad phase collision filtering as a static filter list.

Notice that no narrow phase checking is performed. If broad-phase filter returns any frame-pairs, this will be taken as a collision.

Parameters

workcell (rw::core::Ptr< WorkCell >) – [in] the workcell.


Overload 2:

Collision detector for a workcell.

The collision detector is initialized with the strategy . Notice that the collision detector will create and store models inside the strategy .

The default collision setup stored in the workcell is used for broad phase collision filtering as a static filter list.

Parameters
  • workcell (rw::core::Ptr< WorkCell >) – [in] the workcell.

  • strategy (rw::core::Ptr< CollisionStrategy >) – [in/out] the strategy for narrow-phase checking. The strategy will have models added to it.


Overload 3:

Collision detector for a workcell. Collision checking is done for the provided collision setup alone.

Parameters
  • workcell (rw::core::Ptr< WorkCell >) – [in] the workcell.

  • strategy (rw::core::Ptr< CollisionStrategy >) – [in/out] the strategy for narrow-phase checking. The strategy will have models added to it.

  • filter (rw::core::Ptr< ProximityFilterStrategy >) – [in] proximity filter used to cull or filter frame-pairs that are obviously not colliding

addGeometry(frame, geometry)

Add Geometry associated to frame

The current shape of the geometry is copied, hence later changes to geometry has no effect

Parameters
  • frame (Frame) – [in] Frame to associate geometry to

  • geometry (rw::core::Ptr< Geometry >) – [in] Geometry to add

addRule(rule)

Adds rule specifying inclusion/exclusion of frame pairs in collision detection

getCollisionStrategy()

Get the narrow-phase collision strategy. :rtype: rw::core::Ptr< CollisionStrategy > :return: the strategy if set, otherwise NULL.

getComputationTime()

Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.

getGeometryIDs(frame)

return the ids of all the geometries of this frames.

getNoOfCalls()

Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.

getProximityFilterStrategy()

The broad phase collision strategy of the collision checker.

hasGeometry(frame, geometryId)

Returns whether frame has an associated geometry with geometryId. :type frame: Frame :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry

inCollision(*args)

Overload 1:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • data (ProximityData) – [in/out] Defines parameters for the collision check, the results and also enables caching inbetween calls to incollision

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 2:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (CollisionDetectorQueryResult) – [out] If non-NULL, the pairs of colliding frames are inserted in result.

  • stopAtFirstContact (boolean) – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 3:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (CollisionDetectorQueryResult) – [out] If non-NULL, the pairs of colliding frames are inserted in result.

  • stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 4:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result – [out] If non-NULL, the pairs of colliding frames are inserted in result.

  • stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 5:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (std::vector< std::pair< Frame *,Frame * >,std::allocator< std::pair< Frame *,Frame * > > >) – [out] Where to store pairs of colliding frames.

  • stopAtFirstContact (boolean) – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 6:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (std::vector< std::pair< Frame *,Frame * >,std::allocator< std::pair< Frame *,Frame * > > >) – [out] Where to store pairs of colliding frames.

  • stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.

static make(workcell, strategy)
removeGeometry(*args)

Overload 1:

Removes geometry from CollisionDetector

The id of the geometry is used to match the collision model to the geometry.

Parameters
  • frame (Frame) – [in] The frame which has the geometry associated

  • geometry (rw::core::Ptr< Geometry >) – [in] Geometry with the id to be removed


Overload 2:

Removes geometry from CollisionDetector

The geometryId is used to match the collision model to the geometry.

Parameters
  • frame (Frame) – [in] The frame which has the geometry associated

  • geometryId (string) – [in] Id of geometry to be removed

removeRule(rule)

Removes rule specifying inclusion/exclusion of frame pairs in collision detection

resetComputationTimeAndCount()

Reset the counter for inCollision invocations and the computation timer.

property thisown

The membership flag

class sdurw.CollisionDetectorPtr(*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.

addGeometry(frame, geometry)

Add Geometry associated to frame

The current shape of the geometry is copied, hence later changes to geometry has no effect

Parameters
  • frame (Frame) – [in] Frame to associate geometry to

  • geometry (rw::core::Ptr< Geometry >) – [in] Geometry to add

addRule(rule)

Adds rule specifying inclusion/exclusion of frame pairs in collision detection

deref()

The pointer stored in the object.

getCollisionStrategy()

Get the narrow-phase collision strategy. :rtype: rw::core::Ptr< CollisionStrategy > :return: the strategy if set, otherwise NULL.

getComputationTime()

Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.

getDeref()

Member access operator.

getGeometryIDs(frame)

return the ids of all the geometries of this frames.

getNoOfCalls()

Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.

getProximityFilterStrategy()

The broad phase collision strategy of the collision checker.

hasGeometry(frame, geometryId)

Returns whether frame has an associated geometry with geometryId. :type frame: Frame :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry

inCollision(*args)

Overload 1:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • data (ProximityData) – [in/out] Defines parameters for the collision check, the results and also enables caching inbetween calls to incollision

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 2:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (CollisionDetectorQueryResult) – [out] If non-NULL, the pairs of colliding frames are inserted in result.

  • stopAtFirstContact (boolean) – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 3:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (CollisionDetectorQueryResult) – [out] If non-NULL, the pairs of colliding frames are inserted in result.

  • stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 4:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result – [out] If non-NULL, the pairs of colliding frames are inserted in result.

  • stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 5:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (std::vector< std::pair< Frame *,Frame * >,std::allocator< std::pair< Frame *,Frame * > > >) – [out] Where to store pairs of colliding frames.

  • stopAtFirstContact (boolean) – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; false otherwise.


Overload 6:

Check the workcell for collisions.

Parameters
  • state (State) – [in] The state for which to check for collisions.

  • result (std::vector< std::pair< Frame *,Frame * >,std::allocator< std::pair< Frame *,Frame * > > >) – [out] Where to store pairs of colliding frames.

  • stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.

Return type

boolean

Returns

true if a collision is detected; 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.

make(workcell, strategy)
removeGeometry(*args)

Overload 1:

Removes geometry from CollisionDetector

The id of the geometry is used to match the collision model to the geometry.

Parameters
  • frame (Frame) – [in] The frame which has the geometry associated

  • geometry (rw::core::Ptr< Geometry >) – [in] Geometry with the id to be removed


Overload 2:

Removes geometry from CollisionDetector

The geometryId is used to match the collision model to the geometry.

Parameters
  • frame (Frame) – [in] The frame which has the geometry associated

  • geometryId (string) – [in] Id of geometry to be removed

removeRule(rule)

Removes rule specifying inclusion/exclusion of frame pairs in collision detection

resetComputationTimeAndCount()

Reset the counter for inCollision invocations and the computation timer.

property thisown

The membership flag

class sdurw.CollisionDetectorQueryResult

Bases: object

result of a collision query

__init__()

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

getFramePairVector()
getFullInfo(i)

get a copy of the items presented in _fullInfo as a pointer :param index: the index in the vector :rtype: rw::core::Ptr< ProximityStrategyData > :return: a pointer to a copy of the ProximityStrategyData

property thisown

The membership flag

sdurw.CollisionDetector_make(workcell, strategy)
class sdurw.CollisionSetup(*args)

Bases: object

Setup for the collision checker

The CollisionSetup contains information about which frames, not be checked against each other

__init__(*args)

Overload 1:

Default constructor for when no excludes are described


Overload 2:

Constructs CollisionSetup with list of exclusions

type exclude

std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >

param exclude

[in] pairs to be excluded


Overload 3:

CollisionSetup for a list of pairs to exclude and a sequence

of volatile frames.

type exclude

std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > >

param exclude

[in] pairs to be excluded

type volatileFrames

std::vector< std::string,std::allocator< std::string > >

param volatileFrames

[in] names of frames to treat as volatile.

type excludeStaticPairs

boolean

param excludeStaticPairs

[in] if true exclude statically related pairs.

addExcludePair(pair)
excludeStaticPairs()

True iff all statically related pairs of frames should be

excluded.

Note that this will exclude also statically related pairs of frames for which one or both of the pairs are volatile.

static get(*args)
getExcludeList()

Returns the exclude list :rtype: std::vector< std::pair< std::string,std::string >,std::allocator< std::pair< std::string,std::string > > > :return: the exclude list

isVolatile(frame)

True iff the collision setup for the frame can change over

time.

merge(b)

Combine setup of this and setup of b into this collision setup.

removeExcludePair(pair)
static set(*args)
property thisown

The membership flag

sdurw.CollisionSetup_get(*args)
sdurw.CollisionSetup_set(*args)
class sdurw.CollisionStrategy(*args, **kwargs)

Bases: sdurw.ProximityStrategy

An interface that defines methods to test collision between two objects.

__init__(*args, **kwargs)

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

inCollision(*args)

Overload 1:

Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type type: int :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.


Overload 2:

Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: [in/out] caching and result container :type type: int :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.


Overload 3:

Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: [in/out] caching and result container :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.


Overload 4:

Checks to see if two proximity models are in collision :type a: rw::core::Ptr< ProximityModel > :param a: [in] model 1 :type wTa: rw::math::Transform3D< double > :param wTa: [in] transform of model a :type b: rw::core::Ptr< ProximityModel > :param b: [in] model 2 :type wTb: rw::math::Transform3D< double > :param wTb: [in] transform of model b :type data: ProximityStrategyData :param data: [in/out] caching and result container :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.

static make(*args)

Overload 1:

A collision strategy constructed from a collision tolerance strategy and a resolution. The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.


Overload 2:

A collision strategy constructed from a collision tolerance strategy and a resolution. The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.

property thisown

The membership flag

class sdurw.CollisionStrategyCollisionPair

Bases: object

a collision pair of

__init__()

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

property geoIdxA

geometry index

property geoIdxB
property size
property startIdx

indices into the geomPrimIds array, which means that inidicies [_geomPrimIds[startIdx];_geomPrimIds[startIdx+size]] are the colliding primitives between geometries geoIdxA and geoIdxB

property thisown

The membership flag

class sdurw.CollisionStrategyCollisionPairVector(*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.CollisionStrategyPtr(*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.

addGeometry(*args)

Overload 1:

adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model: ProximityModel :param model: [in] the proximity model to add data to :type geom: Geometry :param geom: [in] the geometry that is to be added


Overload 2:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :type forceCopy: boolean :param forceCopy: :rtype: boolean :return:


Overload 3:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :param forceCopy: :rtype: boolean :return:

addModel(*args)

Overload 1:

Adds a Proximity model of a frame to this strategy.

The Proximity model is the one specified in the frames property

Parameters

object (rw::core::Ptr< Object >) – [in] the frame on which the Proximity model is to be created.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 2:

Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (Geometry) – [in] list of faces from which to construct the Proximity model

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 3:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy (boolean) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 4:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.

clear()

Clears any stored model information

clearFrame(frame)

Clear (remove all) model information for frame frame.

clearFrames()

Clear (remove all) model information for all frames.

createModel()

creates an empty ProximityModel

deref()

The pointer stored in the object.

destroyModel(model)

deallocates the memory used for model :type model: ProximityModel :param model:

getDeref()

Member access operator.

getGeometryIDs(model)

the list of all geometry ids that are associated to the proximity model model is returned :type model: ProximityModel :param model: [in] the model containing the geometries :rtype: std::vector< std::string,std::allocator< std::string > > :return: all geometry ids associated to the proximity model

getModel(frame)

get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: Frame :param frame: [in] frame for which an proximitymodel is associated

hasModel(frame)

Tells whether the frame has a proximity model in the strategy

To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well

Parameters

frame (Frame) – [in] the frame to check for1.0/

Return type

boolean

Returns

true if a model exists or can be created

inCollision(*args)

Overload 1:

Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type type: int :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.


Overload 2:

Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: [in/out] caching and result container :type type: int :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.


Overload 3:

Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: [in/out] caching and result container :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, false otherwise.


Overload 4:

Checks to see if two proximity models are in collision :type a: rw::core::Ptr< ProximityModel > :param a: [in] model 1 :type wTa: rw::math::Transform3D< double > :param wTa: [in] transform of model a :type b: rw::core::Ptr< ProximityModel > :param b: [in] model 2 :type wTb: rw::math::Transform3D< double > :param wTb: [in] transform of model b :type data: ProximityStrategyData :param data: [in/out] caching and result container :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

colliding, 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.

make(*args)

Overload 1:

A collision strategy constructed from a collision tolerance strategy and a resolution. The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.


Overload 2:

A collision strategy constructed from a collision tolerance strategy and a resolution. The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.

removeGeometry(model, geomId)

removes a geometry from a specific proximity model :rtype: boolean :return: true if succesfull

property thisown

The membership flag

class sdurw.CollisionStrategyResult

Bases: object

result of a single collision pair

A collision result is one or all colliding triangles between two objects which may have several geometries attached. The collision result does not have access to the actual triangle meshes of the geometries so to extract the actual contact location the user has to supply the triangles meshes of the geometries himself.

__init__()

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

property a

reference to the first model

property b

reference to the second model

clear()

clear all result values

getNrBVTests()
getNrPrimTests()
property thisown

The membership flag

sdurw.CollisionStrategy_make(*args)

Overload 1:

A collision strategy constructed from a collision tolerance strategy and a resolution. The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.


Overload 2:

A collision strategy constructed from a collision tolerance strategy and a resolution. The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.

class sdurw.CollisionToleranceStrategy(*args, **kwargs)

Bases: sdurw.ProximityStrategy

This is a collision strategy that detects collisions between objects that are closer than a specified tolerance.

__init__(*args, **kwargs)

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

isWithinDistance(*args)

Overload 1:

Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between them

that is less than tolerance are in collision

Return type

boolean

Returns

true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.


Overload 2:

Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type distance: float :param distance: :type data: ProximityStrategyData :param data:

Return type

boolean

Returns

true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.


Overload 3:

Checks to see if two proximity models \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a: rw::core::Ptr< ProximityModel > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< ProximityModel > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between them

that is less than tolerance are in collision

Parameters

data (ProximityStrategyData) –

Return type

boolean

Returns

true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.

property thisown

The membership flag

class sdurw.CollisionToleranceStrategyPtr(*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.

addGeometry(*args)

Overload 1:

adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model: ProximityModel :param model: [in] the proximity model to add data to :type geom: Geometry :param geom: [in] the geometry that is to be added


Overload 2:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :type forceCopy: boolean :param forceCopy: :rtype: boolean :return:


Overload 3:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :param forceCopy: :rtype: boolean :return:

addModel(*args)

Overload 1:

Adds a Proximity model of a frame to this strategy.

The Proximity model is the one specified in the frames property

Parameters

object (rw::core::Ptr< Object >) – [in] the frame on which the Proximity model is to be created.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 2:

Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (Geometry) – [in] list of faces from which to construct the Proximity model

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 3:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy (boolean) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 4:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.

clear()

Clears any stored model information

clearFrame(frame)

Clear (remove all) model information for frame frame.

clearFrames()

Clear (remove all) model information for all frames.

createModel()

creates an empty ProximityModel

deref()

The pointer stored in the object.

destroyModel(model)

deallocates the memory used for model :type model: ProximityModel :param model:

getDeref()

Member access operator.

getGeometryIDs(model)

the list of all geometry ids that are associated to the proximity model model is returned :type model: ProximityModel :param model: [in] the model containing the geometries :rtype: std::vector< std::string,std::allocator< std::string > > :return: all geometry ids associated to the proximity model

getModel(frame)

get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: Frame :param frame: [in] frame for which an proximitymodel is associated

hasModel(frame)

Tells whether the frame has a proximity model in the strategy

To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well

Parameters

frame (Frame) – [in] the frame to check for1.0/

Return type

boolean

Returns

true if a model exists or can be created

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.

isWithinDistance(*args)

Overload 1:

Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between them

that is less than tolerance are in collision

Return type

boolean

Returns

true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.


Overload 2:

Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type distance: float :param distance: :type data: ProximityStrategyData :param data:

Return type

boolean

Returns

true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.


Overload 3:

Checks to see if two proximity models \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a: rw::core::Ptr< ProximityModel > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< ProximityModel > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between them

that is less than tolerance are in collision

Parameters

data (ProximityStrategyData) –

Return type

boolean

Returns

true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.

removeGeometry(model, geomId)

removes a geometry from a specific proximity model :rtype: boolean :return: true if succesfull

property thisown

The membership flag

class sdurw.CompositeDevice(*args)

Bases: sdurw.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 :type base: Frame :param base: [in] the base of the device :type devices: std::vector< rw::core::Ptr< Device >,std::allocator< rw::core::Ptr< Device > > > :param devices: [in] the sequence of subdevices :type end: Frame :param end: [in] the end (or tool) of the device :type name: string :param name: [in] the name of the device :type state: State :param state: [in] the kinematic structure assumed for Jacobian computations


Overload 2:

Constructor :type base: Frame :param base: [in] the base of the device :type devices: std::vector< rw::core::Ptr< Device >,std::allocator< rw::core::Ptr< Device > > > :param devices: [in] the sequence of subdevices :type ends: std::vector< Frame *,std::allocator< Frame * > > :param ends: [in] the end frames (or tools) of the device :type name: string :param name: [in] the name of the device :type state: State :param 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.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()
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< Frame *,std::allocator< 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< Joint *,std::allocator< Joint * > > :return: all joints

getName()

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

getPropertyMap()

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.

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.

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

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.CompositeJointDevice(*args)

Bases: sdurw.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< Device >,std::allocator< rw::core::Ptr< 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< Device >,std::allocator< rw::core::Ptr< Device > > >) – [in] the sequence of subdevices

  • ends (std::vector< Frame *,std::allocator< 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.Cone(*args)

Bases: sdurw.Primitive

__init__(*args)

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

createMesh(resolution)
getBottomRadius()
getHeight()
getParameters()
getTopRadius()
getType()

the type of this primitive

Return type

int

Returns

the type of primitive.

property thisown

The membership flag

class sdurw.Contact

Bases: object

__init__()

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

property normalA
property normalB
property point
property thisown

The membership flag

class sdurw.Contact2D

Bases: object

data structure for describing a contact in 2D

__init__()

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

property avgCurvature

double moving average of the curvature

property curvature

surface curvature

property mu

coulomb friction coefficient

property n

Surface contact normal

property p

Contact position

property thisown

The membership flag

class sdurw.Contact2DPtr(*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.

property avgCurvature

double moving average of the curvature

property curvature

surface curvature

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 mu

coulomb friction coefficient

property n

Surface contact normal

property p

Contact position

property thisown

The membership flag

class sdurw.Contact3D(*args)

Bases: object

data structure for describing a contact in 3D

__init__(*args)
Overload 1:

constructor


Overload 2:

constructor :type tp: rw::math::Vector3D< double > :param tp: [in] point contact :type tn: rw::math::Vector3D< double > :param tn: [in] contact normal :type normalf: float :param normalf: [in] normal force in the contact


Overload 3:

constructor :type tp: rw::math::Vector3D< double > :param tp: [in] point contact :type tn: rw::math::Vector3D< double > :param tn: [in] contact normal :type tf: rw::math::Vector3D< double > :param tf: [in] force in the contact

property curvature

surface curvature

property f

the actual force

property mu

coulomb friction coefficient

property n

Surface contact normal

property normalForce

normal force

property p

Contact position

property thisown

The membership flag

class sdurw.Contact3DPtr(*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.

property curvature

surface curvature

deref()

The pointer stored in the object.

property f

the actual force

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 mu

coulomb friction coefficient

property n

Surface contact normal

property normalForce

normal force

property p

Contact position

property thisown

The membership flag

class sdurw.ControllerModel(*args)

Bases: sdurw.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.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

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

Overload 1:

Get the state structure. :rtype: rw::core::Ptr< StateStructure > :return: the state structure.


Overload 2:

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

Bases: object

__init__(*args, **kwargs)

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

getMinDistInside(vertex)
getMinDistOutside(vertex)
isInside(vertex)
rebuild(vertices)
property thisown

The membership flag

toTriMesh()
class sdurw.Cylinder(*args)

Bases: sdurw.Primitive

Cylinder primitive.

__init__(*args)
Overload 1:

Default constructor with no parameters.


Overload 2:

Cylinder with parameters specified.

Parameters
  • radius (float) – the radius.

  • height (float) – the height.

createMesh(resolution)

Create a mesh representation of the cylinder.

Parameters

resolution (int) – the resolution.

Return type

rw::core::Ptr< TriMesh >

Returns

the TriMesh.

getHeight()
getParameters()
getRadius()
getType()

the type of this primitive

Return type

int

Returns

the type of primitive.

property thisown

The membership flag

class sdurw.DHParameterSet(*args)

Bases: object

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

__init__(*args)

Overload 1:

Constructor for DHParameters initialized to zero.


Overload 2:

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


Overload 3:

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


Overload 4:

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

a()

\(a_{i-1}\) *

alpha()

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

b()
beta()
d()

\(d_{i}\) *

static get(*args)
static getDHParameters(device)

Returns the DH-Parameters for a SerialDevice.

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

Parameters

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

Return type

std::vector< DHParameterSet,std::allocator< DHParameterSet > >

Returns

The set of DH parameters

getType()

the DH-convention type

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

\(\theta_{i}\) *

property thisown

The membership flag

class sdurw.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.DHParameterSet_get(*args)
sdurw.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< SerialDevice >) – [in] SerialDevice for which to get the DH parameters

Return type

std::vector< DHParameterSet,std::allocator< DHParameterSet > >

Returns

The set of DH parameters

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

Bases: sdurw.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< 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< 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:


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< Model3D > :param model: [in/out] model to be updated :type state: State :param state:

class sdurw.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

deref()

The pointer stored in the object.

getBase()

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< Frame *,std::allocator< Frame * > > :return: a vector of frames

getGeometry(*args)

Overload 1:

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


Overload 2:

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


Overload 2:

get visualization models of this object :rtype: std::vector< rw::core::Ptr< Model3D >,std::allocator< rw::core::Ptr< Model3D > > > :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:


Overload 2:

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

getStateStructure(*args)

Overload 1:

Get the state structure. :rtype: rw::core::Ptr< StateStructure > :return: the state structure.


Overload 2:

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< Model3D > :param model: [in/out] model to be updated :type state: State :param state:

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

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

Bases: sdurw.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::core::Ptr< rw::math::Function1Diff< double,double,double > > :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw.DependentRevoluteJoint(*args, **kwargs)

Bases: sdurw.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__(*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< StateCache > :param cache: [in] a cache.

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::core::Ptr< rw::math::Function1Diff< double,double,double > > :param function: [in] function with first order derivative.

property thisown

The membership flag

class sdurw.Device(*args, **kwargs)

Bases: object

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

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

std::pair< Q,Q >

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

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

getPropertyMap()

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.

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 (std::pair< Q,Q >) – [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.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.

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

std::pair< Q,Q >

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)
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.DeviceJacobianCalculator(devices, base, tcps, state)

Bases: sdurw.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< Device >,std::allocator< rw::core::Ptr< 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< Frame *,std::allocator< Frame * > >) – [in] List of tool end-effectors for which to calculate the Jacobian.

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

get(state)

State&) const

property thisown

The membership flag

class sdurw.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.

asDeviceCPtr()
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< Frame *,std::allocator< 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)
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

std::pair< Q,Q >

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

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

getPropertyMap()

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.

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.

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 (std::pair< Q,Q >) – [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.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.DistanceCalculator(*args)

Bases: object

The DistanceCalculator implements an efficient way of calculating different distances between two objects, each represented by a frame

A list of frame pairs is contained within the distance calculater, that specifies which frames are to be checked against each other. The method of used for distance calculation relies on the DistanceStrategy chosen.

The DistanceCalculator supports switching between multiple strategies

__init__(*args)

Overload 1:

Distance calculations for a given tree, collision setup and primitive distance calculator. Uses proximity strategy given by the workcell.

strategy must be non-NULL. root must be non-NULL. Ownership of root is not taken.

Parameters
  • root (Frame) – [in] - the root of the Frame tree.

  • workcell (rw::core::Ptr< WorkCell >) – [in] - the workcell to do the distance calculations in.

  • strategy (rw::core::Ptr< DistanceStrategy >) – [in] - the primitive strategy of distance calculations.

  • initial_state (State) – [in] - the work cell state to use for the initial traversal of the tree.


Overload 2:

Construct distance calculator for a WorkCell with an associated distance calculator strategy.

The DistanceCalculator extracts information about the tree and the CollisionSetup from workcell.

Parameters
  • workcell (rw::core::Ptr< WorkCell >) – [in] the workcell to check

  • strategy (rw::core::Ptr< DistanceStrategy >) – [in] the distance calculation strategy to use


Overload 3:

Constructs distance calculator for a selected set of frames

The list pairs specifies which frame-pairs to be used for distance checking.

strategy must be non-NULL.

Ownership of root is not taken.

Parameters
  • pairs (std::vector< std::pair< Frame *,Frame * >,std::allocator< std::pair< Frame *,Frame * > > >) – [in] Pairs of frame to check

  • strategy (rw::core::Ptr< DistanceStrategy >) – [in] the distance calculation strategy to use

addDistanceModel(frame, faces)

Adds distance model to frame

The distance model is constructed based on the list of faces given.

Parameters
  • frame (Frame) – [in] frame to which the distance model should associate

  • faces (Geometry) – [in] list of faces from which to construct the model

Return type

boolean

Returns

true if a distance model was succesfully created and linked with the frame; false otherwise.

clearCache()

Clears the cache of the distance models

distance(*args)

Overload 1:

Calculates the distances between frames in the tree

Parameters
  • state (State) – [in] The state for which to calculate distances.

  • result (std::vector< DistanceStrategyResult,std::allocator< DistanceStrategyResult > >) – [out] If non-NULL, the distance results are written to result.

Return type

DistanceStrategyResult

Returns

the shortest distance between frame and frame tree


Overload 2:

Calculates the distance between frame and the rest of the tree

Parameters
  • state (State) – [in] The state for which to calculate distances.

  • frame (Frame) – [in] The frame for which distances are to be calculated

  • result (std::vector< DistanceStrategyResult,std::allocator< DistanceStrategyResult > >) – [out] If non-NULL, the distance results are written to result.

Return type

DistanceStrategyResult

Returns

the shortest distance between frame and frame tree


Overload 3:

Calculates the distance between frame and the rest of the tree

Parameters
  • state (State) – [in] The state for which to calculate distances.

  • frame (Frame) – [in] The frame for which distances are to be calculated

  • result – [out] If non-NULL, the distance results are written to result.

Return type

DistanceStrategyResult

Returns

the shortest distance between frame and frame tree

distanceOMP(state, result=None)
getComputationTime()
getCount()
resetComputationTimeAndCount()
setDistanceStrategy(strategy)

Set the primitive distance calculator to strategy.

strategy must be non-NULL.

Ownership of the strategy is not taken.

Parameters

strategy (rw::core::Ptr< DistanceStrategy >) – [in] - the primitive distance calculator to use.

property thisown

The membership flag

class sdurw.DistanceCalculatorPtr(*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.

addDistanceModel(frame, faces)

Adds distance model to frame

The distance model is constructed based on the list of faces given.

Parameters
  • frame (Frame) – [in] frame to which the distance model should associate

  • faces (Geometry) – [in] list of faces from which to construct the model

Return type

boolean

Returns

true if a distance model was succesfully created and linked with the frame; false otherwise.

clearCache()

Clears the cache of the distance models

deref()

The pointer stored in the object.

distance(*args)

Overload 1:

Calculates the distances between frames in the tree

Parameters
  • state (State) – [in] The state for which to calculate distances.

  • result (std::vector< DistanceStrategyResult,std::allocator< DistanceStrategyResult > >) – [out] If non-NULL, the distance results are written to result.

Return type

DistanceStrategyResult

Returns

the shortest distance between frame and frame tree


Overload 2:

Calculates the distance between frame and the rest of the tree

Parameters
  • state (State) – [in] The state for which to calculate distances.

  • frame (Frame) – [in] The frame for which distances are to be calculated

  • result (std::vector< DistanceStrategyResult,std::allocator< DistanceStrategyResult > >) – [out] If non-NULL, the distance results are written to result.

Return type

DistanceStrategyResult

Returns

the shortest distance between frame and frame tree


Overload 3:

Calculates the distance between frame and the rest of the tree

Parameters
  • state (State) – [in] The state for which to calculate distances.

  • frame (Frame) – [in] The frame for which distances are to be calculated

  • result – [out] If non-NULL, the distance results are written to result.

Return type

DistanceStrategyResult

Returns

the shortest distance between frame and frame tree

distanceOMP(state, result=None)
getComputationTime()
getCount()
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.

resetComputationTimeAndCount()
setDistanceStrategy(strategy)

Set the primitive distance calculator to strategy.

strategy must be non-NULL.

Ownership of the strategy is not taken.

Parameters

strategy (rw::core::Ptr< DistanceStrategy >) – [in] - the primitive distance calculator to use.

property thisown

The membership flag

class sdurw.DistanceMultiStrategy(*args, **kwargs)

Bases: sdurw.ProximityStrategy

__init__(*args, **kwargs)

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

distances(*args)

Overload 1:

Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will

be included in the result.

Return type

DistanceMultiStrategyResult

Returns

shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.


Overload 2:

Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will be included in the result. :type data: ProximityStrategyData :param data:

Return type

DistanceMultiStrategyResult

Returns

shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.


Overload 3:

property thisown

The membership flag

class sdurw.DistanceMultiStrategyPtr(*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.

addGeometry(*args)

Overload 1:

adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model: ProximityModel :param model: [in] the proximity model to add data to :type geom: Geometry :param geom: [in] the geometry that is to be added


Overload 2:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :type forceCopy: boolean :param forceCopy: :rtype: boolean :return:


Overload 3:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :param forceCopy: :rtype: boolean :return:

addModel(*args)

Overload 1:

Adds a Proximity model of a frame to this strategy.

The Proximity model is the one specified in the frames property

Parameters

object (rw::core::Ptr< Object >) – [in] the frame on which the Proximity model is to be created.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 2:

Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (Geometry) – [in] list of faces from which to construct the Proximity model

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 3:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy (boolean) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 4:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.

clear()

Clears any stored model information

clearFrame(frame)

Clear (remove all) model information for frame frame.

clearFrames()

Clear (remove all) model information for all frames.

createModel()

creates an empty ProximityModel

deref()

The pointer stored in the object.

destroyModel(model)

deallocates the memory used for model :type model: ProximityModel :param model:

distances(*args)

Overload 1:

Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will

be included in the result.

Return type

DistanceMultiStrategyResult

Returns

shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.


Overload 2:

Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will be included in the result. :type data: ProximityStrategyData :param data:

Return type

DistanceMultiStrategyResult

Returns

shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.


Overload 3:

getDeref()

Member access operator.

getGeometryIDs(model)

the list of all geometry ids that are associated to the proximity model model is returned :type model: ProximityModel :param model: [in] the model containing the geometries :rtype: std::vector< std::string,std::allocator< std::string > > :return: all geometry ids associated to the proximity model

getModel(frame)

get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: Frame :param frame: [in] frame for which an proximitymodel is associated

hasModel(frame)

Tells whether the frame has a proximity model in the strategy

To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well

Parameters

frame (Frame) – [in] the frame to check for1.0/

Return type

boolean

Returns

true if a model exists or can be created

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.

removeGeometry(model, geomId)

removes a geometry from a specific proximity model :rtype: boolean :return: true if succesfull

property thisown

The membership flag

class sdurw.DistanceMultiStrategyResult

Bases: object

DistanceResult contains basic information about the distance result between two frames.

__init__()

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

property a

reference to the first proximity model

property b

reference to the second proximity model

clear()
property distance

distance between frame f1 and frame f2

property distances

distances between contact points

property p1

Closest point on f1 to f2, described in f1 reference frame

property p1prims

indices to the primitives which are the closest points on the first proximity model

property p1s

Closest points on f1 to f2, described in f1 reference frame

property p2

Closest point on f2 to f1, described in f2 reference frame

property p2prims

indices to the primitives which are the closest points on the second proximity model

property p2s

Closest point on f2 to f1, IMPORTANT! NOTICE! described in f1 reference frame

property thisown

The membership flag

class sdurw.DistanceMultiStrategyResultVector(*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.DistanceStrategy(*args, **kwargs)

Bases: sdurw.ProximityStrategy

This is an interface that defines methods for computing the minimum distance between geometric objects. If geometry objects has been related to frames (see ProximityStrategy) then distance functions computing the distance between the geometry attached to frames can also be used.

__init__(*args, **kwargs)

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

distance(*args)

Overload 1:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 2:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 3:

Calculates the distance between two proximity models \(\mathcal{a}\) and \(\mathcal{b}\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< ProximityModel > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< ProximityModel > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 4:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 5:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 6:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< ProximityModel > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< ProximityModel > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.

property thisown

The membership flag

class sdurw.DistanceStrategyPtr(*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.

addGeometry(*args)

Overload 1:

adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model: ProximityModel :param model: [in] the proximity model to add data to :type geom: Geometry :param geom: [in] the geometry that is to be added


Overload 2:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :type forceCopy: boolean :param forceCopy: :rtype: boolean :return:


Overload 3:

adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model: ProximityModel :param model: :type geom: rw::core::Ptr< Geometry > :param geom: :param forceCopy: :rtype: boolean :return:

addModel(*args)

Overload 1:

Adds a Proximity model of a frame to this strategy.

The Proximity model is the one specified in the frames property

Parameters

object (rw::core::Ptr< Object >) – [in] the frame on which the Proximity model is to be created.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 2:

Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (Geometry) – [in] list of faces from which to construct the Proximity model

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 3:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy (boolean) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.


Overload 4:

Adds a Proximity model to a frame.

The Proximity model is constructed from the list of faces

Parameters
  • frame (Frame) – [in] the frame to which the Proximity model should associate

  • faces (rw::core::Ptr< Geometry >) – [in] list of faces from which to construct the Proximity model

  • forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.

Return type

boolean

Returns

true if a Proximity model was succesfully created and linked with the frame; false otherwise.

clear()

Clears any stored model information

clearFrame(frame)

Clear (remove all) model information for frame frame.

clearFrames()

Clear (remove all) model information for all frames.

createModel()

creates an empty ProximityModel

deref()

The pointer stored in the object.

destroyModel(model)

deallocates the memory used for model :type model: ProximityModel :param model:

distance(*args)

Overload 1:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 2:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 3:

Calculates the distance between two proximity models \(\mathcal{a}\) and \(\mathcal{b}\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< ProximityModel > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< ProximityModel > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 4:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 5:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. :type a: Frame :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: Frame :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.


Overload 6:

Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< ProximityModel > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< ProximityModel > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data: ProximityStrategyData :param data: :rtype: DistanceStrategyResult :return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are

separated and not in collision.

getDeref()

Member access operator.

getGeometryIDs(model)

the list of all geometry ids that are associated to the proximity model model is returned :type model: ProximityModel :param model: [in] the model containing the geometries :rtype: std::vector< std::string,std::allocator< std::string > > :return: all geometry ids associated to the proximity model

getModel(frame)

get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: Frame :param frame: [in] frame for which an proximitymodel is associated

hasModel(frame)

Tells whether the frame has a proximity model in the strategy

To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well

Parameters

frame (Frame) – [in] the frame to check for1.0/

Return type

boolean

Returns

true if a model exists or can be created

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.

removeGeometry(model, geomId)

removes a geometry from a specific proximity model :rtype: boolean :return: true if succesfull

property thisown

The membership flag

class sdurw.DistanceStrategyResult

Bases: object

__init__()

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

property a

pointer to the ProximityModel containing the geometries for the first frame

property b

pointer to the ProximityModel containing the geometries for the second frame

clear()
property distance

distance between frame f1 and frame f1

property f1

reference to the first frame

property f2

reference to the second frame

property geoIdxA

geometry index to triangle mesh A

property geoIdxB

geometry index to triangle mesh B

property idx1

index to the first face/triangle that is the closest feature

property idx2

index to the second face/triangle that is the closest feature

property p1

Closest point on f1 to f2, described in f1 reference frame

property p2

Closest point on f2 to f1, described in f1 reference frame

property thisown

The membership flag

class sdurw.DistanceStrategyResultVector(*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.DrawableNode(*args, **kwargs)

Bases: object

OUTLINE = 2

Render both solid and wireframe

SOLID = 0

Render in solid

WIRE = 1

Render in wireframe

__init__(*args, **kwargs)

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

getMask()
getScale()
getTransform()
getTransparency()
isHighlighted()
isTransparent()
isVisible()
setDrawType(drawType)
setHighlighted(b)
setMask(mask)
setScale(scale)
setTransform(t3d)
setTransparency(alpha)
setVisible(enable)
property thisown

The membership flag

class sdurw.DrawableNodePtr(*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.

getMask()
getScale()
getTransform()
getTransparency()
isHighlighted()
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.

isTransparent()
isVisible()
setDrawType(drawType)
setHighlighted(b)
setMask(mask)
setScale(scale)
setTransform(t3d)
setTransparency(alpha)
setVisible(enable)
property thisown

The membership flag

class sdurw.DrawableNodePtrVector(*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.EAAd(*args)

Bases: sdurw.Rotation3DVectord

A class for representing an equivalent angle-axis rotation

This class defines an equivalent-axis-angle orientation vector also known as an \(\thetak\) vector or “axis+angle” vector

The equivalent-axis-angle vector is the product of a unit vector \(\hat{\mathbf{k}}\) and an angle of rotation around that axis \(\theta\)

Notes: given two EAA vectors \(\theta_1\mathbf{\hat{k}}_1\) and \(\theta_2\mathbf{\hat{k}}_2\) it is generally not possible to subtract or add these vectors, except for the special case when \(\mathbf{\hat{k}}_1 == \mathbf{\hat{k}}_2\) this is why this class does not have any subtraction or addition operators

__init__(*args)

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

angle()

Extracts the angle of rotation \(\theta\) :rtype: float :return: \(\theta\)

axis()

Extracts the axis of rotation vector \(\mathbf{\hat{\mathbf{k}}}\) :rtype: rw::math::Vector3D< double > :return: \(\mathbf{\hat{\mathbf{k}}}\)

size()

Get the size of the EAA. :rtype: int :return: the size (always 3).

property thisown

The membership flag

toRotation3D()

\(\mathbf{R} = e^{[\mathbf{\hat{k}}],\theta}=\mathbf{I}^{3x3}+[\mathbf{\hat{k}}]sin\theta+[{\mathbf{\hat{k}}}]^2(1-cos\theta) = \left[ \begin{array}{ccc} k_xk_xv\theta + c\theta k_xk_yv\theta - k_zs\theta k_xk_zv\theta + k_ys\theta \\ k_xk_yv\theta + k_zs\theta k_yk_yv\theta + c\theta k_yk_zv\theta - k_xs\theta\\ k_xk_zv\theta - k_ys\theta k_yk_zv\theta + k_xs\theta k_zk_zv\theta + c\theta \end{array} \right]\)

where: - \(c\theta = cos \theta\) - \(s\theta = sin \theta\) - \(v\theta = 1-cos \theta\)

x()
y()
z()
class sdurw.EAAf(*args)

Bases: sdurw.Rotation3DVectorf

A class for representing an equivalent angle-axis rotation

This class defines an equivalent-axis-angle orientation vector also known as an \(\thetak\) vector or “axis+angle” vector

The equivalent-axis-angle vector is the product of a unit vector \(\hat{\mathbf{k}}\) and an angle of rotation around that axis \(\theta\)

Notes: given two EAA vectors \(\theta_1\mathbf{\hat{k}}_1\) and \(\theta_2\mathbf{\hat{k}}_2\) it is generally not possible to subtract or add these vectors, except for the special case when \(\mathbf{\hat{k}}_1 == \mathbf{\hat{k}}_2\) this is why this class does not have any subtraction or addition operators

__init__(*args)

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

angle()

Extracts the angle of rotation \(\theta\) :rtype: float :return: \(\theta\)

axis()

Extracts the axis of rotation vector \(\mathbf{\hat{\mathbf{k}}}\) :rtype: rw::math::Vector3D< float > :return: \(\mathbf{\hat{\mathbf{k}}}\)

size()

Get the size of the EAA. :rtype: int :return: the size (always 3).

property thisown

The membership flag

toRotation3D()

\(\mathbf{R} = e^{[\mathbf{\hat{k}}],\theta}=\mathbf{I}^{3x3}+[\mathbf{\hat{k}}]sin\theta+[{\mathbf{\hat{k}}}]^2(1-cos\theta) = \left[ \begin{array}{ccc} k_xk_xv\theta + c\theta k_xk_yv\theta - k_zs\theta k_xk_zv\theta + k_ys\theta \\ k_xk_yv\theta + k_zs\theta k_yk_yv\theta + c\theta k_yk_zv\theta - k_xs\theta\\ k_xk_zv\theta - k_ys\theta k_yk_zv\theta + k_xs\theta k_zk_zv\theta + c\theta \end{array} \right]\)

where: - \(c\theta = cos \theta\) - \(s\theta = sin \theta\) - \(v\theta = 1-cos \theta\)

x()
y()
z()
class sdurw.EigenMatrix2d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrix2f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrix3d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrix3f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrix3id(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrix4d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrix4f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrixXd(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenMatrixXf(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenQuaterniond

Bases: object

__init__()

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

property thisown

The membership flag

class sdurw.EigenQuaternionf

Bases: object

__init__()

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

property thisown

The membership flag

class sdurw.EigenRowVector3d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenRowVector3f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenRowVector3id(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector2d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector2f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector3d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector3f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector3id(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector6d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector6f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector7d(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVector7f(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVectorXd(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.EigenVectorXf(dimx, dimy)

Bases: object

__init__(dimx, dimy)

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

elem(x, y)
get(x, y)
set(x, y, value)
property thisown

The membership flag

class sdurw.FKRange(*args)

Bases: object

Forward kinematics between a pair of frames.

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

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

__init__(*args)

Overload 1:

Forward kinematics for the path leading from from to to.

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

Parameters
  • from (Frame) – [in] The start frame.

  • to (Frame) – [in] The end frame.

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


Overload 2:

Default constructor

Will always return an identity matrix as the transform

get(state)

The relative transform between the frames.

Parameters

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

getBase()

Returns the first frame in the range.

Return type

rw::core::Ptr< Frame const >

Returns

The base frame (from).

getEnd()

Returns the last frame in the range.

Return type

rw::core::Ptr< Frame const >

Returns

The end frame (to).

property thisown

The membership flag

class sdurw.FKTable(state)

Bases: object

Forward kinematics for a set of frames.

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

__init__(state)

Forward kinematics for the work cell state state. :type state: State :param state: [in] The work state for which world transforms are to be

calculated.

get(frame)

The world transform for the frame frame.

Parameters

frame (Frame) – [in] The frame for which to find the world transform.

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to the world.

getState()

Returns State associated with the FKTable

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

Return type

State

Returns

State used to calculate the forward kinematics

reset(state)

resets the FKTable to state

Parameters

state (State) –

property thisown

The membership flag

class sdurw.FTSensor(*args, **kwargs)

Bases: sdurw.Sensor

Interface of a N-axis Force Torque sensor

__init__(*args, **kwargs)

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

acquire()

acquires force data from the tactile cells

getForce()

gets the force in N that is acting on the origin. The force is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: force acting on origin.

getMaxForce()

gets the maximum force in Newton that this sensor can measure on any of its axis. :rtype: float :return: max force in Newton.

getMaxTorque()

gets the maximum torque in Newton Meter (N m)that this sensor can measure on any of its axis. :rtype: float :return: max torque in Newton Meter(N m).

getTorque()

gets the torgue in Nm that is acting on the origin. The torque is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: torque acting on origin.

getTransform()

the transform from the sensor frame to the point of origin. :rtype: rw::math::Transform3D< double > :return: transform from sensor frame to point of origin.

property thisown

The membership flag

class sdurw.FTSensorModel(*args)

Bases: sdurw.SensorModel

N-axis Force Torque sensor model

__init__(*args)

Constructor :type name: string :param name: [in] name of FT sensor :type frame: Frame :param frame: [in] the frame to which this sensor is attached :type desc: string :param desc: [in] optional description of sensor

getForce(state)

gets the force in N that is acting on the origin. The force is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: force acting on origin.

getMaxForce()

gets the maximum force in Newton that this sensor can measure on any of its axis. :rtype: rw::math::Vector3D< double > :return: max force in Newton.

getMaxTorque()

gets the maximum torque in Newton Meter (N m)that this sensor can measure on any of its axis. :rtype: rw::math::Vector3D< double > :return: max torque in Newton Meter(N m).

getMaxWrench()

get maximum wrench (force and torque) characteristics :rtype: rw::math::Wrench6D< double > :return:

getTorque(state)

gets the torgue in Nm that is acting on the origin. The torque is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: torque acting on origin.

getTransform()

the transform from the sensor frame to the point of origin. :rtype: rw::math::Transform3D< double > :return: transform from sensor frame to point of origin.

getWrench(state)

gets the force in N that is acting on the origin. The force is described in relation to the origin. :rtype: rw::math::Wrench6D< double > :return: force acting on origin.

setForce(force, state)

set the force that is acting on the origin of this FTsensor

setMaxWrench(max)

set the maximum wrench of this FTSensor :type max: rw::math::Wrench6D< double > :param max: [in] maximum allowed wrench

setTorque(force, state)

set the torque that is acting on the origin of this FTsensor

setTransform(t3d)

set the transform between frame and origin. The origin of the sensor is the frame where sensor data is described. :type t3d: rw::math::Transform3D< double > :param t3d: [in] transformation from frame to origin

setWrench(wrench, state)

set the wrench that is acting on the origin of this FTsensor

property thisown

The membership flag

class sdurw.FTSensorModelPtr(*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 sensor should be attached

Parameters

frame (Frame) – The frame, which can be NULL

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getDescription()

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getForce(state)

gets the force in N that is acting on the origin. The force is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: force acting on origin.

getFrame()

The frame to which the sensor is attached.

The frame can be NULL.

getMaxForce()

gets the maximum force in Newton that this sensor can measure on any of its axis. :rtype: rw::math::Vector3D< double > :return: max force in Newton.

getMaxTorque()

gets the maximum torque in Newton Meter (N m)that this sensor can measure on any of its axis. :rtype: rw::math::Vector3D< double > :return: max torque in Newton Meter(N m).

getMaxWrench()

get maximum wrench (force and torque) characteristics :rtype: rw::math::Wrench6D< double > :return:

getName()

returns the name of this sensor

Return type

string

Returns

name of sensor

getPropertyMap()

gets the propertymap of this sensor :rtype: PropertyMap :return: reference to rw::core::PropertyMap

getStateStructure(*args)

Overload 1:

Get the state structure. :rtype: rw::core::Ptr< StateStructure > :return: the state structure.


Overload 2:

getTorque(state)

gets the torgue in Nm that is acting on the origin. The torque is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: torque acting on origin.

getTransform()

the transform from the sensor frame to the point of origin. :rtype: rw::math::Transform3D< double > :return: transform from sensor frame to point of origin.

getWrench(state)

gets the force in N that is acting on the origin. The force is described in relation to the origin. :rtype: rw::math::Wrench6D< double > :return: force acting on origin.

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 sensor

Parameters

description (string) – [in] description of this sensor

setForce(force, state)

set the force that is acting on the origin of this FTsensor

setMaxWrench(max)

set the maximum wrench of this FTSensor :type max: rw::math::Wrench6D< double > :param max: [in] maximum allowed wrench

setName(name)

sets the name of this sensor

Parameters

name (string) – [in] name of this sensor

setTorque(force, state)

set the torque that is acting on the origin of this FTsensor

setTransform(t3d)

set the transform between frame and origin. The origin of the sensor is the frame where sensor data is described. :type t3d: rw::math::Transform3D< double > :param t3d: [in] transformation from frame to origin

setWrench(wrench, state)

set the wrench that is acting on the origin of this FTsensor

property thisown

The membership flag

unregister()

unregisters all state data of this stateless object

class sdurw.FTSensorPtr(*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.

acquire()

acquires force data from the tactile cells

deref()

The pointer stored in the object.

getDeref()

Member access operator.

getDescription()

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getForce()

gets the force in N that is acting on the origin. The force is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: force acting on origin.

getMaxForce()

gets the maximum force in Newton that this sensor can measure on any of its axis. :rtype: float :return: max force in Newton.

getMaxTorque()

gets the maximum torque in Newton Meter (N m)that this sensor can measure on any of its axis. :rtype: float :return: max torque in Newton Meter(N m).

getName()

returns the name of this sensor

Return type

string

Returns

name of sensor

getPropertyMap()

gets the propertymap of this sensor

getSensorModel()

The frame to which the sensor is attached.

The frame can be NULL. :rtype: rw::core::Ptr< SensorModel > :return: pointer to sensor model

getTorque()

gets the torgue in Nm that is acting on the origin. The torque is described in relation to the origin. :rtype: rw::math::Vector3D< double > :return: torque acting on origin.

getTransform()

the transform from the sensor frame to the point of origin. :rtype: rw::math::Transform3D< double > :return: transform from sensor frame to point of origin.

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.

setSensorModel(smodel)

Sets the frame to which the sensor should be attached

Parameters

smodel (rw::core::Ptr< SensorModel >) – set the sensor model

property thisown

The membership flag

class sdurw.FixedFrame(name, transform)

Bases: sdurw.Frame

FixedFrame is a frame for which the transform relative to the parent is constant.

A fixed frame can for example be used for attaching a camera, say, with a fixed offset relative to the tool.

__init__(name, transform)

A frame fixed to its parent with a constant relative transform of transform.

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

  • transform (rw::math::Transform3D< double >) – [in] The transform with which to attach the frame.

getFixedTransform()

get the fixed transform of this frame.

moveTo(refTtarget, refframe, state)

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

setTransform(transform)

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

property thisown

The membership flag

class sdurw.FixedFramePtr(*args)

Bases: object

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

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

attachTo(parent, state)

Move a frame within the tree.

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

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

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

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

deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame.

Parameters
  • to (Frame) – [in] the other frame

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

Return type

rw::math::Transform3D< double >

Returns

transform of frame to relative to this frame.

getCache(state)

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

getChildren(state)

Iterator pair for all children of the frame.

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.

getDafParent(*args)

Overload 1:

The dynamically attached parent or NULL if the frame is not a DAF.


Overload 2:

The dynamically attached parent or NULL if the frame is not a DAF.

getData(state)

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

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

Parameters

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

Return type

float

Returns

The values for the frame.

getDataVector(state)

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

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

Parameters

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

Return type

std::vector< double,std::allocator< double > >

Returns

The values for the frame.

getDefaultCache()

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

getDeref()

Member access operator.

getFixedTransform()

get the fixed transform of this frame.

getID()

An integer ID for the StateData.

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

StateData present in different trees may have identical IDs.

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

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args)
Overload 1:

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


Overload 2:

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


Overload 3:

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 4:

Returns the parent of the frame

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

Parameters

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

Return type

Frame

Returns

the parent

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the frame.

The property map of the frame is provided to let the user store various settings for the frame. 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 frame.


Overload 2:

Miscellaneous properties of the frame.

The property map of the frame is provided to let the user store various settings for the frame. 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 frame.

getStateStructure()

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

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

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

Parameters

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

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

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

isDAF()

Test if this frame is a Dynamically Attachable Frame

Return type

boolean

Returns

true if this frame is a DAF, false otherwise

isNull()

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

isShared()

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

moveTo(refTtarget, refframe, state)

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

multiplyTransform(parent, state, result)

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

The transform is calculated for the joint values of state.

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

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

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

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

setCache(cache, state)

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

setData(state, vals)

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

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

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

  • vals (float) – [in] The joint values to assign.

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

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

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

size()

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

Return type

int

Returns

The number of doubles allocated by the StateData

property thisown

The membership flag

wTf(state)

Get the transform relative to world.

Parameters

state (State) – [in] the state.

Return type

rw::math::Transform3D< double >

Returns

transform relative to world.

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

Bases: sdurw.StateData

The type of node of forward kinematic trees.

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

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

__init__(*args, **kwargs)

Overload 1:

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

size must be non-negative.

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

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

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

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


Overload 2:

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

attachTo(parent, state)

Move a frame within the tree.

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

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

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

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

fTf(to, state)

Get the transform of other frame relative to this frame.

Parameters
  • to (Frame) – [in] the other frame

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

Return type

rw::math::Transform3D< double >

Returns

transform of frame to relative to this frame.

getChildren(state)

Iterator pair for all children of the frame.

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.

getDafParent(*args)

Overload 1:

The dynamically attached parent or NULL if the frame is not a DAF.


Overload 2:

The dynamically attached parent or NULL if the frame is not a DAF.

getParent(*args)
Overload 1:

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


Overload 2:

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


Overload 3:

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 4:

Returns the parent of the frame

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

Parameters

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

Return type

Frame

Returns

the parent

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the frame.

The property map of the frame is provided to let the user store various settings for the frame. 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 frame.


Overload 2:

Miscellaneous properties of the frame.

The property map of the frame is provided to let the user store various settings for the frame. 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 frame.

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

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

Parameters

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

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

isDAF()

Test if this frame is a Dynamically Attachable Frame

Return type

boolean

Returns

true if this frame is a DAF, false otherwise

multiplyTransform(parent, state, result)

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

The transform is calculated for the joint values of state.

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

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

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

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

property thisown

The membership flag

wTf(state)

Get the transform relative to world.

Parameters

state (State) – [in] the state.

Return type

rw::math::Transform3D< double >

Returns

transform relative to world.

class sdurw.FrameCPtr(*args)

Bases: object

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

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame.

Parameters
  • to (Frame) – [in] the other frame

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

Return type

rw::math::Transform3D< double >

Returns

transform of frame to relative to this frame.

getDOF()

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

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

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

Return type

int

Returns

The number of degrees of freedom of the frame.

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

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

StateData present in different trees may have identical IDs.

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

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args)
Overload 1:

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


Overload 2:

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


Overload 3:

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 4:

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

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

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

Parameters

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

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

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

isNull()

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

isShared()

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

multiplyTransform(parent, state, result)

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

The transform is calculated for the joint values of state.

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

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

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

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

setData(state, vals)

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

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

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

  • vals (float) – [in] The joint values to assign.

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

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i  data.getDOF(); i++)
  q_in[i] == q_out[i];
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.

Parameters

state (State) – [in] the state.

Return type

rw::math::Transform3D< double >

Returns

transform relative to world.

class sdurw.FrameMapd(defaultVal, s=20)

Bases: object

__init__(defaultVal, s=20)

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

clear()

Clear the frame map.

erase(frame)

Erase an element from the map

has(frame)

True iff a value for frame has been inserted in the map (or

accessed using non-const operator[]).

insert(frame, value)

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

property thisown

The membership flag

class sdurw.FramePair(*args)

Bases: object

__init__(*args)

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

property first
property second
property thisown

The membership flag

class sdurw.FramePairVector(*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.FramePtr(*args)

Bases: object

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

__init__(*args)

Overload 1:

Default constructor yielding a NULL-pointer.


Overload 2:

Do not take ownership of ptr.

ptr can be null.

The constructor is implicit on purpose.

attachTo(parent, state)

Move a frame within the tree.

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

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

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

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

deref()

The pointer stored in the object.

fTf(to, state)

Get the transform of other frame relative to this frame.

Parameters
  • to (Frame) – [in] the other frame

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

Return type

rw::math::Transform3D< double >

Returns

transform of frame to relative to this frame.

getCache(state)

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

getChildren(state)

Iterator pair for all children of the frame.

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.

getDafParent(*args)

Overload 1:

The dynamically attached parent or NULL if the frame is not a DAF.


Overload 2:

The dynamically attached parent or NULL if the frame is not a DAF.

getData(state)

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

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

Parameters

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

Return type

float

Returns

The values for the frame.

getDataVector(state)

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

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

Parameters

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

Return type

std::vector< double,std::allocator< double > >

Returns

The values for the frame.

getDefaultCache()

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

getDeref()

Member access operator.

getID()

An integer ID for the StateData.

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

StateData present in different trees may have identical IDs.

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

Return type

int

Returns

An integer ID for the frame.

getName()

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args)
Overload 1:

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


Overload 2:

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


Overload 3:

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 4:

Returns the parent of the frame

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

Parameters

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

Return type

Frame

Returns

the parent

getPropertyMap(*args)

Overload 1:

Miscellaneous properties of the frame.

The property map of the frame is provided to let the user store various settings for the frame. 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 frame.


Overload 2:

Miscellaneous properties of the frame.

The property map of the frame is provided to let the user store various settings for the frame. 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 frame.

getStateStructure()

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

getTransform(state)

The transform of the frame relative to its parent.

The transform is calculated for the joint values of state.

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

Parameters

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

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to its parent.

hasCache()

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

isDAF()

Test if this frame is a Dynamically Attachable Frame

Return type

boolean

Returns

true if this frame is a DAF, false otherwise

isNull()

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

isShared()

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

multiplyTransform(parent, state, result)

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

The transform is calculated for the joint values of state.

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

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

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

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

setCache(cache, state)

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

setData(state, vals)

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

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

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

  • vals (float) – [in] The joint values to assign.

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

data.setData(state, q_in);
const double* q_out = data.getData(state);
for (int i = 0; i  data.getDOF(); i++)
  q_in[i] == q_out[i];
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.

Parameters

state (State) – [in] the state.

Return type

rw::math::Transform3D< double >

Returns

transform relative to world.

class sdurw.FrameType(type)

Bases: object

Enumeration of all concrete frame types of RobWork.

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

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

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

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

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

Identifier for a frame of type type.

Parameters

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

get()

The frame type.

Return type

int

Returns

The frame type.

property thisown

The membership flag

class sdurw.FrameVector(*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.Function1Diffddd(*args, **kwargs)

Bases: sdurw.Functiondd

Interface for functions which are 1 time differentiable

__init__(*args, **kwargs)

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

df(q)

Returns gradient(derivative) of the function

property thisown

The membership flag

class sdurw.Function1DiffdddPtr(*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.

df(q)

Returns gradient(derivative) of the function

f(q)

Returns function value for arguments q.

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.

operate(q)

Wraps the evaluation of x() with operator().

property thisown

The membership flag

class sdurw.Functiondd(*args, **kwargs)

Bases: object

Interface for functions

__init__(*args, **kwargs)

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

f(q)

Returns function value for arguments q.

operate(q)

Wraps the evaluation of x() with operator().

property thisown

The membership flag

class sdurw.Geometry(*args)

Bases: object

__init__(*args)

Overload 1:

constructor - autogenerated id from geometry type. :type data: rw::core::Ptr< GeometryData > :param data: :type scale: float :param scale:


Overload 2:

constructor giving a specified id. :type data: rw::core::Ptr< GeometryData > :param data: [in] pointer to geometry data :type name: string :param name: [in] Unique name to be assigned for the geometry :type scale: float :param scale: [in] scaling factor


Overload 3:

constructor giving a specified id. :type data: rw::core::Ptr< GeometryData > :param data: [in] pointer to geometry data :type name: string :param name: [in] Unique name to be assigned for the geometry :param scale: [in] scaling factor


Overload 4:

constructor - autogenerated id from geometry type. :type data: rw::core::Ptr< GeometryData > :param data: [in] pointer to geometry data :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform :type scale: float :param scale: [in] scaling factor


Overload 5:

constructor - autogenerated id from geometry type. :type data: rw::core::Ptr< GeometryData > :param data: [in] pointer to geometry data :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform :param scale: [in] scaling factor

getColor(color)

get the color stored for the object :type color: float :param color: [out] the array to store the color in

getFilePath()

get file path of this geometry :rtype: string :return: the file path as string

getFrame()

Get the reference frame. :rtype: Frame :return: the reference frame.

getGeometryData(*args)

Overload 1:

get geometry data :rtype: rw::core::Ptr< GeometryData > :return: the geometry data stored


Overload 2:

get geometry data :rtype: rw::core::Ptr< GeometryData > :return: the geometry data stored

getId()

get identifier of this geometry :rtype: string :return: the id of the geometry

getMask()

Get the draw mask. :rtype: int :return: the draw mask.

getName()

get name of this geometry :rtype: string :return: name as string

getScale()

gets the scaling factor applied when using this geometry :rtype: float :return: the scale as double

getTransform()

get transformation :rtype: rw::math::Transform3D< double > :return: the Current transform

static makeBox(x, y, z)

util function for creating a Box geometry

static makeCone(height, radiusTop, radiusBot)

util function for creating a Cone geometry

static makeCylinder(radius, height)

util function for creating a Cylinder geometry

static makeGrid(*args)

Construct a grid. :type dim_x: int :param dim_x: [in] number of cells in first direction. :type dim_y: int :param dim_y: [in] number of cells in second direction. :type size_x: float :param size_x: [in] size of one cell. :type size_y: float :param size_y: [in] size of one cell. :type xdir: rw::math::Vector3D< double > :param xdir: [in] the direction of the first dimension. :type ydir: rw::math::Vector3D< double > :param ydir: [in] the direction of the second dimension. :rtype: rw::core::Ptr< Geometry > :return: a new grid geometry.

static makeSphere(radi)

util function for creating a Sphere geometry

setColor(red, green, blue)

set the color of the geometry :type red: unsigned char :param red: [in] the amount of red color 0-255 :type green: unsigned char :param green: [in] the amount of green color 0-255 :type blue: unsigned char :param blue: [in] the amount of red color 0-255

setFilePath(name)

set file path this geometry :type name: string :param name: [in] path to a geometry file

setGeometryData(data)

set transformation :type data: rw::core::Ptr< GeometryData > :param data: [in] the new geometry data

setId(id)

set identifier of this geometry :type id: string :param id: [in] new id

setMask(mask)

Set the draw mask. :type mask: int :param mask: [in] the draw mask.

setName(name)

set name of this geometry :type name: string :param name: [in] the new name of the geometry

setScale(scale)

set the scaling factor that should be applied to this geometry when used. :type scale: float :param scale: [in] scale factor

setTransform(t3d)

set transformation :param t2d: [in] the new transform

property thisown

The membership flag

class sdurw.GeometryData(*args, **kwargs)

Bases: object

AABBPrim = 7
BoxPrim = 5
ConePrim = 11
CylinderPrim = 13
IdxTriMesh = 3
LinePrim = 8
OBBPrim = 6
PlainTriMesh = 2
PlanePrim = 15
PointPrim = 9
PyramidPrim = 10
RayPrim = 16
SpherePrim = 4
TrianglePrim = 12
UserType = 19
__init__(*args, **kwargs)

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

getTriMesh(forceCopy=True)

gets a trimesh representation of this geometry data.

The trimesh that is returned is by default a copy, which means ownership is transfered to the caller. :type forceCopy: boolean :param forceCopy: Specifying forceCopy to false will enable copy by reference and

ownership is not necesarilly transfered. This is more efficient, though pointer is only alive as long as this GeometryData is alive.

Return type

rw::core::Ptr< TriMesh >

Returns

TriMesh representation of this GeometryData

getType()

the type of this primitive

Return type

int

Returns

the type of primitive.

isConvex()

test if this geometry data is convex :rtype: boolean :return:

property thisown

The membership flag

static toString(type)

format GeometryType to string :type type: int :param type: [in] the type of geometry to convert to string. :rtype: string :return: a string.

class sdurw.GeometryDataPtr(*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.

getTriMesh(forceCopy=True)

gets a trimesh representation of this geometry data.

The trimesh that is returned is by default a copy, which means ownership is transfered to the caller. :type forceCopy: boolean :param forceCopy: Specifying forceCopy to false will enable copy by reference and

ownership is not necesarilly transfered. This is more efficient, though pointer is only alive as long as this GeometryData is alive.

Return type

rw::core::Ptr< TriMesh >

Returns

TriMesh representation of this GeometryData

getType()

the type of this primitive

Return type

int

Returns

the type of primitive.

isConvex()

test if this geometry data is convex :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.

property thisown

The membership flag

toString(type)

format GeometryType to string :type type: int :param type: [in] the type of geometry to convert to string. :rtype: string :return: a string.

sdurw.GeometryData_toString(type)

format GeometryType to string :type type: int :param type: [in] the type of geometry to convert to string. :rtype: string :return: a string.

class sdurw.GeometryPtr(*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.

getColor(color)

get the color stored for the object :type color: float :param color: [out] the array to store the color in

getDeref()

Member access operator.

getFilePath()

get file path of this geometry :rtype: string :return: the file path as string

getFrame()

Get the reference frame. :rtype: Frame :return: the reference frame.

getGeometryData(*args)

Overload 1:

get geometry data :rtype: rw::core::Ptr< GeometryData > :return: the geometry data stored


Overload 2:

get geometry data :rtype: rw::core::Ptr< GeometryData > :return: the geometry data stored

getId()

get identifier of this geometry :rtype: string :return: the id of the geometry

getMask()

Get the draw mask. :rtype: int :return: the draw mask.

getName()

get name of this geometry :rtype: string :return: name as string

getScale()

gets the scaling factor applied when using this geometry :rtype: float :return: the scale as double

getTransform()

get transformation :rtype: rw::math::Transform3D< double > :return: the Current transform

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.

makeBox(x, y, z)

util function for creating a Box geometry

makeCone(height, radiusTop, radiusBot)

util function for creating a Cone geometry

makeCylinder(radius, height)

util function for creating a Cylinder geometry

makeGrid(*args)

Construct a grid. :type dim_x: int :param dim_x: [in] number of cells in first direction. :type dim_y: int :param dim_y: [in] number of cells in second direction. :type size_x: float :param size_x: [in] size of one cell. :type size_y: float :param size_y: [in] size of one cell. :type xdir: rw::math::Vector3D< double > :param xdir: [in] the direction of the first dimension. :type ydir: rw::math::Vector3D< double > :param ydir: [in] the direction of the second dimension. :rtype: rw::core::Ptr< Geometry > :return: a new grid geometry.

makeSphere(radi)

util function for creating a Sphere geometry

setColor(red, green, blue)

set the color of the geometry :type red: unsigned char :param red: [in] the amount of red color 0-255 :type green: unsigned char :param green: [in] the amount of green color 0-255 :type blue: unsigned char :param blue: [in] the amount of red color 0-255

setFilePath(name)

set file path this geometry :type name: string :param name: [in] path to a geometry file

setGeometryData(data)

set transformation :type data: rw::core::Ptr< GeometryData > :param data: [in] the new geometry data

setId(id)

set identifier of this geometry :type id: string :param id: [in] new id

setMask(mask)

Set the draw mask. :type mask: int :param mask: [in] the draw mask.

setName(name)

set name of this geometry :type name: string :param name: [in] the new name of the geometry

setScale(scale)

set the scaling factor that should be applied to this geometry when used. :type scale: float :param scale: [in] scale factor

setTransform(t3d)

set transformation :param t2d: [in] the new transform

property thisown

The membership flag

class sdurw.GeometryPtrVector(*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.Geometry_makeBox(x, y, z)

util function for creating a Box geometry

sdurw.Geometry_makeCone(height, radiusTop, radiusBot)

util function for creating a Cone geometry

sdurw.Geometry_makeCylinder(radius, height)

util function for creating a Cylinder geometry

sdurw.Geometry_makeGrid(*args)

Construct a grid. :type dim_x: int :param dim_x: [in] number of cells in first direction. :type dim_y: int :param dim_y: [in] number of cells in second direction. :type size_x: float :param size_x: [in] size of one cell. :type size_y: float :param size_y: [in] size of one cell. :type xdir: rw::math::Vector3D< double > :param xdir: [in] the direction of the first dimension. :type ydir: rw::math::Vector3D< double > :param ydir: [in] the direction of the second dimension. :rtype: rw::core::Ptr< Geometry > :return: a new grid geometry.

sdurw.Geometry_makeSphere(radi)

util function for creating a Sphere geometry

class sdurw.IKMetaSolver(*args, **kwargs)

Bases: sdurw.IterativeIK

Solve the inverse kinematics problem with respect to joint limits and collisions.

Given an arbitrary iterative inverse kinematics solver, the IKMetaSolver attempts to find a collision free solution satisfying joint limits. It repeatingly calls the iterative solver with new random start configurations until either a solution is found or a specified max attempts has been reached.

__init__(*args, **kwargs)

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

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

setMaxAttempts(maxAttempts)

Sets up the maximal number of attempts

Parameters

maxAttempts (int) – [in] Maximal number of attempts

setProximityLimit(limit)

Sets the distance for which two solutions are considered the same.

For distance measure an infinite norm is used. Default value is set to 1e-5.

Set limit < 0 to allow doublets in the solution.

Parameters

limit (float) – [in] The proximity limit.

setStopAtFirst(stopAtFirst)

Sets whether to stop searching after the first solution

Parameters

stopAtFirst (boolean) – [in] True to stop after first solution has been found

solve(*args)

Overload 1:

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.

Searches for a valid solution using the parameters set in the IKMetaSolver


Overload 2:

Solves the inverse kinematics problem

Tries to solve the inverse kinematics problem using the iterative inverse kinematics solver provided in the constructor. It tries at most cnt times and can either be stopped after the first solution is found or continue to search for solutions. If multiple solutions are returned there might be duplicates in the list.

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transform

  • state (State) – [in] State of the workcell

  • cnt (int) – [in] Maximal number of attempts

  • stopatfirst (boolean) – [in] If true the method will return after the first solution is found. If false it will continue searching for more solution until the maximal number of attemps is met.

property thisown

The membership flag

class sdurw.IKMetaSolverPtr(*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.

getMaxError()

Returns the maximal error for a solution

Return type

float

Returns

Maximal error

getMaxIterations()

Returns the maximal number of iterations

getProperties(*args)

Overload 1:

Returns the PropertyMap

Return type

PropertyMap

Returns

Reference to the PropertyMap


Overload 2:

Returns the PropertyMap

return Reference to the PropertyMap

getTCP()

Returns the Tool Center Point (TCP) used when solving the IK problem.

Return type

rw::core::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

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.

makeDefault(device, state)

Default iterative inverse kinematics solver for a device and state.

Parameters
  • device (rw::core::Ptr< Device >) – [in] Device for which to solve IK.

  • state (State) – [in] Fixed state for which IK is solved.

setCheckJointLimits(check)

Specifies whether to check joint limits before returning a solution.

Parameters

check (boolean) – [in] If true the method should perform a check that joints are within bounds.

setMaxAttempts(maxAttempts)

Sets up the maximal number of attempts

Parameters

maxAttempts (int) – [in] Maximal number of attempts

setMaxError(maxError)

Sets the maximal error for a solution

The error between two transformations is defined as the maximum of infinite-norm of the positional error and the angular error encoded as EAA.

Parameters

maxError (float) – [in] the maxError. It will be assumed that maxError > 0

setMaxIterations(maxIterations)

Sets the maximal number of iterations allowed

Parameters

maxIterations (int) – [in] maximal number of iterations

setProximityLimit(limit)

Sets the distance for which two solutions are considered the same.

For distance measure an infinite norm is used. Default value is set to 1e-5.

Set limit < 0 to allow doublets in the solution.

Parameters

limit (float) – [in] The proximity limit.

setStopAtFirst(stopAtFirst)

Sets whether to stop searching after the first solution

Parameters

stopAtFirst (boolean) – [in] True to stop after first solution has been found

solve(*args)

Overload 1:

Calculates the inverse kinematics

Given a desired transformation and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transformation.

  • state (State) – [in] State of the device from which to start the iterations

Return type

std::vector< Q,std::allocator< Q > >

Returns

List of solutions. Notice that the list may be empty.

Notes: The targets baseTend must be defined relative to the base of the robot/device.

Searches for a valid solution using the parameters set in the IKMetaSolver


Overload 2:

Solves the inverse kinematics problem

Tries to solve the inverse kinematics problem using the iterative inverse kinematics solver provided in the constructor. It tries at most cnt times and can either be stopped after the first solution is found or continue to search for solutions. If multiple solutions are returned there might be duplicates in the list.

Parameters
  • baseTend (rw::math::Transform3D< double >) – [in] Desired base to end transform

  • state (State) – [in] State of the workcell

  • cnt (int) – [in] Maximal number of attempts

  • stopatfirst (boolean) – [in] If true the method will return after the first solution is found. If false it will continue searching for more solution until the maximal number of attemps is met.

property thisown

The membership flag

class sdurw.Image(*args)

Bases: object

The image class is a simple wrapper around a char data array. This Image wrapper contain information of width, height and encoding.

The image class is somewhat inspired by the IplImage of opencv.

The coordinate system has its origin located at the top-left position, where from X increases to the left and Y-increases downwards.

setting pixel values in an efficient manner has been enabled using some template joggling. It requires that the user know what type of image he/she is working with.

BGR = 3

3-channel color image (Standard OpenCV)

BGRA = 4

4-channel color image with alpha channel

BayerBG = 5
Depth16S = 3
Depth16U = 2
Depth32F = 5
Depth32S = 4
Depth8S = 1
Depth8U = 0
GRAY = 0

Grayscale image 1-channel

HLS = 8
Lab = 7
Luv = 6
RGB = 1

3-channel color image (Standard opengl)

RGBA = 2

4-channel color image with alpha channel

User = 9
__init__(*args)

Overload 1:

default constructor


Overload 2:

constructor

Parameters
  • width (int) – [in] width of the image

  • height (int) – [in] height of the image

  • encoding (int) – [in] the colorCode of this Image

  • depth (int) – [in] the pixel depth in bits per channel


Overload 3:

constructor

Parameters
  • imgData (string) – [in] char pointer that points to an array of chars with length width*height*(bitsPerPixel/8)

  • width (int) – [in] width of the image

  • height (int) – [in] height of the image

  • encoding (int) – [in] the colorCode of this Image

  • depth (int) – [in] the pixel depth in bits per channel

copyFlip(horizontal, vertical)

copies this image and flips it around horizontal or vertical axis or both.

Return type

rw::core::Ptr< Image >

Returns

new image.

getBitsPerPixel()

returns the number of bits per pixel. This is the number of bits used per pixel per channel.

Return type

int

Returns

number of bits per pixel

getColorEncoding()

returns color encoding/type of this image

Return type

int

Returns

ColorCode of this image

getDataSize()

returns the size of the char data array

Return type

int

Returns

size of char data array

getHeight()

returns the height of this image

Return type

int

Returns

image height

getImageData()

returns a char pointer to the image data

Return type

string

Returns

const char pointer to the image data

getImageDimension()

returns the dimensions (width and height) of this image :rtype: std::pair< unsigned int,unsigned int > :return: a pair of integers where first is the width and second

is the height

getNrOfChannels()

The number of channels that this image has.

Return type

int

Returns

nr of channels

getPixel(*args)

Overload 1:

generic but inefficient access to pixel information. The float value is between [0;1] which means non float images are scaled according to their pixel depth (bits per pixel). :type x: int :param x: [in] x coordinate :type y: int :param y: [in] y coordinate :rtype: Pixel4f :return: up to 4 pixels (depends on nr of channels) in a float format


Overload 2:

generic but inefficient access to pixel information. The float value is between [0;1] which means non float images are scaled according to their pixel depth (bits per pixel). :type x: int :param x: [in] x coordinate :type y: int :param y: [in] y coordinate :type dst: Pixel4f :param dst: [out] up to 4 pixels (depends on nr of channels) in a float format


Overload 3:

generic access to pixel information, however user must take care of the pixel depth himself. If image is a Depth8U then the maximum value is 254. Also float images are scaled accordingly. :type x: int :param x: [in] x coordinate :type y: int :param y: [in] y coordinate :type dst: Pixel4i :param dst: [out] up to 4 pixels (depends on nr of channels) in a float format

getPixelDepth()

bits per pixel encoded as a PixelDepth type.

Return type

int

Returns

the pixel depth

getPixelValue(x, y, channel)

generic but inefficient access to a specific channel of a pixel.

Parameters
  • x (int) – [in]

  • y (int) – [in]

  • channel (int) – documentation missing !

Return type

float

Returns

the pixel value.

getPixelValuef(x, y, channel)
getPixelValuei(x, y, channel)
getPixelf(x, y)
getPixeli(x, y)

generic access to pixel information, however user must take care of the pixel depth himself. If image is a Depth8U then the maximum value is 254. Also float images are scaled accordingly. :type x: int :param x: [in] x coordinate :type y: int :param y: [in] y coordinate :rtype: Pixel4i :return: up to 4 pixels (depends on nr of channels) as ints

getWidth()

returns the width of this image

Return type

int

Returns

image width

getWidthStep()

the size of an aligned image row in bytes. This may not be the same as the width if extra bytes are padded to each row for alignment purposes.

Return type

int

Returns

size of aligned image row

resize(width, height)

resizes the current image.

Parameters
  • width (int) – [in] width in pixels

  • height (int) – [in] height in pixels

saveAsPGM(fileName)

saves this image to a file in the PGM (grayscale) format

Parameters

fileName (string) – [in] the name of the file that is to be created

Return type

boolean

Returns

true if save was succesfull, false otherwise

saveAsPGMAscii(fileName)

saves this image to a file in the ascii PGM (grayscale) format

Parameters

fileName (string) – [in] the name of the file that is to be created

Return type

boolean

Returns

true if save was succesfull, false otherwise

saveAsPPM(fileName)

saves this image to a file in the PPM (color) format

Parameters

fileName (string) – [in] the name of the file that is to be created

Return type

boolean

Returns

true if save was succesfull, false otherwise

setImageData(data)

sets the data array of this image. Make sure to change the height and width accordingly.

property thisown

The membership flag

class sdurw.ImageLoader(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

getImageFormats()
isImageSupported(format)
loadImage(filename)
property thisown

The membership flag

class sdurw.ImageLoaderFactory

Bases: object

__init__()

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

static getImageLoader(format)
static getSupportedFormats()