sdurw_graspplanning module

class sdurw_graspplanning.sdurw_graspplanning.ApproachMeasure3D(maxAngle)

Bases: GraspQualityMeasure3D

computes the quality as a function of the angle between the approach angle and some planar surface.

__init__(maxAngle)

constructor :type maxAngle: float :param maxAngle: [in] the maximum allowed angle between approach and

surface normal. Grasps violating this will recieve high penalty on quality.

quality(grasp)

computes the quality of the grasp such that the quality is in the interval [0;1] with 1 being the highest quality.

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.CMDistCCPMeasure3D(CM, maxDist)

Bases: GraspQualityMeasure3D

computes the quality as a function of the distance between the center of mass (COM) and the Center of the Contact Polygon (CCP)

See ROA 3.2.3

__init__(CM, maxDist)

constructor :type CM: rw::math::Vector3D< double > :param CM: [in] The center of mass of the object described in the grasp frame. :type maxDist: float :param maxDist: [in] The max dist between CM and CCP that is allowed.

quality(grasp)

computes the quality of the grasp such that the quality is in the interval [0;1] with 1 being the highest quality.

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.CompositeContactFilter(enableFullStats=False)

Bases: ContactValidateFilter

makes it possible to combine several contact filters into one contact filter. Statistics are maintained of the validation succes which can be queried and analysed.

__init__(enableFullStats=False)

Cconstructor

addFilter(filter)

add contact validation filter :type filter: ContactValidateFilter :param filter:

getFilters()

get a vector of all contact filters :rtype: std::vector< rw::graspplanning::ContactValidateFilter * > :return:

isValid(contact)

test if a contact contact is valid in regard to the criterias of the class that implements this function. :type contact: Contact3D :param contact: [in] 3d contact :rtype: boolean :return: true if valid, false otherwise

setFilters(filters)

set all contact filters

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.CompositeGraspFilter

Bases: GraspValidateFilter

makes it possible to combine several contact filters into one contact filter. Statistics are maintained of the validation succes which can be queried and analyzed.

__init__()

Constructor

addFilter(filter)

add a composition to this filter :type filter: GraspValidateFilter :param filter:

clearStats()

clear the statistics

getFilters()

get all filters of this filter :rtype: std::vector< rw::graspplanning::GraspValidateFilter * > :return: list of GraspValidateFilter

getStats()

get statistics

the number of contacts that was invalid by the filter indicated by the index

isValid(contact)

tests if a grasp grasp is valid in regard to the criterias of the class that implements this function. :type grasp: Grasp3D :param grasp: :rtype: boolean :return:

setFilters(filters)

set the list of grasp validate filters :type filters: std::vector< rw::graspplanning::GraspValidateFilter * > :param filters:

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.ContactDistThresFilter(minDist, maxDist, allowCloseWhenOpposite=True)

Bases: GraspValidateFilter

tests if contact points in a grasp is too close or too far from each other.

Two points that are very close is not allowed unless they are approached from opposite directions.

__init__(minDist, maxDist, allowCloseWhenOpposite=True)

constructor :type minDist: float :param minDist: [in] minimum allowed distance between contact points :type maxDist: float :param maxDist: [in] maximum allowed distance between contact points :type allowCloseWhenOpposite: boolean, optional :param allowCloseWhenOpposite: [in] if true small distances are allowed when contact

normals are in opposite directions

isContactPairValid(c1, c2)

tests if the contact pair is valid according to this filter :type c1: Contact3D :param c1: [in] 3d contact :type c2: Contact3D :param c2: [in] 3d contact :rtype: boolean :return: true if contact pair is within filter criterias, false otherwise

isValid(grasp)

tests if a grasp grasp is valid in regard to the criterias of the class that implements this function. :type grasp: Grasp3D :param grasp: :rtype: boolean :return:

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.ContactValidateFilter(*args, **kwargs)

Bases: object

tests if a contact is valid in respect to some criterias implemented by a sub class.

__init__(*args, **kwargs)
isValid(contact)

test if a contact contact is valid in regard to the criterias of the class that implements this function. :type contact: Contact3D :param contact: [in] 3d contact :rtype: boolean :return: true if valid, false otherwise

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.Contour2DInfoMap(resolution=100)

Bases: object

class for analysing 2d contours.

__init__(resolution=100)

constructor :type resolution: int, optional :param resolution: [in] the resolution of the dicretisation of the

polar coordinates.

getAvgCurvature()

get average curvature of contour :rtype: float :return: average curvature

getCNormals(nAngle, margin, thres)

get all contacts that has a normal with an angle nAngle +-thres relative to the direction vector (1,0).

getContour()

get the 2d contour :rtype: Contour2D :return: 2d contour

getMaxCurvature()

get max curvature of contour :rtype: float :return: max curvature

getMinCurvature()

get min curvature of contour :rtype: float :return: min curvature

printToFile(file)

writes this contour information to file :type file: string :param file: [in] name of file

reset(contor)

initialize the contour2d map with a contour

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.CurvatureThresFilter(*args, **kwargs)

Bases: GraspValidateFilter, ContactValidateFilter

tests if a grasp is valid in respect to the curvature of the object surface in and around the contact points.

This class requires that the face in which the contact point is extracted is registered in the Contact3D data.

__init__(*args, **kwargs)
isValid(*args)

Overload 1:


Overload 2:

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.DiceContactG3D

Bases: object

generates candidate contact point sets (contact grasps) for grasping a given object. The nr of contacts per grasp is given by the user and a set of possibly good contact grasps are generated.

The method used is that which is used in the article “Grasping the Dice by Dicing the Grasp” by Ch. Borst, M. Fisher and G. Hirzinger

It works by randomly selecting surface contact grasps that are filtered using a fast but conservative force closure filter. As such grasps produced is not strictly force closure. Which means that another filter must also be applied before using the actual grasp.

Notes: (TODO) the sampling of contacts on the surface is not uniform on the surface area but instead in the number of triangles. To enable good sampling the triangles of the geometry should not vary too much in size.

__init__()
generateContactSet(maxNrOfContacts, timeout)

generates a contact set from some heuristic

generateNext()

generates one contact and returns it :rtype: Grasp3D :return:

getContactFilter()
initialize(obj, nrOfContacts, mu)

initializes the contact generator on some object. :type obj: TriMesh :param obj: [in] the object as a indexed triangle mesh :type nrOfContacts: int :param nrOfContacts: [in] the nr of contacts that are allowed in a grasp :type mu: float :param mu: documentation missing !

setContactFilter(filter)
setTransform(t3d)
property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.Grasp2D(nrOfContacts)

Bases: object

a grasp is a set of contacts between the object to be grasped and the robot gripper.

__init__(nrOfContacts)
property approach
property center
property contacts
property phi
property psi
scale(clerance)
property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.Grasp3D(*args)

Bases: object

a grasp is a set of contacts between the object to be grasped and the robot gripper.

__init__(*args)
property approach
property center
property contacts
property phi
property psi
property quality
scale(clerance)
property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.GraspData

Bases: object

data for describing a single grasp

__init__()

constructor

property approach

approach relative to object

property cq

contact configuration

property grasp

grasp information

property hp

hand pose

property op

object pose

property pq

preshape configuration

property quality

quality or value list

property tactileContacts

tactile contacts

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.GraspQualityMeasure3D(*args, **kwargs)

Bases: object

an interface for methods evaluating the quality of a specific grasp

__init__(*args, **kwargs)
quality(grasp)

computes the quality of the grasp such that the quality is in the interval [0;1] with 1 being the highest quality.

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.GraspTable(handName, objectId)

Bases: object

A table of grasp configurations that has been generated using a robot hand, a number of preshapes, and some grasp policy.

GTABLE_VERSION = 1

this version increase each time the file format is changed

__init__(handName, objectId)

constructor :type handName: string :param handName: [in] name of robot hand :type objectId: string :param objectId: [in] name of object that is being grasped

addGrasp(data)

add a grasp to this GraspTable :type data: GraspData :param data: [in] Grasp data

getCalibForceIndex()

gets the index of the calibration force if its used. The calibration force is stored in the ‘quality’ list in the GraspData objects. :rtype: int :return: index of calibration force if used, -1 otherwise

getData()

get all grasp data :rtype: std::vector< rw::graspplanning::GraspTable::GraspData > :return: vector of grasps

getHandName()

get name of hand :rtype: string :return: name of hand

getObjectName()

get name of object :rtype: string :return: name of object

getTactileArrayDim(i)

get the dimensions of the i’th tactile array :type i: int :param i: [in] the tactile array id :rtype: std::pair< int,int > :return:

hasCalibForce()

check if this table has calib force data :rtype: boolean :return: true if this table has calib force data (equal to getCalibForceIndex()>=0), false

otherwise

static load(filename)

load a grasp table from file :type filename: string :param filename: [in] name of file :rtype: rw::core::Ptr< rw::graspplanning::GraspTable > :return: GraspTable

nrTactileArrayGrasp()

get the number of tactile arrays on this hand :rtype: int :return:

save(filename)

save this grasp table to file filename :type filename: string :param filename: [in] name of file

setCalibForceIndex(idx)

set the index of the calibration force :type idx: int :param idx: [in] calibration force index

size()

get the nr of grasps in this GraspTable :rtype: int :return: nr of grasps in this GraspTable

property thisown

The membership flag

sdurw_graspplanning.sdurw_graspplanning.GraspTable_load(filename)

load a grasp table from file :type filename: string :param filename: [in] name of file :rtype: rw::core::Ptr< rw::graspplanning::GraspTable > :return: GraspTable

class sdurw_graspplanning.sdurw_graspplanning.GraspValidateFilter(*args, **kwargs)

Bases: object

tests if a grasp is valid in respect to some criterias implemented by a sub class.

__init__(*args, **kwargs)
isValid(grasp)

tests if a grasp grasp is valid in regard to the criterias of the class that implements this function. :type grasp: Grasp3D :param grasp: :rtype: boolean :return:

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.PlaneClearanceFilter(planeFrame, clearance, minAngle)

Bases: GraspValidateFilter, ContactValidateFilter

tests if a grasp is valid in respect to the distance of each contact point to some plane.

The plane is defined by the xy-plane in a transform that is specified relative to the frame that the object is specified relative to.

__init__(planeFrame, clearance, minAngle)

Constructor :type planeFrame: rw::math::Transform3D< double > :param planeFrame: [in] The transform of the plane relative to the frame

that the grasp contact points are described relative to.

Parameters
  • clearance (float) – [in] The minimum distance between plane and contact point for a valid grasp

  • minAngle (float) – [in] the minimum angle that is allowed in a valid grasp. [-Pi/2,Pi/2]

isValid(*args)

Overload 1:

tests if a grasp grasp is valid in regard to the settings of this clearance filter. :type grasp: Grasp3D :param grasp: :rtype: boolean :return:


Overload 2:

property thisown

The membership flag

class sdurw_graspplanning.sdurw_graspplanning.SemiForceClosureFilter(nrContacts)

Bases: GraspValidateFilter

A conservative estimate of the force closure properties of the grasp are used to indicate weather a grasp is valid or not.

The method is described in “Grasping the Dice by Dicing the Grasp”

__init__(nrContacts)
isValid(grasp)

tests if a grasp grasp is valid in regard to the criterias of the class that implements this function. :type grasp: Grasp3D :param grasp: :rtype: boolean :return:

property thisown

The membership flag