sdurw module

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

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Q
dx(t: double) → rw::math::Q
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Q
class sdurw.BlendQPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Blend< rw::math::Q >) – The object to take ownership of.

ddx(t: double) → rw::math::Q
dx(t: double) → rw::math::Q
get() → Blend< rw::math::Q > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Q
class sdurw.BlendR1(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → double
dx(t: double) → double
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → double
class sdurw.BlendR1Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Blend< double >) – The object to take ownership of.

ddx(t: double) → double
dx(t: double) → double
get() → Blend< double > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
tau1() → double
tau2() → double
property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Vector2D< double >
dx(t: double) → rw::math::Vector2D< double >
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Vector2D< double >
class sdurw.BlendR2Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Blend< rw::math::Vector2D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Vector2D< double >
dx(t: double) → rw::math::Vector2D< double >
get() → Blend< rw::math::Vector2D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Vector2D< double >
class sdurw.BlendR3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Vector3D< double >
dx(t: double) → rw::math::Vector3D< double >
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Vector3D< double >
class sdurw.BlendR3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Blend< rw::math::Vector3D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Vector3D< double >
dx(t: double) → rw::math::Vector3D< double >
get() → Blend< rw::math::Vector3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Vector3D< double >
class sdurw.BlendSE3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Transform3D< double >
dx(t: double) → rw::math::Transform3D< double >
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Transform3D< double >
class sdurw.BlendSE3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Blend< rw::math::Transform3D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Transform3D< double >
dx(t: double) → rw::math::Transform3D< double >
get() → Blend< rw::math::Transform3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Transform3D< double >
class sdurw.BlendSO3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Rotation3D< double >
dx(t: double) → rw::math::Rotation3D< double >
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Rotation3D< double >
class sdurw.BlendSO3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Blend< rw::math::Rotation3D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Rotation3D< double >
dx(t: double) → rw::math::Rotation3D< double >
get() → Blend< rw::math::Rotation3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
tau1() → double
tau2() → double
property thisown

The membership flag

x(t: double) → rw::math::Rotation3D< double >
class sdurw.Box(*args)

Bases: sdurw.Primitive

__init__(*args)

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

createMesh(resolution: int) → rw::common::Ptr< TriMesh >
getParameters() → rw::math::Q
getType() → GeometryData::GeometryType

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() → void

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

getFrameRate() → double

returns the framerate that this camera is setup with

Return type

float

Returns

the framerate in frames per second

getGain() → double

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() → unsigned int

get width of the captured images

Return type

int

Returns

width

getImage() → Image const *

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() → std::string

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

Return type

string

Returns

camera model information

getShutter() → double

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.

getWidth() → unsigned int

get width of the captured images

Return type

int

Returns

width

initialize() → bool

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

Return type

boolean

Returns

true if initialization is succesfully, false otherwise.

isGainAvailable() → bool

Check if gain is available.

Return type

boolean

Returns

True if zoom is available

isImageReady() → bool

tests whether a image has been acquired

Return type

boolean

Returns

true if an image has been acquired, false otherwise.

isInitialized() → bool

returns whether this camera is initialized or not.

Return type

boolean

Returns

true if intialized, false otherwise

isShutterAvailable() → bool

Check if shutter is available.

Return type

boolean

Returns

True if shutter is available

isStarted() → bool

returns whether this camera is started or not.

Return type

boolean

Returns

true if started, false otherwise

setFrameRate(framerate: double) → void

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: double) → double

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: double) → void

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() → bool

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() → void

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

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() → double

get far clipping plane

getFieldOfViewX() → double

get horisontal field of view in degrees.

getFieldOfViewY() → double

get vertical field of view in degrees.

getImage(state: State) → rw::common::Ptr< Image >

returns the image if it has been saved in the State. Else null is returned.

Return type

rw::common::Ptr< Image >

Returns

last image captured from camera.

getNearClippingPlane() → double

get near clipping plane

setImage(img: ImagePtr, state: State) → void

set the image in the state

Parameters
  • img (rw::common::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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (CameraModel) – The object to take ownership of.

get() → CameraModel const *
getDescription() → std::string const &

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getFarClippingPlane() → double

get far clipping plane

getFieldOfViewX() → double

get horisontal field of view in degrees.

getFieldOfViewY() → double

get vertical field of view in degrees.

getFrame() → Frame *

The frame to which the sensor is attached.

The frame can be NULL.

getName() → std::string const &

returns the name of this sensor

Return type

string

Returns

name of sensor

getNearClippingPlane() → double

get near clipping plane

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.CameraModelPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (CameraModel) – The object to take ownership of.

attachTo(frame: Frame) → void

Sets the frame to which the sensor should be attached

Parameters

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

get() → CameraModel *
getDescription() → std::string const &

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getFarClippingPlane() → double

get far clipping plane

getFieldOfViewX() → double

get horisontal field of view in degrees.

getFieldOfViewY() → double

get vertical field of view in degrees.

getFrame() → Frame *

The frame to which the sensor is attached.

The frame can be NULL.

getImage(state: State) → rw::common::Ptr< Image >

returns the image if it has been saved in the State. Else null is returned.

Return type

rw::common::Ptr< Image >

Returns

last image captured from camera.

getName() → std::string const &

returns the name of this sensor

Return type

string

Returns

name of sensor

getNearClippingPlane() → double

get near clipping plane

getPropertyMap() → PropertyMap &

gets the propertymap of this sensor

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setDescription(description: std::string const &) → void

sets the description of this sensor

Parameters

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

setImage(img: ImagePtr, state: State) → void

set the image in the state

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

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

setName(name: std::string const &) → void

sets the name of this sensor

Parameters

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

property thisown

The membership flag

class sdurw.CameraPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Camera) – The object to take ownership of.

acquire() → void

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

get() → Camera *
getDescription() → std::string const &

returns a description of this sensor

Return type

string

Returns

reference to this sensors description

getFrameRate() → double

returns the framerate that this camera is setup with

Return type

float

Returns

the framerate in frames per second

getGain() → double

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() → unsigned int

get width of the captured images

Return type

int

Returns

width

getImage() → Image const *

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() → std::string

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

Return type

string

Returns

camera model information

getName() → std::string const &

returns the name of this sensor

Return type

string

Returns

name of sensor

getPropertyMap() → PropertyMap &

gets the propertymap of this sensor

getSensorModel() → rw::common::Ptr< SensorModel >

The frame to which the sensor is attached.

The frame can be NULL.

getShutter() → double

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.

getWidth() → unsigned int

get width of the captured images

Return type

int

Returns

width

initialize() → bool

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

Return type

boolean

Returns

true if initialization is succesfully, false otherwise.

isGainAvailable() → bool

Check if gain is available.

Return type

boolean

Returns

True if zoom is available

isImageReady() → bool

tests whether a image has been acquired

Return type

boolean

Returns

true if an image has been acquired, false otherwise.

isInitialized() → bool

returns whether this camera is initialized or not.

Return type

boolean

Returns

true if intialized, false otherwise

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
isShutterAvailable() → bool

Check if shutter is available.

Return type

boolean

Returns

True if shutter is available

isStarted() → bool

returns whether this camera is started or not.

Return type

boolean

Returns

true if started, false otherwise

setFrameRate(framerate: double) → void

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: double) → double

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: SensorModelPtr) → void

Sets the frame to which the sensor should be attached

Parameters

smodel (rw::common::Ptr< SensorModel >) –

setShutter(Value: double) → void

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() → bool

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() → void

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: Device, state: State) → rw::common::Ptr< ClosedFormIK >

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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ClosedFormIK) – The object to take ownership of.

get() → ClosedFormIK *
getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
make(device: Device, state: State) → rw::common::Ptr< ClosedFormIK >

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: bool) → void

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: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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: sdurw.SerialDeviceCPtr, state: sdurw.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: sdurw.SerialDeviceCPtr, state: sdurw.State)

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

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

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

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

setCheckJointLimits(check: bool) → void

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) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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< rw::math::Q,std::allocator< rw::math::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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ClosedFormIKSolverKukaIIWA) – The object to take ownership of.

get() → ClosedFormIKSolverKukaIIWA *
getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
make(device: Device, state: State) → rw::common::Ptr< ClosedFormIK >

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: bool) → void

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) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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< rw::math::Q,std::allocator< rw::math::Q > >

Returns

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

property thisown

The membership flag

class sdurw.ClosedFormIKSolverUR(device: sdurw.SerialDeviceCPtr, state: sdurw.State)

Bases: sdurw.ClosedFormIK

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

__init__(device: sdurw.SerialDeviceCPtr, state: sdurw.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::common::Ptr< SerialDevice const >) – [in] the device.

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

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

setCheckJointLimits(check: bool) → void

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: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ClosedFormIKSolverUR) – The object to take ownership of.

get() → ClosedFormIKSolverUR const *
getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
solve(baseTend: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ClosedFormIKSolverUR) – The object to take ownership of.

get() → ClosedFormIKSolverUR *
getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
make(device: Device, state: State) → rw::common::Ptr< ClosedFormIK >

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: bool) → void

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: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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: Device, state: State) → rw::common::Ptr< ClosedFormIK >

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

__init__(*args)

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

inCollision(*args) → bool

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 (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 3:

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: WorkCellPtr, strategy: CollisionStrategyPtr) → rw::common::Ptr< CollisionDetector >
property thisown

The membership flag

class sdurw.CollisionDetectorPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (CollisionDetector) – The object to take ownership of.

get() → CollisionDetector *
inCollision(*args) → bool

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 (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 3:

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() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
make(workcell: WorkCellPtr, strategy: CollisionStrategyPtr) → rw::common::Ptr< CollisionDetector >
property thisown

The membership flag

sdurw.CollisionDetector_make(workcell: WorkCellPtr, strategy: CollisionStrategyPtr) → rw::common::Ptr< CollisionDetector >
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.

property thisown

The membership flag

class sdurw.CollisionStrategyPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (CollisionStrategy) – The object to take ownership of.

get() → CollisionStrategy *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.CompositeDevice(*args)

Bases: sdurw.JointDevice

__init__(*args)

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

property thisown

The membership flag

class sdurw.CompositeDevicePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (CompositeDevice) – The object to take ownership of.

asDeviceCPtr() → rw::common::Ptr< Device const >
asDevicePtr() → rw::common::Ptr< Device >
asJointDeviceCPtr() → rw::common::Ptr< JointDevice const >
asJointDevicePtr() → rw::common::Ptr< JointDevice >
baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
get() → CompositeDevice *
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getJoints() → std::vector< Joint *,std::allocator< Joint * > > const &
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setAccelerationLimits(acclimits: Q) → void
setBounds(bounds: QPair) → void
setName(name: std::string const &) → void
setQ(q: Q, state: State) → void
setVelocityLimits(vellimits: Q) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.Cone(*args)

Bases: sdurw.Primitive

__init__(*args)

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

createMesh(resolution: int) → rw::common::Ptr< TriMesh >
getBottomRadius() → double
getHeight() → double
getParameters() → rw::math::Q
getTopRadius() → double
getType() → GeometryData::GeometryType

the type of this primitive

Return type

int

Returns

the type of primitive.

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: Vector3d) → double
getMinDistOutside(vertex: Vector3d) → double
isInside(vertex: sdurw.Vector3d) → bool
rebuild(vertices: Vector3dVector) → void
property thisown

The membership flag

toTriMesh() → rw::common::Ptr< PlainTriMeshN1 >
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: int) → rw::common::Ptr< TriMesh >

Create a mesh representation of the cylinder.

Parameters

resolution (int) – the resolution.

Return type

rw::common::Ptr< TriMesh >

Returns

the TriMesh.

getHeight() → double
getParameters() → rw::math::Q
getRadius() → double
getType() → GeometryData::GeometryType

the type of this primitive

Return type

int

Returns

the type of primitive.

property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

property thisown

The membership flag

class sdurw.DHParameterSetVector(*args)

Bases: object

__init__(*args)

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

append(x: DHParameterSet) → void
assign(n: std::vector< DHParameterSet >::size_type, x: DHParameterSet) → void
back() → std::vector< DHParameterSet >::value_type const &
begin() → std::vector< DHParameterSet >::iterator
capacity() → std::vector< DHParameterSet >::size_type
clear() → void
empty() → bool
end() → std::vector< DHParameterSet >::iterator
erase(*args) → std::vector< DHParameterSet >::iterator
front() → std::vector< DHParameterSet >::value_type const &
get_allocator() → std::vector< DHParameterSet >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< DHParameterSet >::value_type
pop_back() → void
push_back(x: DHParameterSet) → void
rbegin() → std::vector< DHParameterSet >::reverse_iterator
rend() → std::vector< DHParameterSet >::reverse_iterator
reserve(n: std::vector< DHParameterSet >::size_type) → void
resize(*args) → void
size() → std::vector< DHParameterSet >::size_type
swap(v: DHParameterSetVector) → void
property thisown

The membership flag

class sdurw.DeformableObject(baseframe: sdurw.Frame, nr_of_nodes: int)

Bases: sdurw.Object

__init__(baseframe: sdurw.Frame, nr_of_nodes: int)

constructor

addFace(node1: unsigned int, node2: unsigned int, node3: unsigned int) → void
getCOM(state: State) → rw::math::Vector3D< double >
getGeometry(state: State) → std::vector< rw::common::Ptr< Geometry >,std::allocator< rw::common::Ptr< Geometry > > > const &
getInertia(state: State) → rw::math::InertiaMatrix< double >
getMass(state: State) → double
getModels(*args) → std::vector< rw::common::Ptr< Model3D >,std::allocator< rw::common::Ptr< Model3D > > > const &
getNode(id: int, state: State) → rw::math::Vector3D< float > &
setNode(id: int, v: Vector3f, state: State) → void
property thisown

The membership flag

update(model: Model3DPtr, state: State) → void
class sdurw.DeformableObjectPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (DeformableObject) – The object to take ownership of.

addFace(node1: unsigned int, node2: unsigned int, node3: unsigned int) → void
addFrame(frame: Frame) → void
get() → DeformableObject *
getBase() → Frame *
getCOM(state: State) → rw::math::Vector3D< double >
getFrames() → std::vector< Frame *,std::allocator< Frame * > > const &
getGeometry(state: State) → std::vector< rw::common::Ptr< Geometry >,std::allocator< rw::common::Ptr< Geometry > > > const &
getInertia(state: State) → rw::math::InertiaMatrix< double >
getMass(state: State) → double
getModels(*args) → std::vector< rw::common::Ptr< Model3D >,std::allocator< rw::common::Ptr< Model3D > > > const &
getName() → std::string const &
getNode(id: int, state: State) → rw::math::Vector3D< float > &
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setNode(id: int, v: Vector3f, state: State) → void
property thisown

The membership flag

update(model: Model3DPtr, state: State) → void
class sdurw.Device(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
setAccelerationLimits(acclimits: Q) → void
setName(name: std::string const &) → void
setQ(q: Q, state: State) → void
setVelocityLimits(vellimits: Q) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.DeviceCPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Device) – The object to take ownership of.

baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
get() → Device const *
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setQ(q: Q, state: State) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.DevicePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Device) – The object to take ownership of.

asDeviceCPtr() → rw::common::Ptr< Device const >
baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
get() → Device *
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setAccelerationLimits(acclimits: Q) → void
setName(name: std::string const &) → void
setQ(q: Q, state: State) → void
setVelocityLimits(vellimits: Q) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.DevicePtrVector(*args)

Bases: object

__init__(*args)

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

append(x: DevicePtr) → void
assign(n: std::vector< rw::common::Ptr< Device > >::size_type, x: DevicePtr) → void
back() → std::vector< rw::common::Ptr< Device > >::value_type const &
begin() → std::vector< rw::common::Ptr< Device > >::iterator
capacity() → std::vector< rw::common::Ptr< Device > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::common::Ptr< Device > >::iterator
erase(*args) → std::vector< rw::common::Ptr< Device > >::iterator
front() → std::vector< rw::common::Ptr< Device > >::value_type const &
get_allocator() → std::vector< rw::common::Ptr< Device > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::common::Ptr< Device > >::value_type
pop_back() → void
push_back(x: DevicePtr) → void
rbegin() → std::vector< rw::common::Ptr< Device > >::reverse_iterator
rend() → std::vector< rw::common::Ptr< Device > >::reverse_iterator
reserve(n: std::vector< rw::common::Ptr< Device > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::common::Ptr< Device > >::size_type
swap(v: DevicePtrVector) → void
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.

property thisown

The membership flag

class sdurw.DistanceStrategyPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (DistanceStrategy) – The object to take ownership of.

get() → DistanceStrategy *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.DoubleVector(*args)

Bases: object

__init__(*args)

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

append(x: std::vector< double >::value_type const &) → void
assign(n: std::vector< double >::size_type, x: std::vector< double >::value_type const &) → void
back() → std::vector< double >::value_type const &
begin() → std::vector< double >::iterator
capacity() → std::vector< double >::size_type
clear() → void
empty() → bool
end() → std::vector< double >::iterator
erase(*args) → std::vector< double >::iterator
front() → std::vector< double >::value_type const &
get_allocator() → std::vector< double >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< double >::value_type
pop_back() → void
push_back(x: std::vector< double >::value_type const &) → void
rbegin() → std::vector< double >::reverse_iterator
rend() → std::vector< double >::reverse_iterator
reserve(n: std::vector< double >::size_type) → void
resize(*args) → void
size() → std::vector< double >::size_type
swap(v: DoubleVector) → void
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() → unsigned int
getScale() → float
getTransform() → rw::math::Transform3D< double > const &
getTransparency() → float
isHighlighted() → bool
isTransparent() → bool
isVisible() → bool
setDrawType(drawType: DrawableNode::DrawType) → void
setHighlighted(b: bool) → void
setMask(mask: unsigned int) → void
setScale(scale: float) → void
setTransform(t3d: Transform3d) → void
setTransparency(alpha: float) → void
setVisible(enable: bool) → void
property thisown

The membership flag

class sdurw.DrawableNodePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (DrawableNode) – The object to take ownership of.

get() → DrawableNode *
getMask() → unsigned int
getScale() → float
getTransform() → rw::math::Transform3D< double > const &
getTransparency() → float
isHighlighted() → bool
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
isTransparent() → bool
isVisible() → bool
setDrawType(drawType: DrawableNode::DrawType) → void
setHighlighted(b: bool) → void
setMask(mask: unsigned int) → void
setScale(scale: float) → void
setTransform(t3d: Transform3d) → void
setTransparency(alpha: float) → void
setVisible(enable: bool) → void
property thisown

The membership flag

class sdurw.DrawableNodePtrVector(*args)

Bases: object

__init__(*args)

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

append(x: DrawableNodePtr) → void
assign(n: std::vector< rw::common::Ptr< DrawableNode > >::size_type, x: DrawableNodePtr) → void
back() → std::vector< rw::common::Ptr< DrawableNode > >::value_type const &
begin() → std::vector< rw::common::Ptr< DrawableNode > >::iterator
capacity() → std::vector< rw::common::Ptr< DrawableNode > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::common::Ptr< DrawableNode > >::iterator
erase(*args) → std::vector< rw::common::Ptr< DrawableNode > >::iterator
front() → std::vector< rw::common::Ptr< DrawableNode > >::value_type const &
get_allocator() → std::vector< rw::common::Ptr< DrawableNode > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::common::Ptr< DrawableNode > >::value_type
pop_back() → void
push_back(x: DrawableNodePtr) → void
rbegin() → std::vector< rw::common::Ptr< DrawableNode > >::reverse_iterator
rend() → std::vector< rw::common::Ptr< DrawableNode > >::reverse_iterator
reserve(n: std::vector< rw::common::Ptr< DrawableNode > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::common::Ptr< DrawableNode > >::size_type
swap(v: DrawableNodePtrVector) → void
property thisown

The membership flag

class sdurw.EAA3Vector(*args)

Bases: object

__init__(*args)

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

append(x: EAAd) → void
assign(n: std::vector< rw::math::EAA< double > >::size_type, x: EAAd) → void
back() → std::vector< rw::math::EAA< double > >::value_type const &
begin() → std::vector< rw::math::EAA< double > >::iterator
capacity() → std::vector< rw::math::EAA< double > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::math::EAA< double > >::iterator
erase(*args) → std::vector< rw::math::EAA< double > >::iterator
front() → std::vector< rw::math::EAA< double > >::value_type const &
get_allocator() → std::vector< rw::math::EAA< double > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::math::EAA< double > >::value_type
pop_back() → void
push_back(x: EAAd) → void
rbegin() → std::vector< rw::math::EAA< double > >::reverse_iterator
rend() → std::vector< rw::math::EAA< double > >::reverse_iterator
reserve(n: std::vector< rw::math::EAA< double > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::math::EAA< double > >::size_type
swap(v: EAA3Vector) → void
property thisown

The membership flag

class sdurw.EAAd(*args)

Bases: sdurw.Rotation3DVectord

__init__(self) → EAAd

__init__(EAAd self, EAAd eaa) -> EAAd __init__(EAAd self, Rotation3d rot) -> EAAd __init__(EAAd self, Vector3d axis, double angle) -> EAAd __init__(EAAd self, double thetakx, double thetaky, double thetakz) -> EAAd __init__(EAAd self, Vector3d v1, Vector3d v2) -> EAAd

angle(EAAd self) → double
axis(EAAd self) → Vector3d
property thisown

The membership flag

toRotation3D(EAAd self) → Rotation3d
x(EAAd self) → double &
y(EAAd self) → double &
z(EAAd self) → double &
class sdurw.EAAf(*args)

Bases: sdurw.Rotation3DVectorf

__init__(self) → EAAf

__init__(EAAf self, EAAf eaa) -> EAAf __init__(EAAf self, Rotation3f rot) -> EAAf __init__(EAAf self, Vector3f axis, float angle) -> EAAf __init__(EAAf self, float thetakx, float thetaky, float thetakz) -> EAAf __init__(EAAf self, Vector3f v1, Vector3f v2) -> EAAf

angle(EAAf self) → double
axis(EAAf self) → Vector3f
property thisown

The membership flag

toRotation3D(EAAf self) → Rotation3f
x(EAAf self) → float &
y(EAAf self) → float &
z(EAAf self) → float &
class sdurw.Extension(desc: sdurw.ExtensionDescriptor, plugin: sdurw.Plugin)

Bases: object

__init__(desc: sdurw.ExtensionDescriptor, plugin: sdurw.Plugin)

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

getId() → std::string const &
getName() → std::string const &
property thisown

The membership flag

class sdurw.ExtensionDescriptor(*args)

Bases: object

__init__(*args)

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

getProperties() → rw::common::PropertyMap const &
property id
property name
property point
property props
property thisown

The membership flag

class sdurw.ExtensionPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Extension) – The object to take ownership of.

get() → Extension *
getId() → std::string const &
getName() → std::string const &
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.ExtensionPtrVector(*args)

Bases: object

__init__(*args)

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

append(x: ExtensionPtr) → void
assign(n: std::vector< rw::common::Ptr< Extension > >::size_type, x: ExtensionPtr) → void
back() → std::vector< rw::common::Ptr< Extension > >::value_type const &
begin() → std::vector< rw::common::Ptr< Extension > >::iterator
capacity() → std::vector< rw::common::Ptr< Extension > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::common::Ptr< Extension > >::iterator
erase(*args) → std::vector< rw::common::Ptr< Extension > >::iterator
front() → std::vector< rw::common::Ptr< Extension > >::value_type const &
get_allocator() → std::vector< rw::common::Ptr< Extension > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::common::Ptr< Extension > >::value_type
pop_back() → void
push_back(x: ExtensionPtr) → void
rbegin() → std::vector< rw::common::Ptr< Extension > >::reverse_iterator
rend() → std::vector< rw::common::Ptr< Extension > >::reverse_iterator
reserve(n: std::vector< rw::common::Ptr< Extension > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::common::Ptr< Extension > >::size_type
swap(v: ExtensionPtrVector) → void
property thisown

The membership flag

class sdurw.ExtensionRegistry

Bases: object

__init__()

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

getExtensions(ext_point_id: std::string const &) → std::vector< rw::common::Ptr< Extension >,std::allocator< rw::common::Ptr< Extension > > >
static getInstance() → rw::common::Ptr< ExtensionRegistry >
getPlugins() → std::vector< rw::common::Ptr< Plugin >,std::allocator< rw::common::Ptr< Plugin > > >
property thisown

The membership flag

class sdurw.ExtensionRegistryPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ExtensionRegistry) – The object to take ownership of.

get() → ExtensionRegistry *
getExtensions(ext_point_id: std::string const &) → std::vector< rw::common::Ptr< Extension >,std::allocator< rw::common::Ptr< Extension > > >
getInstance() → rw::common::Ptr< ExtensionRegistry >
getPlugins() → std::vector< rw::common::Ptr< Plugin >,std::allocator< rw::common::Ptr< Plugin > > >
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

sdurw.ExtensionRegistry_getInstance() → rw::common::Ptr< ExtensionRegistry >
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: State) → rw::math::Transform3D< double >

The relative transform between the frames.

Parameters

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

getBase() → rw::common::Ptr< Frame const >

Returns the first frame in the range.

Return type

rw::common::Ptr< Frame const >

Returns

The base frame (from).

getEnd() → rw::common::Ptr< Frame const >

Returns the last frame in the range.

Return type

rw::common::Ptr< Frame const >

Returns

The end frame (to).

property thisown

The membership flag

class sdurw.FKTable(state: sdurw.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: sdurw.State)

Forward kinematics for the work cell state state.

Parameters

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

get(frame: Frame) → rw::math::Transform3D< double > const &

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() → State const &

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: State) → void

resets the FKTable to state

Parameters

state (State) –

property thisown

The membership flag

class sdurw.FixedFrame(name: std::string const &, transform: Transform3d)

Bases: sdurw.Frame

__init__(name: std::string const &, transform: Transform3d)

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

getFixedTransform() → rw::math::Transform3D< double > const &
setTransform(transform: Transform3d) → void
property thisown

The membership flag

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)

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

attachTo(parent: Frame, state: State) → void

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: Frame, state: State) → rw::math::Transform3D< double >

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

Iterator pair for all children of the frame.

getDOF() → int

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) → Frame *

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) → Frame const *
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) → PropertyMap &

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: State) → rw::math::Transform3D< double >

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() → bool

Test if this frame is a Dynamically Attachable Frame

Return type

boolean

Returns

true if this frame is a DAF, false otherwise

multiplyTransform(parent: Transform3d, state: State, result: Transform3d) → void

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: State) → rw::math::Transform3D< double >

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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Frame) – The object to take ownership of.

fTf(to: Frame, state: State) → rw::math::Transform3D< double >

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.

get() → Frame const *
getDOF() → int

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.

getName() → std::string const &

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args) → Frame const *
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: State) → rw::math::Transform3D< double >

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.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
multiplyTransform(parent: Transform3d, state: State, result: Transform3d) → void

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: State, vals: double const *) → void

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.

size() → int

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: State) → rw::math::Transform3D< double >

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

Bases: object

__init__(*args)

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

append(x: std::vector< std::pair< Frame *, Frame * > >::value_type const &) → void
assign(n: std::vector< std::pair< Frame *, Frame * > >::size_type, x: std::vector< std::pair< Frame *, Frame * > >::value_type const &) → void
back() → std::vector< std::pair< Frame *,Frame * > >::value_type const &
begin() → std::vector< std::pair< Frame *,Frame * > >::iterator
capacity() → std::vector< std::pair< Frame *,Frame * > >::size_type
clear() → void
empty() → bool
end() → std::vector< std::pair< Frame *,Frame * > >::iterator
erase(*args) → std::vector< std::pair< Frame *,Frame * > >::iterator
front() → std::vector< std::pair< Frame *,Frame * > >::value_type const &
get_allocator() → std::vector< std::pair< Frame *,Frame * > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< std::pair< Frame *,Frame * > >::value_type
pop_back() → void
push_back(x: std::vector< std::pair< Frame *, Frame * > >::value_type const &) → void
rbegin() → std::vector< std::pair< Frame *,Frame * > >::reverse_iterator
rend() → std::vector< std::pair< Frame *,Frame * > >::reverse_iterator
reserve(n: std::vector< std::pair< Frame *, Frame * > >::size_type) → void
resize(*args) → void
size() → std::vector< std::pair< Frame *,Frame * > >::size_type
swap(v: FramePairVector) → void
property thisown

The membership flag

class sdurw.FramePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Frame) – The object to take ownership of.

attachTo(parent: Frame, state: State) → void

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: Frame, state: State) → rw::math::Transform3D< double >

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.

get() → Frame *
getChildren(state: State) → std::vector< Frame *,std::allocator< Frame * > >

Iterator pair for all children of the frame.

getDOF() → int

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) → Frame *

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: State) → double *

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.

getName() → std::string const &

The name of the state data.

Return type

string

Returns

The name of the state data.

getParent(*args) → Frame const *
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) → PropertyMap &

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: State) → rw::math::Transform3D< double >

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() → bool

Test if this frame is a Dynamically Attachable Frame

Return type

boolean

Returns

true if this frame is a DAF, false otherwise

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
multiplyTransform(parent: Transform3d, state: State, result: Transform3d) → void

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: State, vals: double const *) → void

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.

size() → int

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: State) → rw::math::Transform3D< double >

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

Bases: object

__init__(*args)

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

append(x: Frame) → void
assign(n: std::vector< Frame * >::size_type, x: Frame) → void
back() → std::vector< Frame * >::value_type
begin() → std::vector< Frame * >::iterator
capacity() → std::vector< Frame * >::size_type
clear() → void
empty() → bool
end() → std::vector< Frame * >::iterator
erase(*args) → std::vector< Frame * >::iterator
front() → std::vector< Frame * >::value_type
get_allocator() → std::vector< Frame * >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< Frame * >::value_type
pop_back() → void
push_back(x: Frame) → void
rbegin() → std::vector< Frame * >::reverse_iterator
rend() → std::vector< Frame * >::reverse_iterator
reserve(n: std::vector< Frame * >::size_type) → void
resize(*args) → void
size() → std::vector< Frame * >::size_type
swap(v: FrameVector) → void
property thisown

The membership flag

class sdurw.Geometry(*args)

Bases: object

__init__(*args)

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

getGeometryData(*args) → rw::common::Ptr< GeometryData > const
getId() → std::string const &
getName() → std::string const &
getScale() → double
getTransform() → rw::math::Transform3D< double > const &
static makeBox(x: double, y: double, z: double) → rw::common::Ptr< Geometry >
static makeCone(height: double, radiusTop: double, radiusBot: double) → rw::common::Ptr< Geometry >
static makeCylinder(radius: float, height: float) → rw::common::Ptr< Geometry >
static makeSphere(radi: double) → rw::common::Ptr< Geometry >
setGeometryData(data: GeometryDataPtr) → void
setId(id: std::string const &) → void
setName(name: std::string const &) → void
setScale(scale: double) → void
setTransform(t3d: Transform3d) → void
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: bool = True) → rw::common::Ptr< TriMesh >

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. 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::common::Ptr< TriMesh >

Returns

TriMesh representation of this GeometryData

getType() → GeometryData::GeometryType

the type of this primitive

Return type

int

Returns

the type of primitive.

property thisown

The membership flag

static toString(type: GeometryData::GeometryType) → std::string

format GeometryType to string

Parameters

type (int) – [in] the type of geometry to convert to string.

Return type

string

Returns

a string.

class sdurw.GeometryDataPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (GeometryData) – The object to take ownership of.

get() → GeometryData *
getTriMesh(forceCopy: bool = True) → rw::common::Ptr< TriMesh >

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. 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::common::Ptr< TriMesh >

Returns

TriMesh representation of this GeometryData

getType() → GeometryData::GeometryType

the type of this primitive

Return type

int

Returns

the type of primitive.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

toString(type: GeometryData::GeometryType) → std::string

format GeometryType to string

Parameters

type (int) – [in] the type of geometry to convert to string.

Return type

string

Returns

a string.

sdurw.GeometryData_toString(type: GeometryData::GeometryType) → std::string

format GeometryType to string

Parameters

type (int) – [in] the type of geometry to convert to string.

Return type

string

Returns

a string.

class sdurw.GeometryPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Geometry) – The object to take ownership of.

get() → Geometry *
getGeometryData(*args) → rw::common::Ptr< GeometryData > const
getId() → std::string const &
getName() → std::string const &
getScale() → double
getTransform() → rw::math::Transform3D< double > const &
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
makeBox(x: double, y: double, z: double) → rw::common::Ptr< Geometry >
makeCone(height: double, radiusTop: double, radiusBot: double) → rw::common::Ptr< Geometry >
makeCylinder(radius: float, height: float) → rw::common::Ptr< Geometry >
makeSphere(radi: double) → rw::common::Ptr< Geometry >
setGeometryData(data: GeometryDataPtr) → void
setId(id: std::string const &) → void
setName(name: std::string const &) → void
setScale(scale: double) → void
setTransform(t3d: Transform3d) → void
property thisown

The membership flag

class sdurw.GeometryPtrVector(*args)

Bases: object

__init__(*args)

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

append(x: GeometryPtr) → void
assign(n: std::vector< rw::common::Ptr< Geometry > >::size_type, x: GeometryPtr) → void
back() → std::vector< rw::common::Ptr< Geometry > >::value_type const &
begin() → std::vector< rw::common::Ptr< Geometry > >::iterator
capacity() → std::vector< rw::common::Ptr< Geometry > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::common::Ptr< Geometry > >::iterator
erase(*args) → std::vector< rw::common::Ptr< Geometry > >::iterator
front() → std::vector< rw::common::Ptr< Geometry > >::value_type const &
get_allocator() → std::vector< rw::common::Ptr< Geometry > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::common::Ptr< Geometry > >::value_type
pop_back() → void
push_back(x: GeometryPtr) → void
rbegin() → std::vector< rw::common::Ptr< Geometry > >::reverse_iterator
rend() → std::vector< rw::common::Ptr< Geometry > >::reverse_iterator
reserve(n: std::vector< rw::common::Ptr< Geometry > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::common::Ptr< Geometry > >::size_type
swap(v: GeometryPtrVector) → void
property thisown

The membership flag

sdurw.Geometry_makeBox(x: double, y: double, z: double) → rw::common::Ptr< Geometry >
sdurw.Geometry_makeCone(height: double, radiusTop: double, radiusBot: double) → rw::common::Ptr< Geometry >
sdurw.Geometry_makeCylinder(radius: float, height: float) → rw::common::Ptr< Geometry >
sdurw.Geometry_makeSphere(radi: double) → rw::common::Ptr< 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: bool) → void

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: size_t) → void

Sets up the maximal number of attempts

Parameters

maxAttempts (int) – [in] Maximal number of attempts

setProximityLimit(limit: double) → void

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: bool) → void

Sets whether to stop searching after the first solution

Parameters

stopAtFirst (boolean) – [in] True to stop after first solution has been found

solve(*args) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (IKMetaSolver) – The object to take ownership of.

get() → IKMetaSolver *
getMaxError() → double

Returns the maximal error for a solution

Return type

float

Returns

Maximal error

getMaxIterations() → int

Returns the maximal number of iterations

getProperties(*args) → PropertyMap const &

Overload 1:

Returns the PropertyMap

Return type

PropertyMap

Returns

Reference to the PropertyMap


Overload 2:

Returns the PropertyMap

return Reference to the PropertyMap

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
makeDefault(device: DevicePtr, state: State) → rw::common::Ptr< IterativeIK >

Default iterative inverse kinematics solver for a device and state.

Parameters
  • device (rw::common::Ptr< Device >) – [in] Device for which to solve IK.

  • state (State) – [in] Fixed state for which IK is solved.

setCheckJointLimits(check: bool) → void

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: size_t) → void

Sets up the maximal number of attempts

Parameters

maxAttempts (int) – [in] Maximal number of attempts

setMaxError(maxError: double) → void

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: int) → void

Sets the maximal number of iterations allowed

Parameters

maxIterations (int) – [in] maximal number of iterations

setProximityLimit(limit: double) → void

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: bool) → void

Sets whether to stop searching after the first solution

Parameters

stopAtFirst (boolean) – [in] True to stop after first solution has been found

solve(*args) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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

Depth16S

Depth16U = 2

Depth16U

Depth32F = 5

Depth32F

Depth32S = 4

Depth32S

Depth8S = 1

Depth8S

Depth8U = 0

Depth8U

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: bool, vertical: bool) → rw::common::Ptr< Image >

copies this image and flips it around horizontal or vertical axis or both.

Return type

rw::common::Ptr< Image >

Returns

new image.

getBitsPerPixel() → unsigned int

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() → Image::ColorCode

returns color encoding/type of this image

Return type

int

Returns

ColorCode of this image

getDataSize() → size_t

returns the size of the char data array

Return type

int

Returns

size of char data array

getHeight() → unsigned int

returns the height of this image

Return type

int

Returns

image height

getImageData() → char const *

returns a char pointer to the image data

Return type

string

Returns

const char pointer to the image data

getNrOfChannels() → unsigned int

The number of channels that this image has.

Return type

int

Returns

nr of channels

getPixelDepth() → Image::PixelDepth

bits per pixel encoded as a PixelDepth type.

Return type

int

Returns

the pixel depth

getPixelValue(x: size_t, y: size_t, channel: size_t) → float

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: size_t, y: size_t, channel: size_t) → float
getPixelValuei(x: size_t, y: size_t, channel: size_t) → int
getWidth() → unsigned int

returns the width of this image

Return type

int

Returns

image width

getWidthStep() → unsigned int

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: unsigned int, height: unsigned int) → void

resizes the current image.

Parameters
  • width (int) – [in] width in pixels

  • height (int) – [in] height in pixels

saveAsPGM(fileName: std::string const &) → bool

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: std::string const &) → bool

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: std::string const &) → bool

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: char *) → void

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() → std::vector< std::string,std::allocator< std::string > >
isImageSupported(format: std::string const &) → bool
loadImage(filename: std::string const &) → rw::common::Ptr< Image >
property thisown

The membership flag

class sdurw.ImageLoaderFactory

Bases: object

__init__()

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

static getImageLoader(format: std::string const &) → rw::common::Ptr< ImageLoader >
static getSupportedFormats() → std::vector< std::string,std::allocator< std::string > >
static hasImageLoader(format: std::string const &) → bool
property thisown

The membership flag

sdurw.ImageLoaderFactory_getImageLoader(format: std::string const &) → rw::common::Ptr< ImageLoader >
sdurw.ImageLoaderFactory_getSupportedFormats() → std::vector< std::string,std::allocator< std::string > >
sdurw.ImageLoaderFactory_hasImageLoader(format: std::string const &) → bool
class sdurw.ImageLoaderPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ImageLoader) – The object to take ownership of.

get() → ImageLoader *
getImageFormats() → std::vector< std::string,std::allocator< std::string > >
isImageSupported(format: std::string const &) → bool
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
loadImage(filename: std::string const &) → rw::common::Ptr< Image >
property thisown

The membership flag

class sdurw.ImagePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Image) – The object to take ownership of.

copyFlip(horizontal: bool, vertical: bool) → rw::common::Ptr< Image >

copies this image and flips it around horizontal or vertical axis or both.

Return type

rw::common::Ptr< Image >

Returns

new image.

get() → Image *
getBitsPerPixel() → unsigned int

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() → Image::ColorCode

returns color encoding/type of this image

Return type

int

Returns

ColorCode of this image

getDataSize() → size_t

returns the size of the char data array

Return type

int

Returns

size of char data array

getHeight() → unsigned int

returns the height of this image

Return type

int

Returns

image height

getImageData() → char const *

returns a char pointer to the image data

Return type

string

Returns

const char pointer to the image data

getNrOfChannels() → unsigned int

The number of channels that this image has.

Return type

int

Returns

nr of channels

getPixelDepth() → Image::PixelDepth

bits per pixel encoded as a PixelDepth type.

Return type

int

Returns

the pixel depth

getPixelValue(x: size_t, y: size_t, channel: size_t) → float

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: size_t, y: size_t, channel: size_t) → float
getPixelValuei(x: size_t, y: size_t, channel: size_t) → int
getWidth() → unsigned int

returns the width of this image

Return type

int

Returns

image width

getWidthStep() → unsigned int

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

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
resize(width: unsigned int, height: unsigned int) → void

resizes the current image.

Parameters
  • width (int) – [in] width in pixels

  • height (int) – [in] height in pixels

saveAsPGM(fileName: std::string const &) → bool

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: std::string const &) → bool

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: std::string const &) → bool

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: char *) → void

sets the data array of this image. Make sure to change the height and width accordingly.

property thisown

The membership flag

class sdurw.InertiaMatrixd(*args)

Bases: object

__init__(*args)

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

add(I2: InertiaMatrixd) → rw::math::InertiaMatrix< double >
static makeCuboidInertia(mass: double, x: double, y: double, z: double) → rw::math::InertiaMatrix< double >
static makeHollowSphereInertia(mass: double, radi: double) → rw::math::InertiaMatrix< double >
static makeSolidSphereInertia(mass: double, radi: double) → rw::math::InertiaMatrix< double >
multiply(*args) → rw::math::Vector3D< double >
property thisown

The membership flag

class sdurw.InertiaMatrixdVector(*args)

Bases: object

__init__(*args)

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

append(x: InertiaMatrixd) → void
assign(n: std::vector< rw::math::InertiaMatrix< double > >::size_type, x: InertiaMatrixd) → void
back() → std::vector< rw::math::InertiaMatrix< double > >::value_type const &
begin() → std::vector< rw::math::InertiaMatrix< double > >::iterator
capacity() → std::vector< rw::math::InertiaMatrix< double > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::math::InertiaMatrix< double > >::iterator
erase(*args) → std::vector< rw::math::InertiaMatrix< double > >::iterator
front() → std::vector< rw::math::InertiaMatrix< double > >::value_type const &
get_allocator() → std::vector< rw::math::InertiaMatrix< double > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::math::InertiaMatrix< double > >::value_type
pop_back() → void
push_back(x: InertiaMatrixd) → void
rbegin() → std::vector< rw::math::InertiaMatrix< double > >::reverse_iterator
rend() → std::vector< rw::math::InertiaMatrix< double > >::reverse_iterator
reserve(n: std::vector< rw::math::InertiaMatrix< double > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::math::InertiaMatrix< double > >::size_type
swap(v: InertiaMatrixdVector) → void
property thisown

The membership flag

sdurw.InertiaMatrixd_makeCuboidInertia(mass: double, x: double, y: double, z: double) → rw::math::InertiaMatrix< double >
sdurw.InertiaMatrixd_makeHollowSphereInertia(mass: double, radi: double) → rw::math::InertiaMatrix< double >
sdurw.InertiaMatrixd_makeSolidSphereInertia(mass: double, radi: double) → rw::math::InertiaMatrix< double >
class sdurw.InertiaMatrixf(*args)

Bases: object

__init__(*args)

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

add(I2: InertiaMatrixf) → rw::math::InertiaMatrix< float >
static makeCuboidInertia(mass: float, x: float, y: float, z: float) → rw::math::InertiaMatrix< float >
static makeHollowSphereInertia(mass: float, radi: float) → rw::math::InertiaMatrix< float >
static makeSolidSphereInertia(mass: float, radi: float) → rw::math::InertiaMatrix< float >
multiply(*args) → rw::math::Vector3D< float >
property thisown

The membership flag

sdurw.InertiaMatrixf_makeCuboidInertia(mass: float, x: float, y: float, z: float) → rw::math::InertiaMatrix< float >
sdurw.InertiaMatrixf_makeHollowSphereInertia(mass: float, radi: float) → rw::math::InertiaMatrix< float >
sdurw.InertiaMatrixf_makeSolidSphereInertia(mass: float, radi: float) → rw::math::InertiaMatrix< float >
class sdurw.IntVector(*args)

Bases: object

__init__(*args)

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

append(x: std::vector< int >::value_type const &) → void
assign(n: std::vector< int >::size_type, x: std::vector< int >::value_type const &) → void
back() → std::vector< int >::value_type const &
begin() → std::vector< int >::iterator
capacity() → std::vector< int >::size_type
clear() → void
empty() → bool
end() → std::vector< int >::iterator
erase(*args) → std::vector< int >::iterator
front() → std::vector< int >::value_type const &
get_allocator() → std::vector< int >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< int >::value_type
pop_back() → void
push_back(x: std::vector< int >::value_type const &) → void
rbegin() → std::vector< int >::reverse_iterator
rend() → std::vector< int >::reverse_iterator
reserve(n: std::vector< int >::size_type) → void
resize(*args) → void
size() → std::vector< int >::size_type
swap(v: IntVector) → void
property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Q
duration() → double
dx(t: double) → rw::math::Q
property thisown

The membership flag

x(t: double) → rw::math::Q
class sdurw.InterpolatorQPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Interpolator< rw::math::Q >) – The object to take ownership of.

ddx(t: double) → rw::math::Q
duration() → double
dx(t: double) → rw::math::Q
get() → Interpolator< rw::math::Q > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

x(t: double) → rw::math::Q
class sdurw.InterpolatorR1(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → double
duration() → double
dx(t: double) → double
property thisown

The membership flag

x(t: double) → double
class sdurw.InterpolatorR1Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Interpolator< double >) – The object to take ownership of.

ddx(t: double) → double
duration() → double
dx(t: double) → double
get() → Interpolator< double > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

x(t: double) → double
class sdurw.InterpolatorR2(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Vector2D< double >
duration() → double
dx(t: double) → rw::math::Vector2D< double >
property thisown

The membership flag

x(t: double) → rw::math::Vector2D< double >
class sdurw.InterpolatorR2Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Interpolator< rw::math::Vector2D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Vector2D< double >
duration() → double
dx(t: double) → rw::math::Vector2D< double >
get() → Interpolator< rw::math::Vector2D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

x(t: double) → rw::math::Vector2D< double >
class sdurw.InterpolatorR3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Vector3D< double >
duration() → double
dx(t: double) → rw::math::Vector3D< double >
property thisown

The membership flag

x(t: double) → rw::math::Vector3D< double >
class sdurw.InterpolatorR3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Interpolator< rw::math::Vector3D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Vector3D< double >
duration() → double
dx(t: double) → rw::math::Vector3D< double >
get() → Interpolator< rw::math::Vector3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

x(t: double) → rw::math::Vector3D< double >
class sdurw.InterpolatorSE3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Transform3D< double >
duration() → double
dx(t: double) → rw::math::Transform3D< double >
property thisown

The membership flag

x(t: double) → rw::math::Transform3D< double >
class sdurw.InterpolatorSE3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Interpolator< rw::math::Transform3D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Transform3D< double >
duration() → double
dx(t: double) → rw::math::Transform3D< double >
get() → Interpolator< rw::math::Transform3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

x(t: double) → rw::math::Transform3D< double >
class sdurw.InterpolatorSO3(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

ddx(t: double) → rw::math::Rotation3D< double >
duration() → double
dx(t: double) → rw::math::Rotation3D< double >
property thisown

The membership flag

x(t: double) → rw::math::Rotation3D< double >
class sdurw.InterpolatorSO3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Interpolator< rw::math::Rotation3D< double > >) – The object to take ownership of.

ddx(t: double) → rw::math::Rotation3D< double >
duration() → double
dx(t: double) → rw::math::Rotation3D< double >
get() → Interpolator< rw::math::Rotation3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

x(t: double) → rw::math::Rotation3D< double >
class sdurw.InterpolatorTrajectoryQ(*args, **kwargs)

Bases: sdurw.TrajectoryQ

__init__(*args, **kwargs)

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

add(*args) → void
getSegmentsCount() → size_t
property thisown

The membership flag

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

Bases: sdurw.TrajectoryR1

__init__(*args, **kwargs)

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

add(*args) → void
getSegmentsCount() → size_t
property thisown

The membership flag

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

Bases: sdurw.TrajectoryR2

__init__(*args, **kwargs)

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

add(*args) → void
getSegmentsCount() → size_t
property thisown

The membership flag

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

Bases: sdurw.TrajectoryR3

__init__(*args, **kwargs)

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

add(*args) → void
getSegmentsCount() → size_t
property thisown

The membership flag

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

Bases: sdurw.TrajectorySE3

__init__(*args, **kwargs)

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

add(*args) → void
getSegmentsCount() → size_t
property thisown

The membership flag

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

Bases: sdurw.TrajectorySO3

__init__(*args, **kwargs)

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

add(*args) → void
getSegmentsCount() → size_t
property thisown

The membership flag

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

Bases: object

Interface for inverse kinematics algorithms

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

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

setCheckJointLimits(check: bool) → void

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: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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.InvKinSolverPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (InvKinSolver) – The object to take ownership of.

get() → InvKinSolver *
getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setCheckJointLimits(check: bool) → void

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: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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.IterativeIK(*args, **kwargs)

Bases: sdurw.InvKinSolver

Interface for iterative inverse kinematics algorithms

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

getMaxError() → double

Returns the maximal error for a solution

Return type

float

Returns

Maximal error

getMaxIterations() → int

Returns the maximal number of iterations

getProperties(*args) → PropertyMap const &

Overload 1:

Returns the PropertyMap

Return type

PropertyMap

Returns

Reference to the PropertyMap


Overload 2:

Returns the PropertyMap

return Reference to the PropertyMap

static makeDefault(device: DevicePtr, state: State) → rw::common::Ptr< IterativeIK >

Default iterative inverse kinematics solver for a device and state.

Parameters
  • device (rw::common::Ptr< Device >) – [in] Device for which to solve IK.

  • state (State) – [in] Fixed state for which IK is solved.

setMaxError(maxError: double) → void

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: int) → void

Sets the maximal number of iterations allowed

Parameters

maxIterations (int) – [in] maximal number of iterations

property thisown

The membership flag

class sdurw.IterativeIKPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (IterativeIK) – The object to take ownership of.

get() → IterativeIK *
getMaxError() → double

Returns the maximal error for a solution

Return type

float

Returns

Maximal error

getMaxIterations() → int

Returns the maximal number of iterations

getProperties(*args) → PropertyMap const &

Overload 1:

Returns the PropertyMap

Return type

PropertyMap

Returns

Reference to the PropertyMap


Overload 2:

Returns the PropertyMap

return Reference to the PropertyMap

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
makeDefault(device: DevicePtr, state: State) → rw::common::Ptr< IterativeIK >

Default iterative inverse kinematics solver for a device and state.

Parameters
  • device (rw::common::Ptr< Device >) – [in] Device for which to solve IK.

  • state (State) – [in] Fixed state for which IK is solved.

setCheckJointLimits(check: bool) → void

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.

setMaxError(maxError: double) → void

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: int) → void

Sets the maximal number of iterations allowed

Parameters

maxIterations (int) – [in] maximal number of iterations

solve(baseTend: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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.IterativeIK_makeDefault(device: DevicePtr, state: State) → rw::common::Ptr< IterativeIK >

Default iterative inverse kinematics solver for a device and state.

Parameters
  • device (rw::common::Ptr< Device >) – [in] Device for which to solve IK.

  • state (State) – [in] Fixed state for which IK is solved.

class sdurw.Jacobian(m: int, n: int)

Bases: object

__init__(m: int, n: int)

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

elem(i: int, j: int) → double &
size1() → int
size2() → int
property thisown

The membership flag

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

Bases: object

JacobianCalculator provides an interface for obtaining a Jacobian

__init__(*args, **kwargs)

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

getJacobian(state: State) → rw::math::Jacobian

Returns the Jacobian associated to state

Parameters

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

Return type

Jacobian

Returns

Jacobian for state

property thisown

The membership flag

class sdurw.JacobianCalculatorPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (JacobianCalculator) – The object to take ownership of.

get() → JacobianCalculator *
getJacobian(state: State) → rw::math::Jacobian

Returns the Jacobian associated to state

Parameters

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

Return type

Jacobian

Returns

Jacobian for state

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

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

Bases: sdurw.IterativeIK

A Jacobian based iterative inverse kinematics algorithm for devices with a single end effector.

This algorithm does implicitly handle joint limits, however it is possible to force the solution within joint limits using clamping in each iterative step. If joint clamping is not enabled then this algorithm might contain joint values that are out of bounds.

The method uses an Newton-Raphson iterative approach and is based on using the inverse of the device Jacobian to compute each local solution in each iteration. Several methods for calculating/approximating the inverse Jacobian are available, where the SVD method currently is the most stable, see the JacobianSolverType option for additional options.

DLS = 2
SDLS = 3
SVD = 1
Transpose = 0
__init__(*args, **kwargs)

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

setCheckJointLimits(check: bool) → void

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.

setClampToBounds(enableClamping: bool) → void

enables clamping of the solution such that solution always is within joint limits

Parameters

enableClamping (boolean) – [in] true to enable clamping, false otherwise

setEnableInterpolation(enableInterpolation: bool) → void

the solver may fail or be very slow if the the solution is too far from the initial configuration. This function enables the use of via points generated using an interpolation from initial end effector configuration to the goal target.

Parameters

enableInterpolation (boolean) – [in] set true to enable interpolation, false otherwise

setInterpolatorStep(interpolatorStep: double) → void

sets the maximal step length that is allowed on the local search towards the solution.

Parameters

interpolatorStep (float) – [in] the interpolation step.

setSolverType(type: JacobianIKSolver::JacobianSolverType) → void

set the type of solver to use for stepping toward a solution

Parameters

type (int) – [in] the type of jacobian solver

solve(baseTend: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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.

solveLocal(bTed: Transform3d, maxError: double, state: State, maxIter: int) → bool

performs a local search toward the target bTed. No via points are generated to support the convergence and robustness.

Parameters
  • bTed (rw::math::Transform3D< double >) – [in] the target end pose

  • maxError (float) – [in] the maximal allowed error

  • state (State) – [in/out] the starting position for the search. The end position will also be saved in this state.

  • maxIter (int) – [in] max number of iterations

Return type

boolean

Returns

true if error is below max error

Notes: the result will be saved in state

property thisown

The membership flag

class sdurw.JacobianIKSolverPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (JacobianIKSolver) – The object to take ownership of.

get() → JacobianIKSolver *
getMaxError() → double

Returns the maximal error for a solution

Return type

float

Returns

Maximal error

getMaxIterations() → int

Returns the maximal number of iterations

getProperties(*args) → PropertyMap const &

Overload 1:

Returns the PropertyMap

Return type

PropertyMap

Returns

Reference to the PropertyMap


Overload 2:

Returns the PropertyMap

return Reference to the PropertyMap

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
makeDefault(device: DevicePtr, state: State) → rw::common::Ptr< IterativeIK >

Default iterative inverse kinematics solver for a device and state.

Parameters
  • device (rw::common::Ptr< Device >) – [in] Device for which to solve IK.

  • state (State) – [in] Fixed state for which IK is solved.

setCheckJointLimits(check: bool) → void

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.

setClampToBounds(enableClamping: bool) → void

enables clamping of the solution such that solution always is within joint limits

Parameters

enableClamping (boolean) – [in] true to enable clamping, false otherwise

setEnableInterpolation(enableInterpolation: bool) → void

the solver may fail or be very slow if the the solution is too far from the initial configuration. This function enables the use of via points generated using an interpolation from initial end effector configuration to the goal target.

Parameters

enableInterpolation (boolean) – [in] set true to enable interpolation, false otherwise

setInterpolatorStep(interpolatorStep: double) → void

sets the maximal step length that is allowed on the local search towards the solution.

Parameters

interpolatorStep (float) – [in] the interpolation step.

setMaxError(maxError: double) → void

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: int) → void

Sets the maximal number of iterations allowed

Parameters

maxIterations (int) – [in] maximal number of iterations

setSolverType(type: JacobianIKSolver::JacobianSolverType) → void

set the type of solver to use for stepping toward a solution

Parameters

type (int) – [in] the type of jacobian solver

solve(baseTend: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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.

solveLocal(bTed: Transform3d, maxError: double, state: State, maxIter: int) → bool

performs a local search toward the target bTed. No via points are generated to support the convergence and robustness.

Parameters
  • bTed (rw::math::Transform3D< double >) – [in] the target end pose

  • maxError (float) – [in] the maximal allowed error

  • state (State) – [in/out] the starting position for the search. The end position will also be saved in this state.

  • maxIter (int) – [in] max number of iterations

Return type

boolean

Returns

true if error is below max error

Notes: the result will be saved in state

property thisown

The membership flag

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

Bases: sdurw.Frame

__init__(*args, **kwargs)

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

property thisown

The membership flag

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

Bases: sdurw.Device

__init__(*args, **kwargs)

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

baseJend(state: State) → rw::math::Jacobian
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getJoints() → std::vector< Joint *,std::allocator< Joint * > > const &
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
setAccelerationLimits(acclimits: Q) → void
setBounds(bounds: QPair) → void
setQ(q: Q, state: State) → void
setVelocityLimits(vellimits: Q) → void
property thisown

The membership flag

class sdurw.JointDeviceCPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (JointDevice) – The object to take ownership of.

baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
get() → JointDevice const *
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getJoints() → std::vector< Joint *,std::allocator< Joint * > > const &
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setQ(q: Q, state: State) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.JointDevicePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (JointDevice) – The object to take ownership of.

baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
get() → JointDevice *
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getJoints() → std::vector< Joint *,std::allocator< Joint * > > const &
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setAccelerationLimits(acclimits: Q) → void
setBounds(bounds: QPair) → void
setName(name: std::string const &) → void
setQ(q: Q, state: State) → void
setVelocityLimits(vellimits: Q) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.JointVector(*args)

Bases: object

__init__(*args)

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

append(x: Joint) → void
assign(n: std::vector< Joint * >::size_type, x: Joint) → void
back() → std::vector< Joint * >::value_type
begin() → std::vector< Joint * >::iterator
capacity() → std::vector< Joint * >::size_type
clear() → void
empty() → bool
end() → std::vector< Joint * >::iterator
erase(*args) → std::vector< Joint * >::iterator
front() → std::vector< Joint * >::value_type
get_allocator() → std::vector< Joint * >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< Joint * >::value_type
pop_back() → void
push_back(x: Joint) → void
rbegin() → std::vector< Joint * >::reverse_iterator
rend() → std::vector< Joint * >::reverse_iterator
reserve(n: std::vector< Joint * >::size_type) → void
resize(*args) → void
size() → std::vector< Joint * >::size_type
swap(v: JointVector) → void
property thisown

The membership flag

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

Bases: object

Utility functions for the rw::kinematics module.

__init__(*args, **kwargs)

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

static childToParentChain(child: Frame, parent: Frame, state: State) → std::vector< Frame *,std::allocator< Frame * > >

The chain of frames connecting child to parent.

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

The state gives the connectedness of the tree.

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

static findAllFrames(*args) → std::vector< Frame *,std::allocator< Frame * > >

Overload 1:

All frames reachable from root for a tree structure of state.

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

We give no guarantee on the ordering of the frames.

Parameters
  • root (Frame) – [in] The root node from where the frame search is started.

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

Return type

std::vector< Frame *,std::allocator< Frame * > >

Returns

All reachable frames.


Overload 2:

All frames reachable from root for a tree structure.

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

We give no guarantee on the ordering of the frames.

DAF are not included.

Parameters

root (Frame) – [in] The root node from where the frame search is started.

Return type

std::vector< Frame *,std::allocator< Frame * > >

Returns

All reachable frames.

static frameTframe(_from: Frame, to: Frame, state: State) → rw::math::Transform3D< double >

The transform of frame to relative to frame from.

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

frameTframe(from, to, state) == inverse(worldTframe(from, state)) * worldTframe(to, state);

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

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

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

Return type

rw::math::Transform3D< double >

Returns

The transform from the start frame to the end frame.

static gripFrame(*args) → void

Overload 1:

Grip item with gripper thereby modifying state.

item must be a DAF.

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

  • gripper (Frame) – [in] the grasping frame.

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

An exception is thrown if item is not a DAF.


Overload 2:

Grip item with gripper thereby modifying state.

item must be a DAF.

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

  • gripper (Frame) – [in] the grasping frame.

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

An exception is thrown if item is not a DAF.

static isDAF(frame: sdurw.Frame) → bool

True if frame is a DAF and false otherwise.

static isFixedFrame(frame: sdurw.Frame) → bool

Check if frame is fixed. :type frame: Frame :param frame: [in] the frame. :rtype: boolean :return: true if fixed, false otherwise.

static parentToChildChain(parent: Frame, child: Frame, state: State) → std::vector< Frame *,std::allocator< Frame * > >

The chain of frames connecting parent to child.

parent is included in the list, but child is excluded. If parent as well as child is NULL then the empty chain is returned. Otherwise parent is included even if parent is NULL.

static reverseChildToParentChain(child: Frame, parent: Frame, state: State) → std::vector< Frame *,std::allocator< Frame * > >

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

property thisown

The membership flag

static worldFrame(frame: Frame, state: State) → Frame *

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

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

static worldTframe(to: Frame, state: State) → rw::math::Transform3D< double >

The transform of frame in relative to the world frame.

If to=NULL the method returns a 4x4 identify matrix

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

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

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to the world frame.

sdurw.Kinematics_childToParentChain(child: Frame, parent: Frame, state: State) → std::vector< Frame *,std::allocator< Frame * > >

The chain of frames connecting child to parent.

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

The state gives the connectedness of the tree.

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

sdurw.Kinematics_findAllFrames(*args) → std::vector< Frame *,std::allocator< Frame * > >

Overload 1:

All frames reachable from root for a tree structure of state.

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

We give no guarantee on the ordering of the frames.

Parameters
  • root (Frame) – [in] The root node from where the frame search is started.

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

Return type

std::vector< Frame *,std::allocator< Frame * > >

Returns

All reachable frames.


Overload 2:

All frames reachable from root for a tree structure.

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

We give no guarantee on the ordering of the frames.

DAF are not included.

Parameters

root (Frame) – [in] The root node from where the frame search is started.

Return type

std::vector< Frame *,std::allocator< Frame * > >

Returns

All reachable frames.

sdurw.Kinematics_frameTframe(_from: Frame, to: Frame, state: State) → rw::math::Transform3D< double >

The transform of frame to relative to frame from.

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

frameTframe(from, to, state) == inverse(worldTframe(from, state)) * worldTframe(to, state);

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

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

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

Return type

rw::math::Transform3D< double >

Returns

The transform from the start frame to the end frame.

sdurw.Kinematics_gripFrame(*args) → void

Overload 1:

Grip item with gripper thereby modifying state.

item must be a DAF.

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

  • gripper (Frame) – [in] the grasping frame.

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

An exception is thrown if item is not a DAF.


Overload 2:

Grip item with gripper thereby modifying state.

item must be a DAF.

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

  • gripper (Frame) – [in] the grasping frame.

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

An exception is thrown if item is not a DAF.

sdurw.Kinematics_isDAF(frame: sdurw.Frame) → bool

True if frame is a DAF and false otherwise.

sdurw.Kinematics_isFixedFrame(frame: sdurw.Frame) → bool

Check if frame is fixed. :type frame: Frame :param frame: [in] the frame. :rtype: boolean :return: true if fixed, false otherwise.

sdurw.Kinematics_parentToChildChain(parent: Frame, child: Frame, state: State) → std::vector< Frame *,std::allocator< Frame * > >

The chain of frames connecting parent to child.

parent is included in the list, but child is excluded. If parent as well as child is NULL then the empty chain is returned. Otherwise parent is included even if parent is NULL.

sdurw.Kinematics_reverseChildToParentChain(child: Frame, parent: Frame, state: State) → std::vector< Frame *,std::allocator< Frame * > >

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

sdurw.Kinematics_worldFrame(frame: Frame, state: State) → Frame *

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

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

sdurw.Kinematics_worldTframe(to: Frame, state: State) → rw::math::Transform3D< double >

The transform of frame in relative to the world frame.

If to=NULL the method returns a 4x4 identify matrix

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

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

Return type

rw::math::Transform3D< double >

Returns

The transform of the frame relative to the world frame.

class sdurw.LinearInterpolator(start: double const &, end: double const &, duration: double)

Bases: sdurw.InterpolatorR1

__init__(start: double const &, end: double const &, duration: double)

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

ddx(t: double) → double
duration() → double
dx(t: double) → double
property thisown

The membership flag

x(t: double) → double
class sdurw.LinearInterpolatorQ(start: Q, end: Q, duration: double)

Bases: sdurw.InterpolatorQ

__init__(start: Q, end: Q, duration: double)

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

ddx(t: double) → rw::math::Q
duration() → double
dx(t: double) → rw::math::Q
property thisown

The membership flag

x(t: double) → rw::math::Q
class sdurw.LinearInterpolatorR3(start: Rotation3d, end: Rotation3d, duration: double)

Bases: sdurw.InterpolatorSO3

__init__(start: Rotation3d, end: Rotation3d, duration: double)

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

ddx(t: double) → rw::math::Rotation3D< double >
duration() → double
dx(t: double) → rw::math::Rotation3D< double >
property thisown

The membership flag

x(t: double) → rw::math::Rotation3D< double >
class sdurw.LinearInterpolatorSE3(start: Transform3d, end: Transform3d, duration: double)

Bases: sdurw.InterpolatorSE3

__init__(start: Transform3d, end: Transform3d, duration: double)

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

ddx(t: double) → rw::math::Transform3D< double >
duration() → double
dx(t: double) → rw::math::Transform3D< double >
property thisown

The membership flag

x(t: double) → rw::math::Transform3D< double >
class sdurw.LinearInterpolatorSO3(start: Rotation3d, end: Rotation3d, duration: double)

Bases: sdurw.InterpolatorSO3

__init__(start: Rotation3d, end: Rotation3d, duration: double)

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

ddx(t: double) → rw::math::Rotation3D< double >
duration() → double
dx(t: double) → rw::math::Rotation3D< double >
property thisown

The membership flag

x(t: double) → rw::math::Rotation3D< double >
class sdurw.Log

Bases: object

Provides basic log functionality.

The Log class owns a number of LogWriters in a static map, which can be accessed using a string identifier. All logs are global.

By default the Log class contains a Debug, Info, Warning and Error log. These can be accessed statically as:

Log::debugLog() <  "This is an debug message";
Log::infoLog() < "This is an info message";
Log::warnLog() < "This is an error message";
Log::errorLog() < "This is an error message";

or on the log instance

Log log = Log::log();
log.debug() <  "This is an debug message";
log.info() < "This is an info message";
log.warn() < "This is an error message";
log.error() < "This is an error message";

or using one one the RW_LOG, RW_LOGLINE or RW_LOG2 macros, e.g.

RW_LOG_INFO("The value of x is "<x);
RW_LOG_DEBUG("The value of x is "<x);
RW_LOG_ERROR(Log::infoId(), "The value of x is "<x);

You can control what logs are active both using a loglevel and by using a log mask. The loglevel enables all logs with LogIndex lower or equal to the loglevel. As default loglevel is LogIndex::info which means debug and all user logs are disabled. However, logs can be individually enabled using log masks which will override loglevel setting.

Notice that logmasks cannot disable logs that are below or equal to loglevel.

change loglevel:

Log::log().setLevel(Log::Debug);
AllMask = 65535
Critical = 1
CriticalMask = 2
Debug = 5
DebugMask = 32
Error = 2
ErrorMask = 4
Fatal = 0
FatalMask = 1
Info = 4
InfoMask = 16
User1 = 6
User1Mask = 64
User2 = 7
User2Mask = 128
User3 = 8
User3Mask = 256
User4 = 9
User4Mask = 512
User5 = 10
User5Mask = 1024
User6 = 11
User6Mask = 2048
User7 = 12
User7Mask = 4096
User8 = 13
User8Mask = 8096
Warning = 3
WarningMask = 8
__init__()

constructor

debug() → LogWriter &

convenience function for getting the LogWriter that is associated with the debug loglevel

Return type

LogWriter

Returns

info LogWriter

static debugLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the debug loglevel

Return type

LogWriter

Returns

debug LogWriter

decreaseTabLevel() → void

Decrease the indentation.

error() → LogWriter &

convenience function for getting the LogWriter that is associated with the error loglevel

Return type

LogWriter

Returns

info LogWriter

static errorLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the error loglevel

Return type

LogWriter

Returns

error LogWriter

flush(id: Log::LogIndex) → void

Calls flush on the specified log

If the id cannot be found an exception is thrown

Parameters

id (int) – [in] loglevel

flushAll() → void

Calls flush on all logs

static getInstance() → rw::common::Ptr< Log >

returns the global log instance. Global in the sence of whatever is linked staticly together.

Return type

rw::common::Ptr< Log >

Returns

a Log

getLogWriter(id: Log::LogIndex) → LogWriter &

Returns the LogWriter that is associated with LogIndex id

If the id is unknown an exception is thrown.

Parameters

id (int) – [in] loglevel

Return type

LogWriter

Returns

Reference to LogWriter object

getWriter(id: Log::LogIndex) → rw::common::Ptr< LogWriter >

gets the log writer associated to logindex id

Parameters

id (int) – [in] logindex

Return type

rw::common::Ptr< LogWriter >

Returns

log writer

increaseTabLevel() → void

Make indentation to make logs easier to read.

info() → LogWriter &

convenience function for getting the LogWriter that is associated with the info loglevel

Return type

LogWriter

Returns

info LogWriter

static infoLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the info loglevel

Return type

LogWriter

Returns

info LogWriter

isEnabled(idx: Log::LogIndex) → bool

Checks if the given LogIndex is enabled. This can be used to determine if a certain log level will be displayed or not.

Parameters

idx (int) – [in] the level

Return type

boolean

Returns

true if enabled, false otherwise.

static log() → Log &

convenience function of getInstance

Return type

Log

Returns

a Log

remove(id: Log::LogIndex) → void

Removes a log

If the id cannot be found an exception is thrown

Parameters

id (int) – [in] Log identifier

removeAll() → void

Removes all log writers

setDisable(mask: int) → void

Disable log(s) given by log mask.

Parameters

mask (int) – [in] the mask for the logs to disable.

setEnable(mask: int) → void

Enable log(s) given by log mask.

Parameters

mask (int) – [in] the mask for the logs to enable.

setLevel(loglevel: Log::LogIndex) → void

set the loglevel. Any log with LogIndex equal to or less than loglevel will be enabled. Any log above will be disabled unless an enabled mask is specified for that log

Parameters

loglevel (int) – [in] the level

static setLog(log: LogPtr) → void

sets the instance of the log class

Parameters

log (rw::common::Ptr< Log >) – [in] the log that will be used through the static log methods.

setWriter(id: Log::LogIndex, writer: LogWriterPtr) → void

Associates a LogWriter with the LogIndex id.

SetWriter can either be used to redefine an existing log or to create a new custom output.

Example:

Log::SetWriter(Log::User1, new LogStreamWriter(std::cout));
RW_LOG(Log::User1, "Message send to User log 1");
Parameters
  • id (int) – [in] the LogIndex that the logwriter is associated with.

  • writer (rw::common::Ptr< LogWriter >) – [in] LogWriter object to use

setWriterForMask(mask: int, writer: LogWriterPtr) → void

Associates a LogWriter with the logs specified with mask.

SetWriter can either be used to redefine an existing log or to create a new custom output.

Example:

log.setWriterForMask(Log::InfoMask | Log::DebugMask, new LogStreamWriter(std::cout));
RW_LOG(Log::Info, "Message send to User log 1");
Parameters
  • mask (int) – [in] the LogIndexMask that the logwriter is associated with.

  • writer (rw::common::Ptr< LogWriter >) – [in] LogWriter object to use

property thisown

The membership flag

static toMask(idx: Log::LogIndex) → Log::LogIndexMask

Convert a LogIndex to a mask.

Parameters

idx (int) – [in] the LogIndex.

Return type

int

Returns

the mask enabling the given log level.

warning() → LogWriter &

convenience function for getting the LogWriter that is associated with the warning loglevel

Return type

LogWriter

Returns

info LogWriter

static warningLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the warning loglevel

Return type

LogWriter

Returns

warning LogWriter

write(*args) → void

Overload 1:

Writes message to the log

If the id cannot be found an exception is thrown

Parameters
  • id (int) – [in] Log identifier

  • message (string) – [in] String message to write


Overload 2:

Writes message to the logwriter associated with LogIndex id

If the id cannot be found an exception is thrown

Parameters
  • id (int) – [in] Log identifier

  • message (Message) – [in] Message to write

writeln(id: Log::LogIndex, message: std::string const &) → void

Writes message followed by a ‘n’ to the log

If the id cannot be found an exception is thrown

Parameters
  • id (int) – [in] Log identifier

  • message (string) – [in] Message to write

class sdurw.LogPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Log) – The object to take ownership of.

debug() → LogWriter &

convenience function for getting the LogWriter that is associated with the debug loglevel

Return type

LogWriter

Returns

info LogWriter

debugLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the debug loglevel

Return type

LogWriter

Returns

debug LogWriter

decreaseTabLevel() → void

Decrease the indentation.

error() → LogWriter &

convenience function for getting the LogWriter that is associated with the error loglevel

Return type

LogWriter

Returns

info LogWriter

errorLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the error loglevel

Return type

LogWriter

Returns

error LogWriter

flush(id: Log::LogIndex) → void

Calls flush on the specified log

If the id cannot be found an exception is thrown

Parameters

id (int) – [in] loglevel

flushAll() → void

Calls flush on all logs

get() → Log *
getInstance() → rw::common::Ptr< Log >

returns the global log instance. Global in the sence of whatever is linked staticly together.

Return type

rw::common::Ptr< Log >

Returns

a Log

getLogWriter(id: Log::LogIndex) → LogWriter &

Returns the LogWriter that is associated with LogIndex id

If the id is unknown an exception is thrown.

Parameters

id (int) – [in] loglevel

Return type

LogWriter

Returns

Reference to LogWriter object

getWriter(id: Log::LogIndex) → rw::common::Ptr< LogWriter >

gets the log writer associated to logindex id

Parameters

id (int) – [in] logindex

Return type

rw::common::Ptr< LogWriter >

Returns

log writer

increaseTabLevel() → void

Make indentation to make logs easier to read.

info() → LogWriter &

convenience function for getting the LogWriter that is associated with the info loglevel

Return type

LogWriter

Returns

info LogWriter

infoLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the info loglevel

Return type

LogWriter

Returns

info LogWriter

isEnabled(idx: Log::LogIndex) → bool

Checks if the given LogIndex is enabled. This can be used to determine if a certain log level will be displayed or not.

Parameters

idx (int) – [in] the level

Return type

boolean

Returns

true if enabled, false otherwise.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
log() → Log &

convenience function of getInstance

Return type

Log

Returns

a Log

remove(id: Log::LogIndex) → void

Removes a log

If the id cannot be found an exception is thrown

Parameters

id (int) – [in] Log identifier

removeAll() → void

Removes all log writers

setDisable(mask: int) → void

Disable log(s) given by log mask.

Parameters

mask (int) – [in] the mask for the logs to disable.

setEnable(mask: int) → void

Enable log(s) given by log mask.

Parameters

mask (int) – [in] the mask for the logs to enable.

setLevel(loglevel: Log::LogIndex) → void

set the loglevel. Any log with LogIndex equal to or less than loglevel will be enabled. Any log above will be disabled unless an enabled mask is specified for that log

Parameters

loglevel (int) – [in] the level

setLog(log: LogPtr) → void

sets the instance of the log class

Parameters

log (rw::common::Ptr< Log >) – [in] the log that will be used through the static log methods.

setWriter(id: Log::LogIndex, writer: LogWriterPtr) → void

Associates a LogWriter with the LogIndex id.

SetWriter can either be used to redefine an existing log or to create a new custom output.

Example:

Log::SetWriter(Log::User1, new LogStreamWriter(std::cout));
RW_LOG(Log::User1, "Message send to User log 1");
Parameters
  • id (int) – [in] the LogIndex that the logwriter is associated with.

  • writer (rw::common::Ptr< LogWriter >) – [in] LogWriter object to use

setWriterForMask(mask: int, writer: LogWriterPtr) → void

Associates a LogWriter with the logs specified with mask.

SetWriter can either be used to redefine an existing log or to create a new custom output.

Example:

log.setWriterForMask(Log::InfoMask | Log::DebugMask, new LogStreamWriter(std::cout));
RW_LOG(Log::Info, "Message send to User log 1");
Parameters
  • mask (int) – [in] the LogIndexMask that the logwriter is associated with.

  • writer (rw::common::Ptr< LogWriter >) – [in] LogWriter object to use

property thisown

The membership flag

toMask(idx: Log::LogIndex) → Log::LogIndexMask

Convert a LogIndex to a mask.

Parameters

idx (int) – [in] the LogIndex.

Return type

int

Returns

the mask enabling the given log level.

warning() → LogWriter &

convenience function for getting the LogWriter that is associated with the warning loglevel

Return type

LogWriter

Returns

info LogWriter

warningLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the warning loglevel

Return type

LogWriter

Returns

warning LogWriter

write(*args) → void

Overload 1:

Writes message to the log

If the id cannot be found an exception is thrown

Parameters
  • id (int) – [in] Log identifier

  • message (string) – [in] String message to write


Overload 2:

Writes message to the logwriter associated with LogIndex id

If the id cannot be found an exception is thrown

Parameters
  • id (int) – [in] Log identifier

  • message (Message) – [in] Message to write

writeln(id: Log::LogIndex, message: std::string const &) → void

Writes message followed by a ‘n’ to the log

If the id cannot be found an exception is thrown

Parameters
  • id (int) – [in] Log identifier

  • message (string) – [in] Message to write

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

Bases: object

Write interface for Logs

LogWriter provides an output strategy for a log.

__init__(*args, **kwargs)

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

flush() → void

Flush method

setTabLevel(tabLevel: int) → void

Set the tab level

property thisown

The membership flag

write(*args) → void

Overload 1:

Writes str to the log

Parameters

str (string) – [in] message to write


Overload 2:

Writes msg to the log

Default behavior is to use write(const std::string&) for the standard streaming representation of msg.

Parameters

msg (Message) – [in] message to write

writeln(str: std::string const &) → void

Writes str as a line

By default writeln writes str followed by a ‘n’. However, logs are free to implement a line change differently.

class sdurw.LogWriterPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (LogWriter) – The object to take ownership of.

flush() → void

Flush method

get() → LogWriter *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setTabLevel(tabLevel: int) → void

Set the tab level

property thisown

The membership flag

write(*args) → void

Overload 1:

Writes str to the log

Parameters

str (string) – [in] message to write


Overload 2:

Writes msg to the log

Default behavior is to use write(const std::string&) for the standard streaming representation of msg.

Parameters

msg (Message) – [in] message to write

writeln(str: std::string const &) → void

Writes str as a line

By default writeln writes str followed by a ‘n’. However, logs are free to implement a line change differently.

sdurw.Log_debugLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the debug loglevel

Return type

LogWriter

Returns

debug LogWriter

sdurw.Log_errorLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the error loglevel

Return type

LogWriter

Returns

error LogWriter

sdurw.Log_getInstance() → rw::common::Ptr< Log >

returns the global log instance. Global in the sence of whatever is linked staticly together.

Return type

rw::common::Ptr< Log >

Returns

a Log

sdurw.Log_infoLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the info loglevel

Return type

LogWriter

Returns

info LogWriter

sdurw.Log_log() → Log &

convenience function of getInstance

Return type

Log

Returns

a Log

sdurw.Log_setLog(log: LogPtr) → void

sets the instance of the log class

Parameters

log (rw::common::Ptr< Log >) – [in] the log that will be used through the static log methods.

sdurw.Log_toMask(idx: Log::LogIndex) → Log::LogIndexMask

Convert a LogIndex to a mask.

Parameters

idx (int) – [in] the LogIndex.

Return type

int

Returns

the mask enabling the given log level.

sdurw.Log_warningLog() → LogWriter &

convenience function for getting the LogWriter that is associated with the warning loglevel

Return type

LogWriter

Returns

warning LogWriter

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

Bases: object

__init__(*args, **kwargs)

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

static abs(v: Q) → rw::math::Q
static ceilLog2(n: int) → int
static clamp(*args) → rw::math::Vector3D< double >
static clampQ(*args) → rw::math::Q
static eaaToQuaternion(*args) → rw::math::Quaternion< float >

Overload 1:

Equivalent angle axis to quaternion conversion.

Parameters

eaa (rw::math::EAA< double >) – [in] the EAA object that is to be converted

Return type

rw::math::Quaternion< double >

Returns

a Quaternion object that represents the converted EAA


Overload 2:

Equivalent angle axis to quaternion conversion.

Parameters

eaa (rw::math::EAA< float >) – [in] the EAA object that is to be converted

Return type

rw::math::Quaternion< float >

Returns

a Quaternion object that represents the converted EAA

static factorial(n: long long) → long long
static isNaN(d: double) → bool
static max(v: Q) → double
static min(v: Q) → double
static quaternionToEAA(*args) → rw::math::EAA< float >

Overload 1:

Quaternion to equivalent angle axis conversion.

Parameters

quat (rw::math::Quaternion< double >) – [in] the Quaternion object that is to be converted.

Return type

rw::math::EAA< double >

Returns

a EAA object that represents the converted quaternion


Overload 2:

Quaternion to equivalent angle axis conversion.

Parameters

quat (rw::math::Quaternion< float >) – [in] the Quaternion object that is to be converted.

Return type

rw::math::EAA< float >

Returns

a EAA object that represents the converted quaternion

static ran(*args) → double
static ranDir(dim: size_t, length: double = 1) → rw::math::Q
static ranI(_from: int, to: int) → int
static ranNormalDist(mean: double, sigma: double) → double
static ranQ(*args) → rw::math::Q
static ranWeightedDir(dim: size_t, weights: Q, length: double = 1) → rw::math::Q
static round(d: double) → double
static seed(*args) → void
static sign(*args) → rw::math::Q
static sqr(q: Q) → rw::math::Q
static sqrt(q: Q) → rw::math::Q
property thisown

The membership flag

sdurw.Math_abs(v: Q) → rw::math::Q
sdurw.Math_ceilLog2(n: int) → int
sdurw.Math_clamp(*args) → rw::math::Vector3D< double >
sdurw.Math_clampQ(*args) → rw::math::Q
sdurw.Math_eaaToQuaternion(*args) → rw::math::Quaternion< float >

Overload 1:

Equivalent angle axis to quaternion conversion.

Parameters

eaa (rw::math::EAA< double >) – [in] the EAA object that is to be converted

Return type

rw::math::Quaternion< double >

Returns

a Quaternion object that represents the converted EAA


Overload 2:

Equivalent angle axis to quaternion conversion.

Parameters

eaa (rw::math::EAA< float >) – [in] the EAA object that is to be converted

Return type

rw::math::Quaternion< float >

Returns

a Quaternion object that represents the converted EAA

sdurw.Math_factorial(n: long long) → long long
sdurw.Math_isNaN(d: double) → bool
sdurw.Math_max(v: Q) → double
sdurw.Math_min(v: Q) → double
sdurw.Math_quaternionToEAA(*args) → rw::math::EAA< float >

Overload 1:

Quaternion to equivalent angle axis conversion.

Parameters

quat (rw::math::Quaternion< double >) – [in] the Quaternion object that is to be converted.

Return type

rw::math::EAA< double >

Returns

a EAA object that represents the converted quaternion


Overload 2:

Quaternion to equivalent angle axis conversion.

Parameters

quat (rw::math::Quaternion< float >) – [in] the Quaternion object that is to be converted.

Return type

rw::math::EAA< float >

Returns

a EAA object that represents the converted quaternion

sdurw.Math_ran(*args) → double
sdurw.Math_ranDir(dim: size_t, length: double = 1) → rw::math::Q
sdurw.Math_ranI(_from: int, to: int) → int
sdurw.Math_ranNormalDist(mean: double, sigma: double) → double
sdurw.Math_ranQ(*args) → rw::math::Q
sdurw.Math_ranWeightedDir(dim: size_t, weights: Q, length: double = 1) → rw::math::Q
sdurw.Math_round(d: double) → double
sdurw.Math_seed(*args) → void
sdurw.Math_sign(*args) → rw::math::Q
sdurw.Math_sqr(q: Q) → rw::math::Q
sdurw.Math_sqrt(q: Q) → rw::math::Q
class sdurw.Matrix(dimx: int, dimy: int)

Bases: object

__init__(dimx: int, dimy: int)

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

elem(x: int, y: int) → double &
get(x: int, y: int) → double
pseudoinverse() → sdurw.Matrix
set(x: int, y: int, value: double) → void
property thisown

The membership flag

class sdurw.Message(*args)

Bases: object

Standard type for user messages of RobWork.

Messages are used for exception, warnings, and other things that are reported to the user.

Message values should contain the source file name and line number so that it is easy to look up the place in the code responsible for the generation of the message.

RW_THROW and RW_WARN of macros.hpp have been introduced for the throwing of exceptions and emission of warnings.

__init__(*args)

Constructor

Messages of RobWork are all annotated by the originating file name, the originating line number, and a message text for the user.

Supplying all the file, line, and message parameters can be a little painfull, so a utility for creating messages is available from the file macros.hpp.

Parameters
  • file (string) – [in] The source file name.

  • line (int) – [in] The source file line number.

  • message (string) – [in] A message for a user.

getFile() → std::string const &

The name of source file within which the message was constructed.

Return type

string

Returns

The exception file name.

getFullText() → std::string

Returns a full description of the message containing file, line number and message.

getLine() → int

The line number for the file at where the message was constructed.

Return type

int

Returns

The exception line number.

getText() → std::string const &

The message text meant for the user.

Return type

string

Returns

The message text.

property thisown

The membership flag

class sdurw.MessagePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Message) – The object to take ownership of.

get() → Message *
getFile() → std::string const &

The name of source file within which the message was constructed.

Return type

string

Returns

The exception file name.

getFullText() → std::string

Returns a full description of the message containing file, line number and message.

getLine() → int

The line number for the file at where the message was constructed.

Return type

int

Returns

The exception line number.

getText() → std::string const &

The message text meant for the user.

Return type

string

Returns

The message text.

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

static makeEuclideanQ() → rw::common::Ptr< rw::math::Metric< rw::math::Q > >
property thisown

The membership flag

sdurw.MetricFactory_makeEuclideanQ() → rw::common::Ptr< rw::math::Metric< rw::math::Q > >
class sdurw.MetricQ(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

distance(*args) → double
size() → int
property thisown

The membership flag

class sdurw.MetricQCPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Metric< rw::math::Q >) – The object to take ownership of.

distance(*args) → double
get() → Metric< rw::math::Q > const *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
size() → int
property thisown

The membership flag

class sdurw.MetricQPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Metric< rw::math::Q >) – The object to take ownership of.

distance(*args) → double
get() → Metric< rw::math::Q > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
size() → int
property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

distance(*args) → double
size() → int
property thisown

The membership flag

class sdurw.MetricSE3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Metric< rw::math::Transform3D< double > >) – The object to take ownership of.

distance(*args) → double
get() → Metric< rw::math::Transform3D< double > > *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
size() → int
property thisown

The membership flag

class sdurw.Model3D(name: std::string const &)

Bases: object

__init__(name: std::string const &)

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

getMask() → int
getName() → std::string const &
getTransform() → rw::math::Transform3D< double > const &
hasMaterial(matid: std::string const &) → bool
isDynamic() → bool
removeObject(name: std::string const &) → void
setDynamic(dynamic: bool) → void
setMask(mask: int) → void
setName(name: std::string const &) → void
setTransform(t3d: Transform3d) → void
property thisown

The membership flag

toGeometryData() → rw::common::Ptr< GeometryData >
class sdurw.Model3DPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Model3D) – The object to take ownership of.

get() → Model3D *
getMask() → int
getName() → std::string const &
getTransform() → rw::math::Transform3D< double > const &
hasMaterial(matid: std::string const &) → bool
isDynamic() → bool
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
removeObject(name: std::string const &) → void
setDynamic(dynamic: bool) → void
setMask(mask: int) → void
setName(name: std::string const &) → void
setTransform(t3d: Transform3d) → void
property thisown

The membership flag

toGeometryData() → rw::common::Ptr< GeometryData >
class sdurw.Model3DPtrVector(*args)

Bases: object

__init__(*args)

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

append(x: Model3DPtr) → void
assign(n: std::vector< rw::common::Ptr< Model3D > >::size_type, x: Model3DPtr) → void
back() → std::vector< rw::common::Ptr< Model3D > >::value_type const &
begin() → std::vector< rw::common::Ptr< Model3D > >::iterator
capacity() → std::vector< rw::common::Ptr< Model3D > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::common::Ptr< Model3D > >::iterator
erase(*args) → std::vector< rw::common::Ptr< Model3D > >::iterator
front() → std::vector< rw::common::Ptr< Model3D > >::value_type const &
get_allocator() → std::vector< rw::common::Ptr< Model3D > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::common::Ptr< Model3D > >::value_type
pop_back() → void
push_back(x: Model3DPtr) → void
rbegin() → std::vector< rw::common::Ptr< Model3D > >::reverse_iterator
rend() → std::vector< rw::common::Ptr< Model3D > >::reverse_iterator
reserve(n: std::vector< rw::common::Ptr< Model3D > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::common::Ptr< Model3D > >::size_type
swap(v: Model3DPtrVector) → void
property thisown

The membership flag

class sdurw.MovableFrame(name: std::string const &)

Bases: sdurw.Frame

__init__(name: std::string const &)

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

setTransform(transform: Transform3d, state: State) → void
property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

addFrame(frame: Frame) → void
getBase() → Frame *
getCOM(state: State) → rw::math::Vector3D< double >
getFrames() → std::vector< Frame *,std::allocator< Frame * > > const &
getGeometry(*args) → std::vector< rw::common::Ptr< Geometry >,std::allocator< rw::common::Ptr< Geometry > > > const &
getInertia(state: State) → rw::math::InertiaMatrix< double >
getMass(state: State) → double
getModels(*args) → std::vector< rw::common::Ptr< Model3D >,std::allocator< rw::common::Ptr< Model3D > > > const &
getName() → std::string const &
property thisown

The membership flag

class sdurw.ObjectPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Object) – The object to take ownership of.

addFrame(frame: Frame) → void
get() → Object *
getBase() → Frame *
getCOM(state: State) → rw::math::Vector3D< double >
getFrames() → std::vector< Frame *,std::allocator< Frame * > > const &
getGeometry(*args) → std::vector< rw::common::Ptr< Geometry >,std::allocator< rw::common::Ptr< Geometry > > > const &
getInertia(state: State) → rw::math::InertiaMatrix< double >
getMass(state: State) → double
getModels(*args) → std::vector< rw::common::Ptr< Model3D >,std::allocator< rw::common::Ptr< Model3D > > > const &
getName() → std::string const &
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

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

Bases: sdurw.JointDevice

__init__(*args, **kwargs)

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

property thisown

The membership flag

class sdurw.ParallelDevicePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (ParallelDevice) – The object to take ownership of.

baseJend(state: State) → rw::math::Jacobian
baseJframe(frame: Frame, state: State) → rw::math::Jacobian
baseJframes(frames: FrameVector, state: State) → rw::math::Jacobian
baseTend(state: State) → rw::math::Transform3D< double >
baseTframe(f: Frame, state: State) → rw::math::Transform3D< double >
get() → ParallelDevice *
getAccelerationLimits() → rw::math::Q
getBase(*args) → Frame const *
getBounds() → std::pair< rw::math::Q,rw::math::Q >
getDOF() → size_t
getEnd(*args) → Frame const *
getJoints() → std::vector< Joint *,std::allocator< Joint * > > const &
getName() → std::string
getQ(state: State) → rw::math::Q
getVelocityLimits() → rw::math::Q
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
setAccelerationLimits(acclimits: Q) → void
setBounds(bounds: QPair) → void
setName(name: std::string const &) → void
setQ(q: Q, state: State) → void
setVelocityLimits(vellimits: Q) → void
property thisown

The membership flag

worldTbase(state: State) → rw::math::Transform3D< double >
class sdurw.PathPlannerQQ(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

getProperties() → PropertyMap &
query(*args) → bool
property thisown

The membership flag

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

Bases: object

__init__(*args, **kwargs)

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

getProperties() → PropertyMap &
query(*args) → bool
property thisown

The membership flag

class sdurw.PathQ(*args)

Bases: sdurw.QVector

__init__(*args)

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

elem(idx: size_t) → rw::math::Q &
size() → size_t
property thisown

The membership flag

toTimedQPath(*args) → rw::common::Ptr< Path< Timed< rw::math::Q > > >
toTimedStatePath(dev: DevicePtr, state: State) → rw::common::Ptr< Path< Timed< State > > >
class sdurw.PathQPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Path< rw::math::Q >) – The object to take ownership of.

append(x: Q) → void
assign(n: std::vector< rw::math::Q >::size_type, x: Q) → void
back() → std::vector< rw::math::Q >::value_type const &
begin() → std::vector< rw::math::Q >::iterator
capacity() → std::vector< rw::math::Q >::size_type
clear() → void
elem(idx: size_t) → rw::math::Q &
empty() → bool
end() → std::vector< rw::math::Q >::iterator
erase(*args) → std::vector< rw::math::Q >::iterator
front() → std::vector< rw::math::Q >::value_type const &
get() → Path< rw::math::Q > *
get_allocator() → std::vector< rw::math::Q >::allocator_type
insert(*args) → void
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::math::Q >::value_type
pop_back() → void
push_back(x: Q) → void
rbegin() → std::vector< rw::math::Q >::reverse_iterator
rend() → std::vector< rw::math::Q >::reverse_iterator
reserve(n: std::vector< rw::math::Q >::size_type) → void
resize(*args) → void
size() → size_t
swap(v: QVector) → void
property thisown

The membership flag

toTimedQPath(*args) → rw::common::Ptr< Path< Timed< rw::math::Q > > >
toTimedStatePath(dev: DevicePtr, state: State) → rw::common::Ptr< Path< Timed< State > > >
class sdurw.PathSE3(*args)

Bases: sdurw.Transform3dVector

__init__(*args)

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

elem(idx: size_t) → rw::math::Transform3D< double > &
size() → size_t
property thisown

The membership flag

class sdurw.PathSE3Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Path< rw::math::Transform3D< double > >) – The object to take ownership of.

append(x: Transform3d) → void
assign(n: std::vector< rw::math::Transform3D< double > >::size_type, x: Transform3d) → void
back() → std::vector< rw::math::Transform3D< double > >::value_type const &
begin() → std::vector< rw::math::Transform3D< double > >::iterator
capacity() → std::vector< rw::math::Transform3D< double > >::size_type
clear() → void
elem(idx: size_t) → rw::math::Transform3D< double > &
empty() → bool
end() → std::vector< rw::math::Transform3D< double > >::iterator
erase(*args) → std::vector< rw::math::Transform3D< double > >::iterator
front() → std::vector< rw::math::Transform3D< double > >::value_type const &
get() → Path< rw::math::Transform3D< double > > *
get_allocator() → std::vector< rw::math::Transform3D< double > >::allocator_type
insert(*args) → void
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::math::Transform3D< double > >::value_type
pop_back() → void
push_back(x: Transform3d) → void
rbegin() → std::vector< rw::math::Transform3D< double > >::reverse_iterator
rend() → std::vector< rw::math::Transform3D< double > >::reverse_iterator
reserve(n: std::vector< rw::math::Transform3D< double > >::size_type) → void
resize(*args) → void
size() → size_t
swap(v: Transform3dVector) → void
property thisown

The membership flag

class sdurw.PathTimedQ(*args)

Bases: sdurw.TimedQVector

__init__(*args)

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

elem(idx: size_t) → Timed< rw::math::Q > &
size() → size_t
property thisown

The membership flag

class sdurw.PathTimedQPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Path< Timed< rw::math::Q > >) – The object to take ownership of.

append(x: TimedQ) → void
assign(n: std::vector< Timed< rw::math::Q > >::size_type, x: TimedQ) → void
back() → std::vector< Timed< rw::math::Q > >::value_type const &
begin() → std::vector< Timed< rw::math::Q > >::iterator
capacity() → std::vector< Timed< rw::math::Q > >::size_type
clear() → void
elem(idx: size_t) → Timed< rw::math::Q > &
empty() → bool
end() → std::vector< Timed< rw::math::Q > >::iterator
erase(*args) → std::vector< Timed< rw::math::Q > >::iterator
front() → std::vector< Timed< rw::math::Q > >::value_type const &
get() → Path< Timed< rw::math::Q > > *
get_allocator() → std::vector< Timed< rw::math::Q > >::allocator_type
insert(*args) → void
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
iterator() → swig::SwigPyIterator *
pop() → std::vector< Timed< rw::math::Q > >::value_type
pop_back() → void
push_back(x: TimedQ) → void
rbegin() → std::vector< Timed< rw::math::Q > >::reverse_iterator
rend() → std::vector< Timed< rw::math::Q > >::reverse_iterator
reserve(n: std::vector< Timed< rw::math::Q > >::size_type) → void
resize(*args) → void
size() → size_t
swap(v: TimedQVector) → void
property thisown

The membership flag

class sdurw.PathTimedState(*args)

Bases: sdurw.TimedStateVector

__init__(*args)

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

append(spath: PathTimedStatePtr) → void
elem(idx: size_t) → Timed< State > &
static load(filename: std::string const &, wc: WorkCellPtr) → rw::common::Ptr< Path< Timed< State > > >
save(filename: std::string const &, wc: WorkCellPtr) → void
size() → size_t
property thisown

The membership flag

class sdurw.PathTimedStatePtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Path< Timed< State > >) – The object to take ownership of.

append(spath: PathTimedStatePtr) → void
assign(n: std::vector< Timed< State > >::size_type, x: TimedState) → void
back() → std::vector< Timed< State > >::value_type const &
begin() → std::vector< Timed< State > >::iterator
capacity() → std::vector< Timed< State > >::size_type
clear() → void
elem(idx: size_t) → Timed< State > &
empty() → bool
end() → std::vector< Timed< State > >::iterator
erase(*args) → std::vector< Timed< State > >::iterator
front() → std::vector< Timed< State > >::value_type const &
get() → Path< Timed< State > > *
get_allocator() → std::vector< Timed< State > >::allocator_type
insert(*args) → void
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
iterator() → swig::SwigPyIterator *
load(filename: std::string const &, wc: WorkCellPtr) → rw::common::Ptr< Path< Timed< State > > >
pop() → std::vector< Timed< State > >::value_type
pop_back() → void
push_back(x: TimedState) → void
rbegin() → std::vector< Timed< State > >::reverse_iterator
rend() → std::vector< Timed< State > >::reverse_iterator
reserve(n: std::vector< Timed< State > >::size_type) → void
resize(*args) → void
save(filename: std::string const &, wc: WorkCellPtr) → void
size() → size_t
swap(v: TimedStateVector) → void
property thisown

The membership flag

sdurw.PathTimedState_load(filename: std::string const &, wc: WorkCellPtr) → rw::common::Ptr< Path< Timed< State > > >
class sdurw.PieperSolver(*args)

Bases: sdurw.ClosedFormIK

Calculates the closed form inverse kinematics of a device using Piepers method

To use Piepers method it is required that the device has 6 DOF revolute joints, and that last three axis intersects. In this implementation it will be assumed that the that rotation of these last three axis are equivalent to an Euler ZYZ or Z(-Y)Z rotation.

See Introduction to Robotics Mechanics and Control, by John J. Craig for further information about the algorithm.

__init__(*args)

Overload 1:

Constructor

Parameters
  • dhparams (std::vector< DHParameterSet,std::allocator< DHParameterSet > >) – [in] DH-parameters corresponding to the device

  • joint6Tend (rw::math::Transform3D< double >) – [in] transform from the 6th joint to the end of the device

  • baseTdhRef (rw::math::Transform3D< double >) – [in] Transformation between the robot base and the reference frame for the DH-parameters.


Overload 2:

Constructor - the DH parameters is expected to be on each joint in the serial device. When specifying the DH params in the workcell file this constructor can be used.

Parameters
  • dev (SerialDevice) – [in] the device for which to extract the DH parameters.

  • joint6Tend (rw::math::Transform3D< double >) – [in] transform from the 6th joint to the end of the device

  • state (State) – [in] State using which the transformation between robot base and the DH-parameters reference frame are calculated.

Notes: throws an exception if the device has no DH params

getTCP() → rw::common::Ptr< Frame const >

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

Return type

rw::common::Ptr< Frame const >

Returns

The TCP Frame used when solving the IK.

setCheckJointLimits(check: bool) → void

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: Transform3d, state: State) → std::vector< rw::math::Q,std::allocator< rw::math::Q > >

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< rw::math::Q,std::allocator< rw::math::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.PlainTriMeshN1

Bases: object

__init__()

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

property thisown

The membership flag

class sdurw.PlainTriMeshN1Ptr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (PlainTriMeshN1) – The object to take ownership of.

get() → PlainTriMeshN1 *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.PlainTriMeshN1f

Bases: object

__init__()

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

property thisown

The membership flag

class sdurw.PlainTriMeshN1fPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (PlainTriMeshN1f) – The object to take ownership of.

get() → PlainTriMeshN1f *
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.Plane(*args)

Bases: sdurw.Primitive

__init__(*args)

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

createMesh(resolution: int) → rw::common::Ptr< TriMesh >
d() → double &
distance(point: Vector3d) → double
getParameters() → rw::math::Q
getType() → GeometryData::GeometryType

the type of this primitive

Return type

int

Returns

the type of primitive.

normal() → rw::math::Vector3D< double > &
refit(data: Vector3dVector) → double
property thisown

The membership flag

class sdurw.PlannerConstraint

Bases: object

__init__()

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

getQConstraint() → QConstraint &
getQConstraintPtr() → rw::common::Ptr< QConstraint > const &
inCollision(*args) → bool
static make(*args) → sdurw.PlannerConstraint
property thisown

The membership flag

class sdurw.PlannerConstraintPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (PlannerConstraint) – The object to take ownership of.

get() → PlannerConstraint *
getQConstraint() → QConstraint &
getQConstraintPtr() → rw::common::Ptr< QConstraint > const &
inCollision(*args) → bool
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
make(*args) → sdurw.PlannerConstraint
property thisown

The membership flag

sdurw.PlannerConstraint_make(*args) → sdurw.PlannerConstraint
class sdurw.Plugin(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

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

getId() → std::string const &
getName() → std::string const &
getVersion() → std::string const &
property thisown

The membership flag

class sdurw.PluginPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (Plugin) – The object to take ownership of.

get() → Plugin *
getId() → std::string const &
getName() → std::string const &
getVersion() → std::string const &
isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isShared() → bool
property thisown

The membership flag

class sdurw.PluginPtrVector(*args)

Bases: object

__init__(*args)

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

append(x: PluginPtr) → void
assign(n: std::vector< rw::common::Ptr< Plugin > >::size_type, x: PluginPtr) → void
back() → std::vector< rw::common::Ptr< Plugin > >::value_type const &
begin() → std::vector< rw::common::Ptr< Plugin > >::iterator
capacity() → std::vector< rw::common::Ptr< Plugin > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::common::Ptr< Plugin > >::iterator
erase(*args) → std::vector< rw::common::Ptr< Plugin > >::iterator
front() → std::vector< rw::common::Ptr< Plugin > >::value_type const &
get_allocator() → std::vector< rw::common::Ptr< Plugin > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::common::Ptr< Plugin > >::value_type
pop_back() → void
push_back(x: PluginPtr) → void
rbegin() → std::vector< rw::common::Ptr< Plugin > >::reverse_iterator
rend() → std::vector< rw::common::Ptr< Plugin > >::reverse_iterator
reserve(n: std::vector< rw::common::Ptr< Plugin > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::common::Ptr< Plugin > >::size_type
swap(v: PluginPtrVector) → void
property thisown

The membership flag

class sdurw.PointCloud(*args)

Bases: sdurw.GeometryData

A simple point cloud data structure. Points may be ordered or not. An ordered set is kept as a single array in row major order and with a width and a height. An unordered array must have height==1 and width equal to the number of points.

__init__(*args)

Overload 1:

constructor


Overload 2:

constructor

Parameters
  • w (int) – [in]

  • h (int) – [in]

getData() → std::vector< rw::math::Vector3D< float >,std::allocator< rw::math::Vector3D< float > > > const &

returns a char pointer to the image data

Return type

std::vector< rw::math::Vector3D< float >,std::allocator< rw::math::Vector3D< float > > >

Returns

const char pointer to the image data

getDataTransform() → rw::math::Transform3D< float > const &
getHeight() → int
getTriMesh(forceCopy: bool = True) → rw::common::Ptr< TriMesh >

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. 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::common::Ptr< TriMesh >

Returns

TriMesh representation of this GeometryData

getType() → GeometryData::GeometryType

the type of this primitive

Return type

int

Returns

the type of primitive.

getWidth() → int

width of the point cloud data. If the data is unordered then this will be equal to the number of points.

Return type

int

Returns

width of data points

isOrdered() → bool
static loadPCD(filename: std::string const &) → rw::common::Ptr< PointCloud >

load point cloud from PCD file

Parameters

filename (string) – [in] name of PCD file

Return type

rw::common::Ptr< PointCloud >

Returns

a point cloud

resize(w: int, h: int) → void

set width of point cloud. Data elements are accessed as [x+y*width].

If the current data array cannot contain the elements then it will be resized to be able to it.

Parameters
  • w (int) – [in] new width

  • h (int) – [in] new height

static savePCD(*args) → void

save point cloud in PCD file format (PCL library format)

Parameters
  • cloud (PointCloud) – [in] the point cloud to save

  • filename (string) – [in] the name of the file to save to

  • t3d (rw::math::Transform3D< float >) – [in] the transformation of the point cloud

size() → size_t

gets the number of points in the point cloud.

Return type

int

Returns

the number of points.

property thisown

The membership flag

class sdurw.PointCloudPtr(*args)

Bases: object

The Ptr type represents a smart pointer that can take ownership of the underlying object.

If the underlying object is owned by the smart pointer, it is destructed when there is no more smart pointers pointing to the object.

__init__(*args)
Overload 1:

Empty smart pointer (Null).


Overload 2:

Construct new smart pointer that takes ownership of the underlying object.

Parameters

ptr (PointCloud) – The object to take ownership of.

get() → PointCloud *
getData() → std::vector< rw::math::Vector3D< float >,std::allocator< rw::math::Vector3D< float > > > const &

returns a char pointer to the image data

Return type

std::vector< rw::math::Vector3D< float >,std::allocator< rw::math::Vector3D< float > > >

Returns

const char pointer to the image data

getDataTransform() → rw::math::Transform3D< float > const &
getHeight() → int
getTriMesh(forceCopy: bool = True) → rw::common::Ptr< TriMesh >
getType() → GeometryData::GeometryType
getWidth() → int

width of the point cloud data. If the data is unordered then this will be equal to the number of points.

Return type

int

Returns

width of data points

isNull() → bool

Check if smart pointer is null.

Return type

boolean

Returns

true if smart pointer is null.

isOrdered() → bool
isShared() → bool
loadPCD(filename: std::string const &) → rw::common::Ptr< PointCloud >

load point cloud from PCD file

Parameters

filename (string) – [in] name of PCD file

Return type

rw::common::Ptr< PointCloud >

Returns

a point cloud

resize(w: int, h: int) → void

set width of point cloud. Data elements are accessed as [x+y*width].

If the current data array cannot contain the elements then it will be resized to be able to it.

Parameters
  • w (int) – [in] new width

  • h (int) – [in] new height

savePCD(*args) → void

save point cloud in PCD file format (PCL library format)

Parameters
  • cloud (PointCloud) – [in] the point cloud to save

  • filename (string) – [in] the name of the file to save to

  • t3d (rw::math::Transform3D< float >) – [in] the transformation of the point cloud

size() → size_t

gets the number of points in the point cloud.

Return type

int

Returns

the number of points.

property thisown

The membership flag

toString(type: GeometryData::GeometryType) → std::string

format GeometryType to string

Parameters

type (int) – [in] the type of geometry to convert to string.

Return type

string

Returns

a string.

sdurw.PointCloud_loadPCD(filename: std::string const &) → rw::common::Ptr< PointCloud >

load point cloud from PCD file

Parameters

filename (string) – [in] name of PCD file

Return type

rw::common::Ptr< PointCloud >

Returns

a point cloud

sdurw.PointCloud_savePCD(*args) → void

save point cloud in PCD file format (PCL library format)

Parameters
  • cloud (PointCloud) – [in] the point cloud to save

  • filename (string) – [in] the name of the file to save to

  • t3d (rw::math::Transform3D< float >) – [in] the transformation of the point cloud

class sdurw.Pose6d(*args)

Bases: object

__init__(*args)

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

property thisown

The membership flag

toTransform3D() → rw::math::Transform3D< double >
class sdurw.Pose6dVector(*args)

Bases: object

__init__(*args)

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

append(x: Pose6d) → void
assign(n: std::vector< rw::math::Pose6D< double > >::size_type, x: Pose6d) → void
back() → std::vector< rw::math::Pose6D< double > >::value_type const &
begin() → std::vector< rw::math::Pose6D< double > >::iterator
capacity() → std::vector< rw::math::Pose6D< double > >::size_type
clear() → void
empty() → bool
end() → std::vector< rw::math::Pose6D< double > >::iterator
erase(*args) → std::vector< rw::math::Pose6D< double > >::iterator
front() → std::vector< rw::math::Pose6D< double > >::value_type const &
get_allocator() → std::vector< rw::math::Pose6D< double > >::allocator_type
insert(*args) → void
iterator() → swig::SwigPyIterator *
pop() → std::vector< rw::math::Pose6D< double > >::value_type
pop_back() → void
push_back(x: Pose6d) → void
rbegin() → std::vector< rw::math::Pose6D< double > >::reverse_iterator
rend() → std::vector< rw::math::Pose6D< double > >::reverse_iterator
reserve(n: std::vector< rw::math::Pose6D< double > >::size_type) → void
resize(*args) → void
size() → std::vector< rw::math::Pose6D< double > >::size_type
swap(v: Pose6dVector) → void
property thisown

The membership flag

class sdurw.Pose6f(*args)

Bases: object

__init__(*args)

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

property thisown

The membership flag

toTransform3D() → rw::math::Transform3D< float >
class sdurw.Primitive(*args, **kwargs)

Bases: sdurw.GeometryData

__init__(*args, **kwargs)

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

createMesh(res