sdurw_proximity module
- class sdurw_proximity.sdurw_proximity.BasicFilterStrategy(*args)
Bases:
ProximityFilterStrategy
a simple rule based broadphase filter strategy. A static frame pair list of frame pairs that is to be checked for collision is maintained. The list is static in the sense that it is not optimized to be changed. However the user can both add and remove new geometries and rules.
Notes: The framepair list is explicitly kept in this class which makes this broadphase strategy infeasible for workcells with many objects. Consider a workcell with 100 objects, this will in worst case make a list of 10000 framepairs.
- __init__(*args)
Overload 1:
constructor - the ProximitySetup will be extracted from the workcell description if possible.
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell.
Overload 2:
constructor - constructs frame pairs based on the setup :type workcell: rw::core::Ptr< rw::models::WorkCell > :param workcell: [in] the workcell :type setup:
ProximitySetup
:param setup: [in] the ProximitySetup describing exclude/include relations
- addGeometry(frame, arg3)
Adds geometry associated to frame :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame which has the geometry associated
- addRule(rule)
Adds a ProximitySetupRule :type rule:
ProximitySetupRule
:param rule: [in] the rule to add.
- createProximityCache()
creates a FilterData object. This is used for caching relavant data between calls to update
- Return type
rw::core::Ptr< rw::proximity::ProximityCache >
- Returns
- getProximitySetup()
get the proximity setup that describe the include/exclude rules of this BroadPhaseStrategy :rtype:
ProximitySetup
:return: a reference to the ProximitySetup
- removeGeometry(*args)
Overload 1:
Removes the geometric model geo associated with Frame frame from this strategy.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame which has the geometry associated
Overload 2:
Removes the geometric model geo associated with Frame frame from this strategy.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame which has the geometry associated
geometryId (string) – [in] Geometry
- removeRule(rule)
Removes a ProximitySetupRule If the rule cannot be found, then noting happens. :type rule:
ProximitySetupRule
:param rule: [in] the rule to remove.
- reset(state)
Reset :type state:
State
:param state: [in] the state.
- property thisown
The membership flag
- update(*args)
Overload 1:
Overload 2:
- class sdurw_proximity.sdurw_proximity.CollisionDetector(*args)
Bases:
ProximityCalculatorCollision
The CollisionDetector implements an efficient way of checking a complete frame tree for collisions.
It relies on a BroadPhaseDetector to do initial filtering which removes obviously not colliding frame pairs.
After the filtering the remaining frame pairs are tested for collision using an CollisionStrategy which is a narrow phase collision detector.
The collision detector does not dictate a specific detection strategy or algorithm, instead it relies on the CollisionStrategy interface for the actual collision checking between two frames.
Notes: The collision detector is not thread safe and as such should not be used by multiple threads at a time.
- AllContactsFullInfo = 0
find all collisions and return full collision information eg. CollisionStrategy::AllContact
- AllContactsNoInfo = 1
find all collisions but without collision information eg. CollisionStrategy::FirstContact
- FirstContactFullInfo = 2
return on first contact and include full collision information eg. CollisionStrategy::AllContact
- FirstContactNoInfo = 3
return on first collision but without collision information eg. CollisionStrategy::FirstContact
- __init__(*args)
Overload 1:
Collision detector for a workcell with only broad-phase collision checking.
The default collision setup stored in the workcell is used for broad phase collision filtering as a static filter list.
Notice that no narrow phase checking is performed. If broad-phase filter returns any frame-pairs, this will be taken as a collision.
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell.
Overload 2:
Collision detector for a workcell.
The collision detector is initialized with the strategy . Notice that the collision detector will create and store models inside the strategy .
The default collision setup stored in the workcell is used for broad phase collision filtering as a static filter list.
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell.
strategy (rw::core::Ptr< rw::proximity::CollisionStrategy >) – [in/out] the strategy for narrow-phase checking. The strategy will have models added to it.
Overload 3:
Collision detector for a workcell. Collision checking is done for the provided collision setup alone.
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell.
strategy (rw::core::Ptr< rw::proximity::CollisionStrategy >) – [in/out] the strategy for narrow-phase checking. The strategy will have models added to it.
filter (rw::core::Ptr< rw::proximity::ProximityFilterStrategy >) – [in] proximity filter used to cull or filter frame-pairs that are obviously not colliding
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- getCollisionStrategy()
Get the narrow-phase collision strategy. :rtype: rw::core::Ptr< rw::proximity::CollisionStrategy > :return: the strategy if set, otherwise NULL.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- inCollision(*args)
Overload 1:
Check the workcell for collisions.
- Parameters
state (
State
) – [in] The state for which to check for collisions.result (
QueryResult
, optional) – [out] If non-NULL, the pairs of colliding frames are inserted in result.stopAtFirstContact (boolean, optional) – [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 2:
Check the workcell for collisions. :type state:
State
:param state: [in] The state for which to check for collisions. :type data:ProximityData
:param data: [in/out] Defines parameters for the collision check, the results and alsoenables caching inbetween calls to incollision
- rtype
boolean
- return
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< rw::kinematics::Frame *,rw::kinematics::Frame * > >) – [out] Where to store pairs of colliding frames.
stopAtFirstContact (boolean, optional) – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.
- Return type
boolean
- Returns
true if a collision is detected; false otherwise.
Overload 4:
Check the workcell for collisions.
- Parameters
state (
State
) – [in] The state for which to check for collisions.result (std::vector< std::pair< rw::kinematics::Frame *,rw::kinematics::Frame * > >) – [out] Where to store pairs of colliding frames.
stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.
- Return type
boolean
- Returns
true if a collision is detected; false otherwise.
- static make(workcell, strategy)
- removeGeometry(*args)
Overload 1:
Removes geometry from CollisionDetector
The id of the geometry is used to match the collision model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from CollisionDetector
The geometryId is used to match the collision model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionDetectorCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getCollisionStrategy()
Get the narrow-phase collision strategy. :rtype: rw::core::Ptr< rw::proximity::CollisionStrategy > :return: the strategy if set, otherwise NULL.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionDetectorPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- cptr()
- deref()
The pointer stored in the object.
- getCollisionStrategy()
Get the narrow-phase collision strategy. :rtype: rw::core::Ptr< rw::proximity::CollisionStrategy > :return: the strategy if set, otherwise NULL.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- inCollision(*args)
Overload 1:
Check the workcell for collisions.
- Parameters
state (
State
) – [in] The state for which to check for collisions.result (
QueryResult
, optional) – [out] If non-NULL, the pairs of colliding frames are inserted in result.stopAtFirstContact (boolean, optional) – [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 2:
Check the workcell for collisions. :type state:
State
:param state: [in] The state for which to check for collisions. :type data:ProximityData
:param data: [in/out] Defines parameters for the collision check, the results and alsoenables caching inbetween calls to incollision
- rtype
boolean
- return
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< rw::kinematics::Frame *,rw::kinematics::Frame * > >) – [out] Where to store pairs of colliding frames.
stopAtFirstContact (boolean, optional) – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.
- Return type
boolean
- Returns
true if a collision is detected; false otherwise.
Overload 4:
Check the workcell for collisions.
- Parameters
state (
State
) – [in] The state for which to check for collisions.result (std::vector< std::pair< rw::kinematics::Frame *,rw::kinematics::Frame * > >) – [out] Where to store pairs of colliding frames.
stopAtFirstContact – [in] If result is non-NULL and stopAtFirstContact is true, then only the first colliding pair is inserted in result. By default all colliding pairs are inserted.
- Return type
boolean
- Returns
true if a collision is detected; false otherwise.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- make(workcell, strategy)
- removeGeometry(*args)
Overload 1:
Removes geometry from CollisionDetector
The id of the geometry is used to match the collision model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from CollisionDetector
The geometryId is used to match the collision model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionDetectorQueryResult
Bases:
object
result of a collision query
- __init__()
- property collidingFrames
the frames that are colliding
- getFramePairVector()
convert the framePair set to FramePairVector :rtype: std::vector< std::pair< rw::kinematics::Frame *,rw::kinematics::Frame * > > :return: collidingFrames as frame pair vector
- getFullInfo(*args)
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.CollisionDetector_make(workcell, strategy)
- class sdurw_proximity.sdurw_proximity.CollisionPair(*args)
Bases:
object
a collision pair of
- __init__(*args)
Overload 1: Default constructor
Overload 2: Copy Constructor
- property geoIdxA
geometry index
- property geoIdxB
- property size
- property startIdx
indices into the geomPrimIds array, which means that inidicies
[_geomPrimIds[startIdx];_geomPrimIds[startIdx+size]] are the colliding primitives between geometries geoIdxA and geoIdxB
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionPairVector(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_proximity.sdurw_proximity.CollisionResult
Bases:
object
result of a single collision pair
A collision result is one or all colliding triangles between two objects which may have several geometries attached. The collision result does not have access to the actual triangle meshes of the geometries so to extract the actual contact location the user has to supply the triangles meshes of the geometries himself.
- __init__()
- property a
reference to the first model
- property b
reference to the second model
- clear()
clear all result values
- getNrBVTests()
- getNrPrimTests()
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionSetup(*args)
Bases:
object
Setup for the collision checker
The CollisionSetup contains information about which frames, not be checked against each other
- __init__(*args)
Overload 1:
Default constructor for when no excludes are described
Overload 2:
Constructs CollisionSetup with list of exclusions
- type exclude
std::vector< std::pair< std::string,std::string > >
- param exclude
[in] pairs to be excluded
Overload 3:
CollisionSetup for a list of pairs to exclude and a sequence of volatile frames. :type exclude: rw::core::StringPairList :param exclude: [in] pairs to be excluded :type volatileFrames: std::set< std::string > :param volatileFrames: [in] names of frames to treat as volatile. :type excludeStaticPairs: boolean :param excludeStaticPairs: [in] if true exclude statically related pairs.
Overload 4:
CollisionSetup for a list of pairs to exclude and a sequence of volatile frames. :type exclude: rw::core::StringPairList :param exclude: [in] pairs to be excluded :type volatileFrames: std::vector< std::string > :param volatileFrames: [in] names of frames to treat as volatile. :type excludeStaticPairs: boolean :param excludeStaticPairs: [in] if true exclude statically related pairs.
- addExcludePair(pair)
- excludeStaticPairs()
True iff all statically related pairs of frames should be excluded.
Note that this will exclude also statically related pairs of frames for which one or both of the pairs are volatile.
- static get(*args)
- getExcludeList()
Returns the exclude list :rtype: rw::core::StringPairList :return: the exclude list
- isVolatile(frame)
True iff the collision setup for the frame can change over time.
- merge(b)
Combine setup of this and setup of b into this collision setup.
- removeExcludePair(pair)
- static set(*args)
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.CollisionSetup_get(*args)
- sdurw_proximity.sdurw_proximity.CollisionSetup_set(*args)
- class sdurw_proximity.sdurw_proximity.CollisionStrategy(*args, **kwargs)
Bases:
ProximityStrategy
An interface that defines methods to test collision between two objects.
- AllContacts = 1
- FirstContact = 0
- __init__(*args, **kwargs)
- getCollisionContacts(contacts, data)
this method interprets the collision query result and calculates a list of contacts to represent the collision geometry between the colliding geometries.
Please note that for most collisions a single point and normal is not sufficient to describe the complete collision area. However, it is typically a reasonable approximation. The approximation can hence be implementation specific. :type contacts: std::vector< rw::proximity::CollisionStrategy::Contact > :param contacts: [out] list of contacts that can be calculated from data :type data:
ProximityStrategyData
:param data: [in] the result from the collision query
- inCollision(*args)
Overload 1:
Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type type: int, optional :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are
colliding, false otherwise.
Overload 2:
Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: [in/out] caching and result container :type type: int, optional :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) arecolliding, false otherwise.
Overload 3:
Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: [in/out] caching and result container :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) arecolliding, false otherwise.
Overload 4:
Checks to see if two proximity models are in collision :type a:
Ptr
:param a: [in] model 1 :type wTa: rw::math::Transform3D< double > :param wTa: [in] transform of model a :type b:Ptr
:param b: [in] model 2 :type wTb: rw::math::Transform3D< double > :param wTb: [in] transform of model b :type data:ProximityStrategyData
:param data: [in/out] caching and result container :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) arecolliding, false otherwise.
- static make(*args)
Overload 1:
A collision strategy constructed from a collision tolerance strategy and a resolution.
The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.
Overload 2:
A collision strategy constructed from a collision tolerance strategy and a resolution.
The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionStrategyCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionStrategyFactory
Bases:
ExtensionPointCollisionStrategy
A factory for a CollisionStrategy. This factory also defines an ExtensionPoint.
Extensions providing a CollisionStrategy implementation can extend this factory by registering the extension using the id “rw.proximity.CollisionStrategy”.
- Typically one or more of the following CollisionStrategy types will be available:
RW - rw::proximity::ProximityStrategyRW - Internal RobWork proximity strategy
Bullet - rwlibs::proximitystrategies::ProximityStrategyBullet - Bullet Physics
PQP - rwlibs::proximitystrategies::ProximityStrategyPQP - Proximity Query Package
FCL - rwlibs::proximitystrategies::ProximityStrategyFCL - Flexible Collision Library
Yaobi - rwlibs::proximitystrategies::ProximityStrategyYaobi - Yaobi
- __init__()
Constructor.
- static getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- static hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- static makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new CollisionStrategy.
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.CollisionStrategyFactory_getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- sdurw_proximity.sdurw_proximity.CollisionStrategyFactory_hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- sdurw_proximity.sdurw_proximity.CollisionStrategyFactory_makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new CollisionStrategy.
- class sdurw_proximity.sdurw_proximity.CollisionStrategyPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(*args)
Overload 1:
adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model:
ProximityModel
:param model: [in] the proximity model to add data to :type geom:Geometry
:param geom: [in] the geometry that is to be addedOverload 2:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :type forceCopy: boolean, optional :param forceCopy: :rtype: boolean :return:Overload 3:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :param forceCopy: :rtype: boolean :return:
- addModel(*args)
Overload 1:
Adds a Proximity model of a frame to this strategy.
The Proximity model is the one specified in the frames property
- Parameters
object (rw::core::Ptr< rw::models::Object >) – [in] the frame on which the Proximity model is to be created.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 2:
Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (
Geometry
) – [in] list of faces from which to construct the Proximity model
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 3:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy (boolean, optional) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 4:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
- clear()
Clears any stored model information
- clearFrame(frame)
Clear (remove all) model information for frame frame.
- clearFrames()
Clear (remove all) model information for all frames.
- cptr()
- createModel()
creates an empty ProximityModel
- deref()
The pointer stored in the object.
- destroyModel(model)
deallocates the memory used for model :type model:
ProximityModel
:param model:
- getCollisionContacts(contacts, data)
this method interprets the collision query result and calculates a list of contacts to represent the collision geometry between the colliding geometries.
Please note that for most collisions a single point and normal is not sufficient to describe the complete collision area. However, it is typically a reasonable approximation. The approximation can hence be implementation specific. :type contacts: std::vector< rw::proximity::CollisionStrategy::Contact > :param contacts: [out] list of contacts that can be calculated from data :type data:
ProximityStrategyData
:param data: [in] the result from the collision query
- getDeref()
Member access operator.
- getGeometries(model)
the list of all geometry that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: all geometry associated to the proximity model
- getGeometryIDs(model)
the list of all geometry ids that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< std::string > :return: all geometry ids associated to the proximity model
- getModel(frame)
get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame for which an proximitymodel is associated
- hasModel(frame)
Tells whether the frame has a proximity model in the strategy
To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to check for1.0/
- Return type
boolean
- Returns
true if a model exists or can be created
- inCollision(*args)
Overload 1:
Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type type: int, optional :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are
colliding, false otherwise.
Overload 2:
Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: [in/out] caching and result container :type type: int, optional :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) arecolliding, false otherwise.
Overload 3:
Checks to see if two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are in collision :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: [in/out] caching and result container :param type: [in] collision query type :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) arecolliding, false otherwise.
Overload 4:
Checks to see if two proximity models are in collision :type a:
Ptr
:param a: [in] model 1 :type wTa: rw::math::Transform3D< double > :param wTa: [in] transform of model a :type b:Ptr
:param b: [in] model 2 :type wTb: rw::math::Transform3D< double > :param wTb: [in] transform of model b :type data:ProximityStrategyData
:param data: [in/out] caching and result container :rtype: boolean :return: true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) arecolliding, false otherwise.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- make(*args)
Overload 1:
A collision strategy constructed from a collision tolerance strategy and a resolution.
The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.
Overload 2:
A collision strategy constructed from a collision tolerance strategy and a resolution.
The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.
- removeGeometry(model, geomId)
removes a geometry from a specific proximity model
- property thisown
The membership flag
- useThreads(threads)
setNumber of threads the strategy may use :type threads: int :param threads: [in] number of threads. if Threads <= 0 then maximum threads available Notes: this does not enforce the use of threads in the algorithms but mearly allows for the use.
- sdurw_proximity.sdurw_proximity.CollisionStrategy_make(*args)
Overload 1:
A collision strategy constructed from a collision tolerance strategy and a resolution.
The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.
Overload 2:
A collision strategy constructed from a collision tolerance strategy and a resolution.
The constructed collision strategy considers a pair of geometries to be in collision if strategy claim they are in collision for a tolerance of tolerance.
- class sdurw_proximity.sdurw_proximity.CollisionToleranceStrategy(*args, **kwargs)
Bases:
ProximityStrategy
This is a collision strategy that detects collisions between objects that are closer than a specified tolerance.
- __init__(*args, **kwargs)
- isWithinDistance(*args)
Overload 1:
Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between them
that is less than tolerance are in collision
- Return type
boolean
- Returns
true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.
Overload 2:
Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: :type distance: float :param distance:- Return type
boolean
- Returns
true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.
Overload 3:
Checks to see if two proximity models \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a:
Ptr
:param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b:Ptr
:param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between themthat is less than tolerance are in collision
- Parameters
data (
ProximityStrategyData
) –- Return type
boolean
- Returns
true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionToleranceStrategyCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.CollisionToleranceStrategyFactory(*args, **kwargs)
Bases:
ExtensionPointCollisionToleranceStrategy
A factory for a CollisionToleranceStrategy. This factory also defines an ExtensionPoint.
Extensions providing a CollisionToleranceStrategy implementation can extend this factory by registering the extension using the id “rw.proximity.CollisionToleranceStrategy”.
Typically one or more of the following CollisionToleranceStrategy types will be available:
Bullet - rwlibs::proximitystrategies::ProximityStrategyBullet - Bullet Physics
PQP - rwlibs::proximitystrategies::ProximityStrategyPQP - Proximity Query Package
- __init__(*args, **kwargs)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- static getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- static hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- static makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new CollisionToleranceStrategy.
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.CollisionToleranceStrategyFactory_getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- sdurw_proximity.sdurw_proximity.CollisionToleranceStrategyFactory_hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- sdurw_proximity.sdurw_proximity.CollisionToleranceStrategyFactory_makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new CollisionToleranceStrategy.
- class sdurw_proximity.sdurw_proximity.CollisionToleranceStrategyPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(*args)
Overload 1:
adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model:
ProximityModel
:param model: [in] the proximity model to add data to :type geom:Geometry
:param geom: [in] the geometry that is to be addedOverload 2:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :type forceCopy: boolean, optional :param forceCopy: :rtype: boolean :return:Overload 3:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :param forceCopy: :rtype: boolean :return:
- addModel(*args)
Overload 1:
Adds a Proximity model of a frame to this strategy.
The Proximity model is the one specified in the frames property
- Parameters
object (rw::core::Ptr< rw::models::Object >) – [in] the frame on which the Proximity model is to be created.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 2:
Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (
Geometry
) – [in] list of faces from which to construct the Proximity model
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 3:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy (boolean, optional) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 4:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
- clear()
Clears any stored model information
- clearFrame(frame)
Clear (remove all) model information for frame frame.
- clearFrames()
Clear (remove all) model information for all frames.
- cptr()
- createModel()
creates an empty ProximityModel
- deref()
The pointer stored in the object.
- destroyModel(model)
deallocates the memory used for model :type model:
ProximityModel
:param model:
- getDeref()
Member access operator.
- getGeometries(model)
the list of all geometry that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: all geometry associated to the proximity model
- getGeometryIDs(model)
the list of all geometry ids that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< std::string > :return: all geometry ids associated to the proximity model
- getModel(frame)
get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame for which an proximitymodel is associated
- hasModel(frame)
Tells whether the frame has a proximity model in the strategy
To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to check for1.0/
- Return type
boolean
- Returns
true if a model exists or can be created
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- isWithinDistance(*args)
Overload 1:
Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between them
that is less than tolerance are in collision
- Return type
boolean
- Returns
true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.
Overload 2:
Checks to see if the geometry attached to two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: :type distance: float :param distance:- Return type
boolean
- Returns
true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.
Overload 3:
Checks to see if two proximity models \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are closer than the specified tolerance. Result is cached in data :type a:
Ptr
:param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b:Ptr
:param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] frames with a distance in between themthat is less than tolerance are in collision
- Parameters
data (
ProximityStrategyData
) –- Return type
boolean
- Returns
true if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are colliding, false otherwise.
- removeGeometry(model, geomId)
removes a geometry from a specific proximity model
- property thisown
The membership flag
- useThreads(threads)
setNumber of threads the strategy may use :type threads: int :param threads: [in] number of threads. if Threads <= 0 then maximum threads available Notes: this does not enforce the use of threads in the algorithms but mearly allows for the use.
- class sdurw_proximity.sdurw_proximity.Contact
Bases:
object
describes a simple collision contact data structure
- __init__()
- property normalA
- property normalB
- property point
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceCalculator(*args)
Bases:
object
The DistanceCalculator implements an efficient way of calculating different distances between two objects, each represented by a frame
A list of frame pairs is contained within the distance calculater, that specifies which frames are to be checked against each other. The method of used for distance calculation relies on the DistanceStrategy chosen.
The DistanceCalculator supports switching between multiple strategies
- __init__(*args)
Overload 1:
Distance calculations for a given tree, collision setup and primitive distance calculator. Uses proximity strategy given by the workcell.
strategy must be non-NULL.
root must be non-NULL.
Ownership of root is not taken.
- Parameters
root (rw::core::Ptr< rw::kinematics::Frame >) – [in] - the root of the Frame tree.
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] - the workcell to do the distance calculations in.
strategy (rw::core::Ptr< rw::proximity::DistanceStrategy >) – [in] - the primitive strategy of distance calculations.
initial_state (
State
) – [in] - the work cell state to use for the initial traversal of the tree.
Overload 2:
Construct distance calculator for a WorkCell with an associated distance calculator strategy.
The DistanceCalculator extracts information about the tree and the CollisionSetup from workcell.
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell to check
strategy (rw::core::Ptr< rw::proximity::DistanceStrategy >) – [in] the distance calculation strategy to use
Overload 3:
Constructs distance calculator for a selected set of frames
The list pairs specifies which frame-pairs to be used for distance checking.
strategy must be non-NULL.
Ownership of root is not taken.
- Parameters
pairs (rw::kinematics::FramePairList) – [in] Pairs of frame to check
strategy (rw::core::Ptr< rw::proximity::DistanceStrategy >) – [in] the distance calculation strategy to use
- addDistanceModel(frame, faces)
Adds distance model to frame
The distance model is constructed based on the list of faces given.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] frame to which the distance model should associate
faces (
Geometry
) – [in] list of faces from which to construct the model
- Return type
boolean
- Returns
true if a distance model was succesfully created and linked with the frame; false otherwise.
- clearCache()
Clears the cache of the distance models
- distance(*args)
Overload 1:
Calculates the distances between frames in the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.result (std::vector< rw::proximity::DistanceStrategy::Result >, optional) – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
Overload 2:
Calculates the distance between frame and the rest of the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame for which distances are to be calculated
result (std::vector< rw::proximity::DistanceStrategy::Result >, optional) – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
Overload 3:
Calculates the distance between frame and the rest of the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame for which distances are to be calculated
result – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
- distanceOMP(state, result=None)
- getComputationTime()
- getCount()
- resetComputationTimeAndCount()
- setDistanceStrategy(strategy)
Set the primitive distance calculator to strategy.
strategy must be non-NULL.
Ownership of the strategy is not taken.
- Parameters
strategy (rw::core::Ptr< rw::proximity::DistanceStrategy >) – [in] - the primitive distance calculator to use.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceCalculatorCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- distance(*args)
Overload 1:
Calculates the distances between frames in the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.result (std::vector< rw::proximity::DistanceStrategy::Result >, optional) – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
Overload 2:
Calculates the distance between frame and the rest of the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame for which distances are to be calculated
result (std::vector< rw::proximity::DistanceStrategy::Result >, optional) – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
Overload 3:
Calculates the distance between frame and the rest of the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame for which distances are to be calculated
result – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
- distanceOMP(state, result=None)
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceCalculatorPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addDistanceModel(frame, faces)
Adds distance model to frame
The distance model is constructed based on the list of faces given.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] frame to which the distance model should associate
faces (
Geometry
) – [in] list of faces from which to construct the model
- Return type
boolean
- Returns
true if a distance model was succesfully created and linked with the frame; false otherwise.
- clearCache()
Clears the cache of the distance models
- cptr()
- deref()
The pointer stored in the object.
- distance(*args)
Overload 1:
Calculates the distances between frames in the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.result (std::vector< rw::proximity::DistanceStrategy::Result >, optional) – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
Overload 2:
Calculates the distance between frame and the rest of the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame for which distances are to be calculated
result (std::vector< rw::proximity::DistanceStrategy::Result >, optional) – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
Overload 3:
Calculates the distance between frame and the rest of the tree
- Parameters
state (
State
) – [in] The state for which to calculate distances.frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame for which distances are to be calculated
result – [out] If non-NULL, the distance results are written to result.
- Return type
Result
- Returns
the shortest distance between frame and frame tree
- distanceOMP(state, result=None)
- getComputationTime()
- getCount()
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- resetComputationTimeAndCount()
- setDistanceStrategy(strategy)
Set the primitive distance calculator to strategy.
strategy must be non-NULL.
Ownership of the strategy is not taken.
- Parameters
strategy (rw::core::Ptr< rw::proximity::DistanceStrategy >) – [in] - the primitive distance calculator to use.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceMultiCalculator(*args)
Bases:
object
The Proximity calculator implements an efficient and standardized way of using the following proximity strategies:
CollisionStrategy DistanceStrategy MultiDistanceStrategy
The Calculate function is designed to fit the chosen strategy individually implementing a fitting aproach for calculating the respective proximity.
The CollisionDetector It relies on a BroadPhaseDetector to do initial filtering which removes obviously not colliding frame pairs.
After the filtering the remaining frame pairs are tested for collision using an CollisionStrategy which is a narrow phase collision detector.
The Proximity calculator does not dictate a specific detection strategy or algorithm, instead it relies on the CollisionStrategy interface for the actual collision checking between two frames.
Distance and MultiDistance Calculator A list of frame pairs is contained within the Proximity calculator, that specifies which frames are to be checked against each other. The method of used for distance calculation relies on the DistanceStrategy chosen.
- __init__(*args)
Overload 1:
Proximity calculations for a given tree, collision setup and primitive Proximity calculator. Uses proximity strategy given by the workcell. :type root: rw::core::Ptr< rw::kinematics::Frame > :param root: [in] - the root of the Frame tree. must be non-NULL. No ownership of the
pointer is taken
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] - the workcell to do the proximity calculations in.
strategy (rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy >) – [in] - the primitive strategy of proximity calculations. must be non-NULL.
initial_state (
State
) – [in] - the work cell state to use for the initial traversal of the tree.
Overload 2:
- Construct proximity calculator for a WorkCell with an associated
proximity strategy.
The ProximityCalculator extracts information about the tree and the CollisionSetup from workcell.
The ProximityCalculator is initialized with the strategy . Notice that the ProximityCalculator will create and store models inside the strategy .
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell to check
strategy (rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy >) – [in] the ProximityStrategy to use
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- Return type
boolean
- Returns
true if succesful, otherwise false
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- removeGeometry(*args)
Overload 1:
Removes geometry from ProximityCalculator
The id of the geometry is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from ProximityCalculator
The geometryId is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceMultiStrategy(*args, **kwargs)
Bases:
ProximityStrategy
This interface allows the definition of computing all points between two geometric objects that are closer than a specified tolerance. See ProxmityStrategy on how to add geometry to the strategy.
- __init__(*args, **kwargs)
- distances(*args)
Overload 1:
Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will
be included in the result.
- Return type
Result
- Returns
shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.
Overload 2:
Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will be included in the
result.
- Parameters
data (
ProximityStrategyData
) –- Return type
Result
- Returns
shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.
Overload 3:
- getSurfaceNormals(res, idx)
Get the Surface Normals
- Parameters
res (
Result
) – the result to get the normals fromidx (int) –
- Return type
std::pair< rw::math::Vector3D< double >,rw::math::Vector3D< double > >
- Returns
std::pair<rw::math::Vector3D<>, rw::math::Vector3D<>>
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceMultiStrategyCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceMultiStrategyFactory(*args, **kwargs)
Bases:
ExtensionPointDistanceMultiStrategy
A factory for a DistanceMultiStrategy. This factory also defines an ExtensionPoint.
Extensions providing a DistanceMultiStrategy implementation can extend this factory by registering the extension using the id “rw.proximity.DistanceMultiStrategy”.
- Typically one or more of the following DistanceMultiStrategy types will be available:
Bullet - rwlibs::proximitystrategies::ProximityStrategyBullet - Bullet Physics
PQP - rwlibs::proximitystrategies::ProximityStrategyPQP - Proximity Query Package
- __init__(*args, **kwargs)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- static getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- static hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- static makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new DistanceMultiStrategy.
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.DistanceMultiStrategyFactory_getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- sdurw_proximity.sdurw_proximity.DistanceMultiStrategyFactory_hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- sdurw_proximity.sdurw_proximity.DistanceMultiStrategyFactory_makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new DistanceMultiStrategy.
- class sdurw_proximity.sdurw_proximity.DistanceMultiStrategyPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(*args)
Overload 1:
adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model:
ProximityModel
:param model: [in] the proximity model to add data to :type geom:Geometry
:param geom: [in] the geometry that is to be addedOverload 2:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :type forceCopy: boolean, optional :param forceCopy: :rtype: boolean :return:Overload 3:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :param forceCopy: :rtype: boolean :return:
- addModel(*args)
Overload 1:
Adds a Proximity model of a frame to this strategy.
The Proximity model is the one specified in the frames property
- Parameters
object (rw::core::Ptr< rw::models::Object >) – [in] the frame on which the Proximity model is to be created.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 2:
Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (
Geometry
) – [in] list of faces from which to construct the Proximity model
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 3:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy (boolean, optional) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 4:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
- clear()
Clears any stored model information
- clearFrame(frame)
Clear (remove all) model information for frame frame.
- clearFrames()
Clear (remove all) model information for all frames.
- cptr()
- createModel()
creates an empty ProximityModel
- deref()
The pointer stored in the object.
- destroyModel(model)
deallocates the memory used for model :type model:
ProximityModel
:param model:
- distances(*args)
Overload 1:
Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will
be included in the result.
- Return type
Result
- Returns
shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.
Overload 2:
Calculates all distances between geometry of two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type tolerance: float :param tolerance: [in] point pairs that are closer than tolerance will be included in the
result.
- Parameters
data (
ProximityStrategyData
) –- Return type
Result
- Returns
shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) are separated and not in collision.
Overload 3:
- getDeref()
Member access operator.
- getGeometries(model)
the list of all geometry that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: all geometry associated to the proximity model
- getGeometryIDs(model)
the list of all geometry ids that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< std::string > :return: all geometry ids associated to the proximity model
- getModel(frame)
get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame for which an proximitymodel is associated
- getSurfaceNormals(res, idx)
Get the Surface Normals
- Parameters
res (
Result
) – the result to get the normals fromidx (int) –
- Return type
std::pair< rw::math::Vector3D< double >,rw::math::Vector3D< double > >
- Returns
std::pair<rw::math::Vector3D<>, rw::math::Vector3D<>>
- hasModel(frame)
Tells whether the frame has a proximity model in the strategy
To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to check for1.0/
- Return type
boolean
- Returns
true if a model exists or can be created
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(model, geomId)
removes a geometry from a specific proximity model
- property thisown
The membership flag
- useThreads(threads)
setNumber of threads the strategy may use :type threads: int :param threads: [in] number of threads. if Threads <= 0 then maximum threads available Notes: this does not enforce the use of threads in the algorithms but mearly allows for the use.
- class sdurw_proximity.sdurw_proximity.DistanceMultiStrategyResult
Bases:
object
DistanceResult contains basic information about the distance result between two frames.
- __init__()
- property a
reference to the first proximity model
- property b
reference to the second proximity model
- clear()
- property distance
distance between frame f1 and frame f2
- property distances
distances between contact points
- property geoIdxA
geometry index to geometry in object A
- property geoIdxB
geometry index to geometry in object B
- property p1
Closest point on f1 to f2, described in world reference frame
- property p1prims
indices to the primitives which are the closest points on the first proximity model
- property p1s
Closest points on f1 to f2, described in world reference frame
- property p2
Closest point on f2 to f1, described in world reference frame
- property p2prims
indices to the primitives which are the closest points on the second proximity model
- property p2s
Closest point on f2 to f1, described in world reference frame
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceMultiStrategyResultVector(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_proximity.sdurw_proximity.DistanceStrategy(*args, **kwargs)
Bases:
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)
- distance(*args)
Overload 1:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :rtype:
Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 2:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 3:
Calculates the distance between two proximity models \(\mathcal{a}\) and \(\mathcal{b}\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a:
Ptr
:param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b:Ptr
:param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 4:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :rtype:
Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 5:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data:
ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 6:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a:
Ptr
:param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b:Ptr
:param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data:ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceStrategyCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceStrategyFactory(*args, **kwargs)
Bases:
ExtensionPointDistanceStrategy
A factory for a DistanceStrategy. This factory also defines an ExtensionPoint.
Extensions providing a DistanceStrategy implementation can extend this factory by registering the extension using the id “rw.proximity.DistanceStrategy”.
- Typically one or more of the following DistanceStrategy types will be available:
RW - rw::proximity::ProximityStrategyRW - Internal RobWork proximity strategy
Bullet - rwlibs::proximitystrategies::ProximityStrategyBullet - Bullet Physics
PQP - rwlibs::proximitystrategies::ProximityStrategyPQP - Proximity Query Package
FCL - rwlibs::proximitystrategies::ProximityStrategyFCL - Flexible Collision Library
- __init__(*args, **kwargs)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- static getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- static hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- static makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new DistanceStrategy.
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.DistanceStrategyFactory_getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- sdurw_proximity.sdurw_proximity.DistanceStrategyFactory_hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- sdurw_proximity.sdurw_proximity.DistanceStrategyFactory_makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new DistanceStrategy.
- class sdurw_proximity.sdurw_proximity.DistanceStrategyPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(*args)
Overload 1:
adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model:
ProximityModel
:param model: [in] the proximity model to add data to :type geom:Geometry
:param geom: [in] the geometry that is to be addedOverload 2:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :type forceCopy: boolean, optional :param forceCopy: :rtype: boolean :return:Overload 3:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :param forceCopy: :rtype: boolean :return:
- addModel(*args)
Overload 1:
Adds a Proximity model of a frame to this strategy.
The Proximity model is the one specified in the frames property
- Parameters
object (rw::core::Ptr< rw::models::Object >) – [in] the frame on which the Proximity model is to be created.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 2:
Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (
Geometry
) – [in] list of faces from which to construct the Proximity model
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 3:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy (boolean, optional) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 4:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
- clear()
Clears any stored model information
- clearFrame(frame)
Clear (remove all) model information for frame frame.
- clearFrames()
Clear (remove all) model information for all frames.
- cptr()
- createModel()
creates an empty ProximityModel
- deref()
The pointer stored in the object.
- destroyModel(model)
deallocates the memory used for model :type model:
ProximityModel
:param model:
- distance(*args)
Overload 1:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :rtype:
Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 2:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:
ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 3:
Calculates the distance between two proximity models \(\mathcal{a}\) and \(\mathcal{b}\) Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a:
Ptr
:param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b:Ptr
:param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type data:ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 4:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :rtype:
Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 5:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. :type a: rw::core::Ptr< rw::kinematics::Frame > :param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b: rw::core::Ptr< rw::kinematics::Frame > :param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data:
ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
Overload 6:
Calculates the distance between two given frames \(\mathcal{F}_a\) and \(\mathcal{F}_b\) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. Conditional comment: :param result: [out] DistanceResult to copy result into End of conditional comment. :type a:
Ptr
:param a: [in] \(\mathcal{F}_a\) :type wTa: rw::math::Transform3D< double > :param wTa: [in] \(\robabx{w}{a}{\mathbf{T}}\) :type b:Ptr
:param b: [in] \(\mathcal{F}_b\) :type wTb: rw::math::Transform3D< double > :param wTb: [in] \(\robabx{w}{b}{\mathbf{T}}\) :type threshold: float :param threshold: [in] threshold for distance calculations :type data:ProximityStrategyData
:param data: :rtype:Result
:return: shortest distance if \(\mathcal{F}_a\) and \(\mathcal{F}_b\) areseparated and not in collision.
- getDeref()
Member access operator.
- getGeometries(model)
the list of all geometry that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: all geometry associated to the proximity model
- getGeometryIDs(model)
the list of all geometry ids that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< std::string > :return: all geometry ids associated to the proximity model
- getModel(frame)
get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame for which an proximitymodel is associated
- hasModel(frame)
Tells whether the frame has a proximity model in the strategy
To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to check for1.0/
- Return type
boolean
- Returns
true if a model exists or can be created
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(model, geomId)
removes a geometry from a specific proximity model
- property thisown
The membership flag
- useThreads(threads)
setNumber of threads the strategy may use :type threads: int :param threads: [in] number of threads. if Threads <= 0 then maximum threads available Notes: this does not enforce the use of threads in the algorithms but mearly allows for the use.
- class sdurw_proximity.sdurw_proximity.DistanceStrategyResult
Bases:
object
DistanceResult contains basic information about the distance result between two sets of geometries. These geometry sets
- __init__()
- property a
pointer to the ProximityModel containing the geometries for the first frame
- property b
pointer to the ProximityModel containing the geometries for the second frame
- clear()
- property distance
distance between frame f1 and frame f1
- property f1
reference to the first frame
- property f2
reference to the second frame
- property geoIdxA
geometry index to triangle mesh A
- property geoIdxB
geometry index to triangle mesh B
- property idx1
index to the first face/triangle that is the closest feature
- property idx2
index to the second face/triangle that is the closest feature
- property p1
Closest point on f1 to f2, described in world reference frame
- property p2
Closest point on f2 to f1, described in world reference frame
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.DistanceStrategyResultVector(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_proximity.sdurw_proximity.ExtensionPointCollisionStrategy(id, name, plugin=None)
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__(id, name, plugin=None)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- getExtensionDescriptors()
get all extension descriptions of this extension point
- getExtensions()
get all extensions of this extension point
- getId()
get unique identifier of this extensionpoint
- getName()
get human readable name of this extension point
- getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ExtensionPointCollisionToleranceStrategy(id, name, plugin=None)
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__(id, name, plugin=None)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- getExtensionDescriptors()
get all extension descriptions of this extension point
- getExtensions()
get all extensions of this extension point
- getId()
get unique identifier of this extensionpoint
- getName()
get human readable name of this extension point
- getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ExtensionPointDistanceMultiStrategy(id, name, plugin=None)
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__(id, name, plugin=None)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- getExtensionDescriptors()
get all extension descriptions of this extension point
- getExtensions()
get all extensions of this extension point
- getId()
get unique identifier of this extensionpoint
- getName()
get human readable name of this extension point
- getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ExtensionPointDistanceStrategy(id, name, plugin=None)
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__(id, name, plugin=None)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- getExtensionDescriptors()
get all extension descriptions of this extension point
- getExtensions()
get all extensions of this extension point
- getId()
get unique identifier of this extensionpoint
- getName()
get human readable name of this extension point
- getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ExtensionPointProximityStrategy(id, name, plugin=None)
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__(id, name, plugin=None)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- getExtensionDescriptors()
get all extension descriptions of this extension point
- getExtensions()
get all extensions of this extension point
- getId()
get unique identifier of this extensionpoint
- getName()
get human readable name of this extension point
- getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCache(*args, **kwargs)
Bases:
object
Interface for cache used by ProximityStrategy
- __init__(*args, **kwargs)
- clear()
Clears cache
- size()
Returns size of cache :rtype: int :return: size
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCacheCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- size()
Returns size of cache :rtype: int :return: size
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCachePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- clear()
Clears cache
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- size()
Returns size of cache :rtype: int :return: size
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorCollision(*args)
Bases:
object
The Proximity calculator implements an efficient and standardized way of using the following proximity strategies:
CollisionStrategy DistanceStrategy MultiDistanceStrategy
The Calculate function is designed to fit the chosen strategy individually implementing a fitting aproach for calculating the respective proximity.
The CollisionDetector It relies on a BroadPhaseDetector to do initial filtering which removes obviously not colliding frame pairs.
After the filtering the remaining frame pairs are tested for collision using an CollisionStrategy which is a narrow phase collision detector.
The Proximity calculator does not dictate a specific detection strategy or algorithm, instead it relies on the CollisionStrategy interface for the actual collision checking between two frames.
Distance and MultiDistance Calculator A list of frame pairs is contained within the Proximity calculator, that specifies which frames are to be checked against each other. The method of used for distance calculation relies on the DistanceStrategy chosen.
- __init__(*args)
Overload 1:
Proximity calculations for a given tree, collision setup and primitive Proximity calculator. Uses proximity strategy given by the workcell. :type root: rw::core::Ptr< rw::kinematics::Frame > :param root: [in] - the root of the Frame tree. must be non-NULL. No ownership of the
pointer is taken
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] - the workcell to do the proximity calculations in.
strategy (rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy >) – [in] - the primitive strategy of proximity calculations. must be non-NULL.
initial_state (
State
) – [in] - the work cell state to use for the initial traversal of the tree.
Overload 2:
- Construct proximity calculator for a WorkCell with an associated
proximity strategy.
The ProximityCalculator extracts information about the tree and the CollisionSetup from workcell.
The ProximityCalculator is initialized with the strategy . Notice that the ProximityCalculator will create and store models inside the strategy .
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell to check
strategy (rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy >) – [in] the ProximityStrategy to use
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- Return type
boolean
- Returns
true if succesful, otherwise false
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- removeGeometry(*args)
Overload 1:
Removes geometry from ProximityCalculator
The id of the geometry is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from ProximityCalculator
The geometryId is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorCollisionCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorCollisionPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- Return type
boolean
- Returns
true if succesful, otherwise false
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- cptr()
- deref()
The pointer stored in the object.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(*args)
Overload 1:
Removes geometry from ProximityCalculator
The id of the geometry is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from ProximityCalculator
The geometryId is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::CollisionStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorDistance(*args)
Bases:
object
The Proximity calculator implements an efficient and standardized way of using the following proximity strategies:
CollisionStrategy DistanceStrategy MultiDistanceStrategy
The Calculate function is designed to fit the chosen strategy individually implementing a fitting aproach for calculating the respective proximity.
The CollisionDetector It relies on a BroadPhaseDetector to do initial filtering which removes obviously not colliding frame pairs.
After the filtering the remaining frame pairs are tested for collision using an CollisionStrategy which is a narrow phase collision detector.
The Proximity calculator does not dictate a specific detection strategy or algorithm, instead it relies on the CollisionStrategy interface for the actual collision checking between two frames.
Distance and MultiDistance Calculator A list of frame pairs is contained within the Proximity calculator, that specifies which frames are to be checked against each other. The method of used for distance calculation relies on the DistanceStrategy chosen.
- __init__(*args)
Overload 1:
Proximity calculations for a given tree, collision setup and primitive Proximity calculator. Uses proximity strategy given by the workcell. :type root: rw::core::Ptr< rw::kinematics::Frame > :param root: [in] - the root of the Frame tree. must be non-NULL. No ownership of the
pointer is taken
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] - the workcell to do the proximity calculations in.
strategy (rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy >) – [in] - the primitive strategy of proximity calculations. must be non-NULL.
initial_state (
State
) – [in] - the work cell state to use for the initial traversal of the tree.
Overload 2:
- Construct proximity calculator for a WorkCell with an associated
proximity strategy.
The ProximityCalculator extracts information about the tree and the CollisionSetup from workcell.
The ProximityCalculator is initialized with the strategy . Notice that the ProximityCalculator will create and store models inside the strategy .
- Parameters
workcell (rw::core::Ptr< rw::models::WorkCell >) – [in] the workcell to check
strategy (rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy >) – [in] the ProximityStrategy to use
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- Return type
boolean
- Returns
true if succesful, otherwise false
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- removeGeometry(*args)
Overload 1:
Removes geometry from ProximityCalculator
The id of the geometry is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from ProximityCalculator
The geometryId is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorDistanceCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorDistanceMultiCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorDistanceMultiPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- Return type
boolean
- Returns
true if succesful, otherwise false
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- cptr()
- deref()
The pointer stored in the object.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(*args)
Overload 1:
Removes geometry from ProximityCalculator
The id of the geometry is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from ProximityCalculator
The geometryId is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceMultiStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityCalculatorDistancePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(frame, geometry)
Add Geometry associated to frame
The current shape of the geometry is copied, hence later changes to geometry has no effect
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame to associate geometry to
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry to add
- Return type
boolean
- Returns
true if succesful, otherwise false
- addRule(rule)
Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- calculate(*args)
Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. :type state:
State
:param state: [in] The state the proximity calculation should be done in. :type settings: rw::core::Ptr< rw::proximity::ProximityStrategyData >, optional :param settings: [in] The settings used for the calculations. Different settings are usedfor different ProximityStrategies:
For CollisionStrategy the Collision Query Type is used. if not given only first collision is detected
For DistanceStrategy no settings are used and it is expected to be null, otherwise an exception is thrown.
For DistanceMultiStrategy the tolerance is used which is the maximum distance allowed for the result to be recorded. if not given the tolerance is set to the largest finite double
- Parameters
results (rw::core::Ptr< std::vector< rw::proximity::ProximityStrategyData > >, optional) – [in/out] Defines parameters for the ProximityCalculation, stores the results and also enables caching inbetween calls.
- Return type
- Returns
If no result is available an empty ProximityStrategyData is returned. else for Collisions the first contact is returned and for distance the shortest distance is returned
- cptr()
- deref()
The pointer stored in the object.
- getComputationTime()
Get the computation time used in the inCollision functions. :rtype: float :return: the total computation time.
- getDeref()
Member access operator.
- getGeometry(frame, geometryId)
Get the geometry from its ID :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame of the geometry :type geometryId: string :param geometryId: [in] the ID of the geometry :rtype: rw::core::Ptr< rw::geometry::Geometry > :return: Pointer to the geometry
- getGeometryIDs(frame)
return the ids of all the geometries of this frames.
- getNoOfCalls()
Get the number of times the inCollision functions have been called. :rtype: int :return: number of calls to inCollision functions.
- getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
- getStrategy()
Get the ProximityStrategy. :rtype: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy > :return: the strategy if set, otherwise NULL.
- hasGeometry(frame, geometryId)
Returns whether frame has an associated geometry with geometryId. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame in question :type geometryId: string :param geometryId: [in] Id of the geometry
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(*args)
Overload 1:
Removes geometry from ProximityCalculator
The id of the geometry is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometry (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry with the id to be removed
Overload 2:
Removes geometry from ProximityCalculator
The geometryId is used to match the proximity model to the geometry.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] The frame which has the geometry associated
geometryId (string) – [in] Id of geometry to be removed
- removeRule(rule)
Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation
- resetComputationTimeAndCount()
Reset the counter for inCollision invocations and the computation timer.
- setProximityFilterStrategy(proxStrategy)
Set the Proximity Filter strategy of the ProximityCalculator. :type proxStrategy: rw::core::Ptr< rw::proximity::ProximityFilterStrategy > :param proxStrategy: [in] the new ProximityFilterStrategy.
The strategy is not copied so changes to the strategy will affect the calculator
- setStrategy(strategy)
Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models :type strategy: rw::core::Ptr< rw::proximity::ProximityCalculator< rw::proximity::DistanceStrategy >::Strategy > :param strategy: [in] the new strategy
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityData
Bases:
object
Holds settings and cached data for collision detectors.
The cache makes it possible for some algorithms to perform faster detections.
- __init__()
Default constructor.
By default, the collision detector returns on first contact with no detailed information about the collision.
Use setCollisionQueryType to change this behaviour.
- getCollisionQueryType()
Get the collision query type. :rtype: int :return: the query type. See also: CollisionDetector::QueryType
- setCollisionQueryType(qtype)
Set the type of collision query.
The detection can perform faster if it is allowed to return after detecting the first collision. Alternatively, it is possible to detect all collisions if required.
- Parameters
qtype (int) – [in] the query type.
See also: rw::proximity::CollisionDetector::QueryType
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityDataCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getCollisionQueryType()
Get the collision query type. :rtype: int :return: the query type. See also: CollisionDetector::QueryType
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityDataPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- getCollisionQueryType()
Get the collision query type. :rtype: int :return: the query type. See also: CollisionDetector::QueryType
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- setCollisionQueryType(qtype)
Set the type of collision query.
The detection can perform faster if it is allowed to return after detecting the first collision. Alternatively, it is possible to detect all collisions if required.
- Parameters
qtype (int) – [in] the query type.
See also: rw::proximity::CollisionDetector::QueryType
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityFilter(*args, **kwargs)
Bases:
object
this class is used for fetching frame pairs using some proximity filtering strategy.
The proximity filter is statefull and in the simplest case its an iterator over a set of frame pairs.
The filter implementations should support early existing, to reduce computations.
- __init__(*args, **kwargs)
- front()
if there are any more possibly colliding framepairs since last call to update then this will return true, else false will be returned.
- frontAndPop()
returns the current front and pops it afterwards :rtype:
FramePair
:return: the current front element
- isEmpty()
if there are any more possibly colliding framepairs since last call to update then this will return true, else false will be returned.
- pop()
pop the current front.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityFilterCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityFilterPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- front()
if there are any more possibly colliding framepairs since last call to update then this will return true, else false will be returned.
- frontAndPop()
returns the current front and pops it afterwards :rtype:
FramePair
:return: the current front element
- getDeref()
Member access operator.
- isEmpty()
if there are any more possibly colliding framepairs since last call to update then this will return true, else false will be returned.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- pop()
pop the current front.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityFilterStrategy(*args, **kwargs)
Bases:
object
describe the interface of a broad phase proximity strategy or proximity culler.
A broadphase strategy implement heuristics or rules for finding frame pairs that are possibly overlapping and excluding framepairs that are definitely not overlapping.
The interface supports early exiting by returning frame-pairs in an iterative manor. This enables efficient collision filtering at the cost of ease of use. Before acquiring sets of framepairs the update function need be called. Thereafter multiple calls to next will return possibly colliding frame pairs.
Filter f = bpstrategy->update(state) while(f->hasNext()){ FramePair fpair = f->next(); // do collision with narrowphase strategy ... }
- __init__(*args, **kwargs)
- addGeometry(frame, geo)
Adds geometry associated to frame :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame which has the geometry associated :type geo: rw::core::Ptr< rw::geometry::Geometry > :param geo: [in] Geometry
- addRule(rule)
Adds a ProximitySetupRule :type rule:
ProximitySetupRule
:param rule: [in] the rule to add.
- createProximityCache()
creates a FilterData object. This is used for caching relavant data between calls to update
- Return type
rw::core::Ptr< rw::proximity::ProximityCache >
- Returns
- getProximitySetup()
get the proximity setup that describe the include/exclude rules of this BroadPhaseStrategy :rtype:
ProximitySetup
:return: a reference to the ProximitySetup
- removeGeometry(*args)
Overload 1:
Removes the geometric model geo associated with Frame frame from this strategy.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame which has the geometry associated
geo (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry
Overload 2:
Removes the geometric model with name geoName and which is associated with frame.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame which has the geometry associated
geoName (string) – [in] Name of geometry
- removeRule(rule)
Removes a ProximitySetupRule If the rule cannot be found, then noting happens. :type rule:
ProximitySetupRule
:param rule: [in] the rule to remove.
- reset(state)
Reset :type state:
State
:param state: [in] the state.
- property thisown
The membership flag
- update(*args)
Overload 1:
Do an update :type state:
State
:param state: [in] the state. :rtype: rw::core::Ptr< rw::proximity::ProximityFilter > :return:Overload 2:
called once before acquirering all possibly colliding frame pairs in the workcell :type state:
State
:param state: [in] the state for which collision detection is performed. :type data: rw::core::Ptr< rw::proximity::ProximityCache > :param data:
- class sdurw_proximity.sdurw_proximity.ProximityFilterStrategyCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityFilterStrategyPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(frame, geo)
Adds geometry associated to frame :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] Frame which has the geometry associated :type geo: rw::core::Ptr< rw::geometry::Geometry > :param geo: [in] Geometry
- addRule(rule)
Adds a ProximitySetupRule :type rule:
ProximitySetupRule
:param rule: [in] the rule to add.
- cptr()
- createProximityCache()
creates a FilterData object. This is used for caching relavant data between calls to update
- Return type
rw::core::Ptr< rw::proximity::ProximityCache >
- Returns
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getProximitySetup()
get the proximity setup that describe the include/exclude rules of this BroadPhaseStrategy :rtype:
ProximitySetup
:return: a reference to the ProximitySetup
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(*args)
Overload 1:
Removes the geometric model geo associated with Frame frame from this strategy.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame which has the geometry associated
geo (rw::core::Ptr< rw::geometry::Geometry >) – [in] Geometry
Overload 2:
Removes the geometric model with name geoName and which is associated with frame.
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] Frame which has the geometry associated
geoName (string) – [in] Name of geometry
- removeRule(rule)
Removes a ProximitySetupRule If the rule cannot be found, then noting happens. :type rule:
ProximitySetupRule
:param rule: [in] the rule to remove.
- reset(state)
Reset :type state:
State
:param state: [in] the state.
- property thisown
The membership flag
- update(*args)
Overload 1:
Do an update :type state:
State
:param state: [in] the state. :rtype: rw::core::Ptr< rw::proximity::ProximityFilter > :return:Overload 2:
called once before acquirering all possibly colliding frame pairs in the workcell :type state:
State
:param state: [in] the state for which collision detection is performed. :type data: rw::core::Ptr< rw::proximity::ProximityCache > :param data:
- class sdurw_proximity.sdurw_proximity.ProximityModel(pOwner)
Bases:
object
Class for managing the collision geometries associated to a frame
- __init__(pOwner)
Constructor
- Parameters
pOwner (
ProximityStrategy
) – the ProximityStrategy owning this ProximityModel
- addGeometry(*args)
Overload 1:
adds geometry :type geom:
Geometry
:param geom: the geometry to addOverload 2:
adds geometry using pointer :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry to add :type forceCopy: boolean, optional :param forceCopy: [in]
Overload 3:
adds geometry using pointer :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry to add :param forceCopy: [in]
- getFrame()
return pointer to the associated frame
- getGeometries()
get the associated Geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: a list of Geomety pointers beloninh to the model
- getGeometryIDs()
return vector of names for the geometries added to this ProximityModel
- property owner
- removeGeometry(geoid)
removes a geometry from the ProximityModel
- Parameters
geoid (string) – name of geometry to remove
- Return type
boolean
- Returns
bool
- setFrame(frame)
sets the associated frame
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – frame to set
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityModelCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property owner
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityModelPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(*args)
Overload 1:
adds geometry :type geom:
Geometry
:param geom: the geometry to addOverload 2:
adds geometry using pointer :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry to add :type forceCopy: boolean, optional :param forceCopy: [in]
Overload 3:
adds geometry using pointer :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry to add :param forceCopy: [in]
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getFrame()
return pointer to the associated frame
- getGeometries()
get the associated Geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: a list of Geomety pointers beloninh to the model
- getGeometryIDs()
return vector of names for the geometries added to this ProximityModel
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property owner
- removeGeometry(geoid)
removes a geometry from the ProximityModel
- Parameters
geoid (string) – name of geometry to remove
- Return type
boolean
- Returns
bool
- setFrame(frame)
sets the associated frame
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – frame to set
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximitySetup(*args)
Bases:
object
Setup for the collision checker
The ProximitySetup contains the rules about which frames should be checked against each other
- __init__(*args)
Overload 1:
Default constructor for when no excludes are described
Overload 2:
- Constructs ProximitySetup with list of exclusions
- type rules
std::vector< rw::proximity::ProximitySetupRule >
- param rules
documentation missing !
Conditional comment:
- param exclude
[in] pairs to be excluded End of conditional comment.
- addProximitySetupRule(rule)
- static get(*args)
- getFileName()
- getLoadedFromFile()
- getProximitySetupRules()
Returns the exclude list :rtype: std::vector< rw::proximity::ProximitySetupRule > :return: the exclude list
- merge(setup, prefix)
Combine setup of this and setup of b into this collision setup.
- removeProximitySetupRule(rule)
- static set(*args)
- setFileName(file_name)
- setLoadedFromFile(loaded_from_file)
- setUseExcludeStaticPairs(exclude)
- setUseIncludeAll(includeAll)
- property thisown
The membership flag
- useExcludeStaticPairs()
- useIncludeAll()
- class sdurw_proximity.sdurw_proximity.ProximitySetupRule(*args)
Bases:
object
Rule specifying include/exclude of frame pairs
The rule has two patterns, pattern A and pattern B, to which frames can be matched. A pattern could contain a fully specified frame name such as “Table”. It can also include wild card characters such a “Robot.*” or regular expressions.
- EXCLUDE_RULE = 2
- INCLUDE_RULE = 1
- __init__(*args)
Overload 1:
Constructs empty exclude rule (only for SWIG internal use).
Overload 2:
Constructs rule with patternA and patternB and type
- Parameters
patternA (string) – [in] Pattern identifying first frame in rule
patternB (string) – [in] Pattern identifying second frame in rule
type (int) – documentation missing !
- getPatterns()
Returns the string patterns used to match
- static makeExclude(*args)
Overload 1:
Make an exclude rule for the patterns
Overload 2:
Make an exclude rule for the patterns
- static makeInclude(*args)
Overload 1:
Make an include rule for the patterns
Overload 2:
Make an include rule for the patterns
- match(*args)
Overload 1:
Check whether str1 and str2 matches the pattern.
Success is defined if the first pattern matches str1 and the second matches str2 or the first matches str2 and the second str1.
Overload 2:
Check whether pair matches the patterns.
Success is defined if the first pattern matches pair.first and the second matches pair.second or the first matches pair.second and the second pair.first.
- matchOne(name)
Check whether name matches one of the patterns
- matchPatternA(str)
Check whether str matches pattern A
- matchPatternB(str)
Check whether name matches pattern B
- property thisown
The membership flag
- type()
Returns the type of rule
- class sdurw_proximity.sdurw_proximity.ProximitySetupRuleVector(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- sdurw_proximity.sdurw_proximity.ProximitySetupRule_makeExclude(*args)
Overload 1:
Make an exclude rule for the patterns
Overload 2:
Make an exclude rule for the patterns
- sdurw_proximity.sdurw_proximity.ProximitySetupRule_makeInclude(*args)
Overload 1:
Make an include rule for the patterns
Overload 2:
Make an include rule for the patterns
- sdurw_proximity.sdurw_proximity.ProximitySetup_get(*args)
- sdurw_proximity.sdurw_proximity.ProximitySetup_set(*args)
- class sdurw_proximity.sdurw_proximity.ProximityStrategy(*args, **kwargs)
Bases:
object
The ProximityStrategy interface is a clean interface for defining methods that are common for different proximity strategy classes. Specifically adding of geometric models and relating them to frames.
- __init__(*args, **kwargs)
- addGeometry(*args)
Overload 1:
adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model:
ProximityModel
:param model: [in] the proximity model to add data to :type geom:Geometry
:param geom: [in] the geometry that is to be addedOverload 2:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :type forceCopy: boolean, optional :param forceCopy: :rtype: boolean :return:Overload 3:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :param forceCopy: :rtype: boolean :return:
- addModel(*args)
Overload 1:
Adds a Proximity model of a frame to this strategy.
The Proximity model is the one specified in the frames property
- Parameters
object (rw::core::Ptr< rw::models::Object >) – [in] the frame on which the Proximity model is to be created.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 2:
Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (
Geometry
) – [in] list of faces from which to construct the Proximity model
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 3:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy (boolean, optional) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 4:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
- clear()
Clears any stored model information
- clearFrame(frame)
Clear (remove all) model information for frame frame.
- clearFrames()
Clear (remove all) model information for all frames.
- createModel()
creates an empty ProximityModel
- destroyModel(model)
deallocates the memory used for model :type model:
ProximityModel
:param model:
- getGeometries(model)
the list of all geometry that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: all geometry associated to the proximity model
- getGeometryIDs(model)
the list of all geometry ids that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< std::string > :return: all geometry ids associated to the proximity model
- getModel(frame)
get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame for which an proximitymodel is associated
- hasModel(frame)
Tells whether the frame has a proximity model in the strategy
To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to check for1.0/
- Return type
boolean
- Returns
true if a model exists or can be created
- removeGeometry(model, geomId)
removes a geometry from a specific proximity model
- property thisown
The membership flag
- useThreads(threads)
setNumber of threads the strategy may use :type threads: int :param threads: [in] number of threads. if Threads <= 0 then maximum threads available Notes: this does not enforce the use of threads in the algorithms but mearly allows for the use.
- class sdurw_proximity.sdurw_proximity.ProximityStrategyCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityStrategyData(*args)
Bases:
object
- __init__(*args)
Overload 1:
Create Empty ProximityStrategyData
Overload 2:
Copy Constructor
- property abs_err
absolute acceptable error
- getCache()
Get the underlying cache :rtype: rw::core::Ptr< rw::proximity::ProximityCache > :return: pointer to cache
- getColidingFrames()
get the the colliding frames :rtype: std::pair< rw::core::Ptr< rw::kinematics::Frame >,rw::core::Ptr< rw::kinematics::Frame > > :return: the cooliding frames, if in collision else a pair of null
- getCollisionData(*args)
Overload 1:
get the result from the collision check :rtype:
CollisionResult
:return: Result of Collision strategy if availableOverload 2:
get the result from the collision check :rtype:
CollisionResult
:return: Result of Collision strategy if available
- getCollisionQueryType()
Get the used Collision Query type :rtype: int :return: Querytype
- getDistanceData(*args)
Overload 1:
get The result of a distance query :rtype:
Result
:return: result of a distance queryOverload 2:
get The result of a distance query :rtype:
Result
:return: result of a distance query
- getMultiDistanceData(*args)
Overload 1:
get The result of a multi distance query :rtype:
Result
:return: result of a distance queryOverload 2:
get The result of a multi distance query :rtype:
Result
:return: result of a distance query
- getMultiDistanceTolerance()
get the tolerance used to treshold which distances are recorded and which are not. point pairs that are closer than tolerance will be included in the result. :rtype: float :return: The set tolerance
- inCollision()
was collision check in collision :rtype: boolean :return: true if in collision
- property rel_err
relative acceptable error
- setCollisionQueryType(qtype)
set the Collision Query type :type qtype: int :param qtype: [in] the used Query type
- setMultiDistanceTolerance(tolerance)
set the tolerance used to treshold which distances are recorded and which are not. point pairs that are closer than tolerance will be included in the result. :type tolerance: float :param tolerance: [in] set the stored tolerance
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityStrategyDataCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- property abs_err
absolute acceptable error
- deref()
The pointer stored in the object.
- getCollisionData(*args)
Overload 1:
get the result from the collision check :rtype:
CollisionResult
:return: Result of Collision strategy if availableOverload 2:
get the result from the collision check :rtype:
CollisionResult
:return: Result of Collision strategy if available
- getCollisionQueryType()
Get the used Collision Query type :rtype: int :return: Querytype
- getDeref()
Member access operator.
- getDistanceData(*args)
Overload 1:
get The result of a distance query :rtype:
Result
:return: result of a distance queryOverload 2:
get The result of a distance query :rtype:
Result
:return: result of a distance query
- getMultiDistanceData(*args)
Overload 1:
get The result of a multi distance query :rtype:
Result
:return: result of a distance queryOverload 2:
get The result of a multi distance query :rtype:
Result
:return: result of a distance query
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property rel_err
relative acceptable error
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityStrategyDataPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- property abs_err
absolute acceptable error
- cptr()
- deref()
The pointer stored in the object.
- getCache()
Get the underlying cache :rtype: rw::core::Ptr< rw::proximity::ProximityCache > :return: pointer to cache
- getColidingFrames()
get the the colliding frames :rtype: std::pair< rw::core::Ptr< rw::kinematics::Frame >,rw::core::Ptr< rw::kinematics::Frame > > :return: the cooliding frames, if in collision else a pair of null
- getCollisionData(*args)
Overload 1:
get the result from the collision check :rtype:
CollisionResult
:return: Result of Collision strategy if availableOverload 2:
get the result from the collision check :rtype:
CollisionResult
:return: Result of Collision strategy if available
- getCollisionQueryType()
Get the used Collision Query type :rtype: int :return: Querytype
- getDeref()
Member access operator.
- getDistanceData(*args)
Overload 1:
get The result of a distance query :rtype:
Result
:return: result of a distance queryOverload 2:
get The result of a distance query :rtype:
Result
:return: result of a distance query
- getMultiDistanceData(*args)
Overload 1:
get The result of a multi distance query :rtype:
Result
:return: result of a distance queryOverload 2:
get The result of a multi distance query :rtype:
Result
:return: result of a distance query
- getMultiDistanceTolerance()
get the tolerance used to treshold which distances are recorded and which are not. point pairs that are closer than tolerance will be included in the result. :rtype: float :return: The set tolerance
- inCollision()
was collision check in collision :rtype: boolean :return: true if in collision
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property rel_err
relative acceptable error
- setCollisionQueryType(qtype)
set the Collision Query type :type qtype: int :param qtype: [in] the used Query type
- setMultiDistanceTolerance(tolerance)
set the tolerance used to treshold which distances are recorded and which are not. point pairs that are closer than tolerance will be included in the result. :type tolerance: float :param tolerance: [in] set the stored tolerance
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.ProximityStrategyFactory(*args, **kwargs)
Bases:
ExtensionPointProximityStrategy
A factory for a ProximityStrategy. This factory also defines an ExtensionPoint.
Extensions providing a ProximityStrategy implementation can extend this factory by registering the extension using the id “rw.proximity.ProximityStrategy”.
- Typically one or more of the following ProximityStrategy types will be available:
RW - rw::proximity::ProximityStrategyRW - Internal RobWork proximity strategy
Bullet - rwlibs::proximitystrategies::ProximityStrategyBullet - Bullet Physics
PQP - rwlibs::proximitystrategies::ProximityStrategyPQP - Proximity Query Package
FCL - rwlibs::proximitystrategies::ProximityStrategyFCL - Flexible Collision Library
Yaobi - rwlibs::proximitystrategies::ProximityStrategyYaobi - Yaobi
- __init__(*args, **kwargs)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- static getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- static hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- static makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new CollisionStrategy.
- property thisown
The membership flag
- sdurw_proximity.sdurw_proximity.ProximityStrategyFactory_getStrategies()
Get the available strategies. :rtype: std::vector< std::string > :return: a vector of identifiers for strategies.
- sdurw_proximity.sdurw_proximity.ProximityStrategyFactory_hasStrategy(strategy)
Check if strategy is available. :type strategy: string :param strategy: [in] the name of the strategy. :rtype: boolean :return: true if available, false otherwise.
- sdurw_proximity.sdurw_proximity.ProximityStrategyFactory_makeStrategy(strategy)
Create a new strategy. :type strategy: string :param strategy: [in] the name of the strategy. :rtype:
Ptr
:return: a pointer to a new CollisionStrategy.
- class sdurw_proximity.sdurw_proximity.ProximityStrategyPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addGeometry(*args)
Overload 1:
adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. :type model:
ProximityModel
:param model: [in] the proximity model to add data to :type geom:Geometry
:param geom: [in] the geometry that is to be addedOverload 2:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :type forceCopy: boolean, optional :param forceCopy: :rtype: boolean :return:Overload 3:
adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. :type model:
ProximityModel
:param model: :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: :param forceCopy: :rtype: boolean :return:
- addModel(*args)
Overload 1:
Adds a Proximity model of a frame to this strategy.
The Proximity model is the one specified in the frames property
- Parameters
object (rw::core::Ptr< rw::models::Object >) – [in] the frame on which the Proximity model is to be created.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 2:
Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (
Geometry
) – [in] list of faces from which to construct the Proximity model
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 3:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy (boolean, optional) – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
Overload 4:
Adds a Proximity model to a frame.
The Proximity model is constructed from the list of faces
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to which the Proximity model should associate
faces (rw::core::Ptr< rw::geometry::Geometry >) – [in] list of faces from which to construct the Proximity model
forceCopy – [in] force the strategy to copy the geometry data, if false the strategy may choose to store the geometry reference or not.
- Return type
boolean
- Returns
true if a Proximity model was succesfully created and linked with the frame; false otherwise.
- clear()
Clears any stored model information
- clearFrame(frame)
Clear (remove all) model information for frame frame.
- clearFrames()
Clear (remove all) model information for all frames.
- cptr()
- createModel()
creates an empty ProximityModel
- deref()
The pointer stored in the object.
- destroyModel(model)
deallocates the memory used for model :type model:
ProximityModel
:param model:
- getDeref()
Member access operator.
- getGeometries(model)
the list of all geometry that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< rw::core::Ptr< rw::geometry::Geometry > > :return: all geometry associated to the proximity model
- getGeometryIDs(model)
the list of all geometry ids that are associated to the proximity model model is returned :type model:
ProximityModel
:param model: [in] the model containing the geometries :rtype: std::vector< std::string > :return: all geometry ids associated to the proximity model
- getModel(frame)
get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] frame for which an proximitymodel is associated
- hasModel(frame)
Tells whether the frame has a proximity model in the strategy
To have a proximity model does not means that it is loaded. If a GeoID string from which a model can be loaded it returns true as well
- Parameters
frame (rw::core::Ptr< rw::kinematics::Frame >) – [in] the frame to check for1.0/
- Return type
boolean
- Returns
true if a model exists or can be created
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeGeometry(model, geomId)
removes a geometry from a specific proximity model
- property thisown
The membership flag
- useThreads(threads)
setNumber of threads the strategy may use :type threads: int :param threads: [in] number of threads. if Threads <= 0 then maximum threads available Notes: this does not enforce the use of threads in the algorithms but mearly allows for the use.
- class sdurw_proximity.sdurw_proximity.Raycaster(cdstrategy, ray_length=100.0)
Bases:
object
a raycast implementation that relies on a collision strategy for finding the collision between the ray and the scene.
- ALL_HITS = 1
- CLOSEST_HIT = 0
- __init__(cdstrategy, ray_length=100.0)
constructor - only the frames in the vector are tested against each other.
- setCalculateNormals(enabled)
set to true if normals should also be calculated :type enabled: boolean :param enabled:
- setRayFrame(rayframe)
- shoot(pos, direction, result, state)
shoots a ray in the direction of the vector direction starting from the position vector pos. The frame associated with the geometry that is hit first by the ray is returned along with the intersection point described in world frame.
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.RaycasterQueryResult
Bases:
object
result of a Raycast query. All contact information are described in ray coordinate frame.
- __init__()
- property data
- property models
- property normal
- property normals
- property point
- property points
- property qtype
- property thisown
The membership flag
- class sdurw_proximity.sdurw_proximity.VectorProximityStrategyData(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_proximity.sdurw_proximity.VectorProximityStrategyDataPtr(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- sdurw_proximity.sdurw_proximity.ownedPtr(*args)
Overload 1:
A Ptr that takes ownership over a raw pointer ptr.
Overload 2:
A Ptr that takes ownership over a raw pointer ptr.
Overload 3:
A Ptr that takes ownership over a raw pointer ptr.
Overload 4:
A Ptr that takes ownership over a raw pointer ptr.
Overload 5:
A Ptr that takes ownership over a raw pointer ptr.
Overload 6:
A Ptr that takes ownership over a raw pointer ptr.
Overload 7:
A Ptr that takes ownership over a raw pointer ptr.
Overload 8:
A Ptr that takes ownership over a raw pointer ptr.
Overload 9:
A Ptr that takes ownership over a raw pointer ptr.
Overload 10:
A Ptr that takes ownership over a raw pointer ptr.
Overload 11:
A Ptr that takes ownership over a raw pointer ptr.
Overload 12:
A Ptr that takes ownership over a raw pointer ptr.
Overload 13:
A Ptr that takes ownership over a raw pointer ptr.
Overload 14:
A Ptr that takes ownership over a raw pointer ptr.
Overload 15:
A Ptr that takes ownership over a raw pointer ptr.
Overload 16:
A Ptr that takes ownership over a raw pointer ptr.
Overload 17:
A Ptr that takes ownership over a raw pointer ptr.
Overload 18:
A Ptr that takes ownership over a raw pointer ptr.
Overload 19:
A Ptr that takes ownership over a raw pointer ptr.
Overload 20:
A Ptr that takes ownership over a raw pointer ptr.
Overload 21:
A Ptr that takes ownership over a raw pointer ptr.
Overload 22:
A Ptr that takes ownership over a raw pointer ptr.
Overload 23:
A Ptr that takes ownership over a raw pointer ptr.
Overload 24:
A Ptr that takes ownership over a raw pointer ptr.
Overload 25:
A Ptr that takes ownership over a raw pointer ptr.
Overload 26:
A Ptr that takes ownership over a raw pointer ptr.
Overload 27:
A Ptr that takes ownership over a raw pointer ptr.
Overload 28:
A Ptr that takes ownership over a raw pointer ptr.
Overload 29:
A Ptr that takes ownership over a raw pointer ptr.
Overload 30:
A Ptr that takes ownership over a raw pointer ptr.
Overload 31:
A Ptr that takes ownership over a raw pointer ptr.
Overload 32:
A Ptr that takes ownership over a raw pointer ptr.
Overload 33:
A Ptr that takes ownership over a raw pointer ptr.
Overload 34:
A Ptr that takes ownership over a raw pointer ptr.
Overload 35:
A Ptr that takes ownership over a raw pointer ptr.
Overload 36:
A Ptr that takes ownership over a raw pointer ptr.
Overload 37:
A Ptr that takes ownership over a raw pointer ptr.
Overload 38:
A Ptr that takes ownership over a raw pointer ptr.
Overload 39:
A Ptr that takes ownership over a raw pointer ptr.
Overload 40:
A Ptr that takes ownership over a raw pointer ptr.
Overload 41:
A Ptr that takes ownership over a raw pointer ptr.
Overload 42:
A Ptr that takes ownership over a raw pointer ptr.
Overload 43:
A Ptr that takes ownership over a raw pointer ptr.
Overload 44:
A Ptr that takes ownership over a raw pointer ptr.
Overload 45:
A Ptr that takes ownership over a raw pointer ptr.
Overload 46:
A Ptr that takes ownership over a raw pointer ptr.
Overload 47:
A Ptr that takes ownership over a raw pointer ptr.
Overload 48:
A Ptr that takes ownership over a raw pointer ptr.
Overload 49:
A Ptr that takes ownership over a raw pointer ptr.
Overload 50:
A Ptr that takes ownership over a raw pointer ptr.
Overload 51:
A Ptr that takes ownership over a raw pointer ptr.
Overload 52:
A Ptr that takes ownership over a raw pointer ptr.
Overload 53:
A Ptr that takes ownership over a raw pointer ptr.
Overload 54:
A Ptr that takes ownership over a raw pointer ptr.
Overload 55:
A Ptr that takes ownership over a raw pointer ptr.
Overload 56:
A Ptr that takes ownership over a raw pointer ptr.
Overload 57:
A Ptr that takes ownership over a raw pointer ptr.
Overload 58:
A Ptr that takes ownership over a raw pointer ptr.
Overload 59:
A Ptr that takes ownership over a raw pointer ptr.
Overload 60:
A Ptr that takes ownership over a raw pointer ptr.
Overload 61:
A Ptr that takes ownership over a raw pointer ptr.
Overload 62:
A Ptr that takes ownership over a raw pointer ptr.
Overload 63:
A Ptr that takes ownership over a raw pointer ptr.
Overload 64:
A Ptr that takes ownership over a raw pointer ptr.
Overload 65:
A Ptr that takes ownership over a raw pointer ptr.
Overload 66:
A Ptr that takes ownership over a raw pointer ptr.
Overload 67:
A Ptr that takes ownership over a raw pointer ptr.
Overload 68:
A Ptr that takes ownership over a raw pointer ptr.
Overload 69:
A Ptr that takes ownership over a raw pointer ptr.
Overload 70:
A Ptr that takes ownership over a raw pointer ptr.
Overload 71:
A Ptr that takes ownership over a raw pointer ptr.
Overload 72:
A Ptr that takes ownership over a raw pointer ptr.
Overload 73:
A Ptr that takes ownership over a raw pointer ptr.
Overload 74:
A Ptr that takes ownership over a raw pointer ptr.
Overload 75:
A Ptr that takes ownership over a raw pointer ptr.
Overload 76:
A Ptr that takes ownership over a raw pointer ptr.
Overload 77:
A Ptr that takes ownership over a raw pointer ptr.
Overload 78:
A Ptr that takes ownership over a raw pointer ptr.
Overload 79:
A Ptr that takes ownership over a raw pointer ptr.
Overload 80:
A Ptr that takes ownership over a raw pointer ptr.
Overload 81:
A Ptr that takes ownership over a raw pointer ptr.
Overload 82:
A Ptr that takes ownership over a raw pointer ptr.
Overload 83:
A Ptr that takes ownership over a raw pointer ptr.
Overload 84:
A Ptr that takes ownership over a raw pointer ptr.
Overload 85:
A Ptr that takes ownership over a raw pointer ptr.
Overload 86:
A Ptr that takes ownership over a raw pointer ptr.
Overload 87:
A Ptr that takes ownership over a raw pointer ptr.
Overload 88:
A Ptr that takes ownership over a raw pointer ptr.
Overload 89:
A Ptr that takes ownership over a raw pointer ptr.
Overload 90:
A Ptr that takes ownership over a raw pointer ptr.
Overload 91:
A Ptr that takes ownership over a raw pointer ptr.
Overload 92:
A Ptr that takes ownership over a raw pointer ptr.
Overload 93:
A Ptr that takes ownership over a raw pointer ptr.
Overload 94:
A Ptr that takes ownership over a raw pointer ptr.
Overload 95:
A Ptr that takes ownership over a raw pointer ptr.
Overload 96:
A Ptr that takes ownership over a raw pointer ptr.
Overload 97:
A Ptr that takes ownership over a raw pointer ptr.
Overload 98:
A Ptr that takes ownership over a raw pointer ptr.
Overload 99:
A Ptr that takes ownership over a raw pointer ptr.
Overload 100:
A Ptr that takes ownership over a raw pointer ptr.
Overload 101:
A Ptr that takes ownership over a raw pointer ptr.
Overload 102:
A Ptr that takes ownership over a raw pointer ptr.
Overload 103:
A Ptr that takes ownership over a raw pointer ptr.
Overload 104:
A Ptr that takes ownership over a raw pointer ptr.
Overload 105:
A Ptr that takes ownership over a raw pointer ptr.
Overload 106:
A Ptr that takes ownership over a raw pointer ptr.
Overload 107:
A Ptr that takes ownership over a raw pointer ptr.
Overload 108:
A Ptr that takes ownership over a raw pointer ptr.
Overload 109:
A Ptr that takes ownership over a raw pointer ptr.
Overload 110:
A Ptr that takes ownership over a raw pointer ptr.
Overload 111:
A Ptr that takes ownership over a raw pointer ptr.
Overload 112:
A Ptr that takes ownership over a raw pointer ptr.
Overload 113:
A Ptr that takes ownership over a raw pointer ptr.
Overload 114:
A Ptr that takes ownership over a raw pointer ptr.
Overload 115:
A Ptr that takes ownership over a raw pointer ptr.
Overload 116:
A Ptr that takes ownership over a raw pointer ptr.
Overload 117:
A Ptr that takes ownership over a raw pointer ptr.
Overload 118:
A Ptr that takes ownership over a raw pointer ptr.
Overload 119:
A Ptr that takes ownership over a raw pointer ptr.
Overload 120:
A Ptr that takes ownership over a raw pointer ptr.
Overload 121:
A Ptr that takes ownership over a raw pointer ptr.
Overload 122:
A Ptr that takes ownership over a raw pointer ptr.
Overload 123:
A Ptr that takes ownership over a raw pointer ptr.
Overload 124:
A Ptr that takes ownership over a raw pointer ptr.
Overload 125:
A Ptr that takes ownership over a raw pointer ptr.
Overload 126:
A Ptr that takes ownership over a raw pointer ptr.
Overload 127:
A Ptr that takes ownership over a raw pointer ptr.
Overload 128:
A Ptr that takes ownership over a raw pointer ptr.
Overload 129:
A Ptr that takes ownership over a raw pointer ptr.
Overload 130:
A Ptr that takes ownership over a raw pointer ptr.
Overload 131:
A Ptr that takes ownership over a raw pointer ptr.
Overload 132:
A Ptr that takes ownership over a raw pointer ptr.
Overload 133:
A Ptr that takes ownership over a raw pointer ptr.
Overload 134:
A Ptr that takes ownership over a raw pointer ptr.
Overload 135:
A Ptr that takes ownership over a raw pointer ptr.
Overload 136:
A Ptr that takes ownership over a raw pointer ptr.
Overload 137:
A Ptr that takes ownership over a raw pointer ptr.
Overload 138:
A Ptr that takes ownership over a raw pointer ptr.
Overload 139:
A Ptr that takes ownership over a raw pointer ptr.
Overload 140:
A Ptr that takes ownership over a raw pointer ptr.
Overload 141:
A Ptr that takes ownership over a raw pointer ptr.
Overload 142:
A Ptr that takes ownership over a raw pointer ptr.
Overload 143:
A Ptr that takes ownership over a raw pointer ptr.
Overload 144:
A Ptr that takes ownership over a raw pointer ptr.
Overload 145:
A Ptr that takes ownership over a raw pointer ptr.
Overload 146:
A Ptr that takes ownership over a raw pointer ptr.
Overload 147:
A Ptr that takes ownership over a raw pointer ptr.
Overload 148:
A Ptr that takes ownership over a raw pointer ptr.
Overload 149:
A Ptr that takes ownership over a raw pointer ptr.
Overload 150:
A Ptr that takes ownership over a raw pointer ptr.
Overload 151:
A Ptr that takes ownership over a raw pointer ptr.
Overload 152:
A Ptr that takes ownership over a raw pointer ptr.
Overload 153:
A Ptr that takes ownership over a raw pointer ptr.
Overload 154:
A Ptr that takes ownership over a raw pointer ptr.
Overload 155:
A Ptr that takes ownership over a raw pointer ptr.
Overload 156:
A Ptr that takes ownership over a raw pointer ptr.
Overload 157:
A Ptr that takes ownership over a raw pointer ptr.
Overload 158:
A Ptr that takes ownership over a raw pointer ptr.
Overload 159:
A Ptr that takes ownership over a raw pointer ptr.
Overload 160:
A Ptr that takes ownership over a raw pointer ptr.
Overload 161:
A Ptr that takes ownership over a raw pointer ptr.
Overload 162:
A Ptr that takes ownership over a raw pointer ptr.
Overload 163:
A Ptr that takes ownership over a raw pointer ptr.
Overload 164:
A Ptr that takes ownership over a raw pointer ptr.
Overload 165:
A Ptr that takes ownership over a raw pointer ptr.
Overload 166:
A Ptr that takes ownership over a raw pointer ptr.
Overload 167:
A Ptr that takes ownership over a raw pointer ptr.
Overload 168:
A Ptr that takes ownership over a raw pointer ptr.
Overload 169:
A Ptr that takes ownership over a raw pointer ptr.
Overload 170:
A Ptr that takes ownership over a raw pointer ptr.
Overload 171:
A Ptr that takes ownership over a raw pointer ptr.
Overload 172:
A Ptr that takes ownership over a raw pointer ptr.
Overload 173:
A Ptr that takes ownership over a raw pointer ptr.
Overload 174:
A Ptr that takes ownership over a raw pointer ptr.
Overload 175:
A Ptr that takes ownership over a raw pointer ptr.
Overload 176:
A Ptr that takes ownership over a raw pointer ptr.
Overload 177:
A Ptr that takes ownership over a raw pointer ptr.
Overload 178:
A Ptr that takes ownership over a raw pointer ptr.
Overload 179:
A Ptr that takes ownership over a raw pointer ptr.