RobWorkProject  23.9.11-
Classes | Public Types | Public Member Functions | List of all members
ThreadedContactDetector Class Reference

Inherits BaseContactDetector.

Public Types

typedef rw::core::Ptr< ThreadedContactDetectorPtr
 
- Public Types inherited from BaseContactDetector
typedef rw::core::Ptr< BaseContactDetectorPtr
 smart pointer type to this class
 

Public Member Functions

 ThreadedContactDetector (rw::core::Ptr< rwsim::dynamics::DynamicWorkCell > dwc, int threads=-1, rw::core::Ptr< rw::proximity::ProximityFilterStrategy > filter=NULL)
 
virtual std::vector< ContactfindContacts (const rw::kinematics::State &state)
 Find contacts in workcell. More...
 
virtual std::vector< ContactfindContacts (const rw::kinematics::State &state, ContactDetectorData &data)
 Find contacts in workcell. More...
 
virtual std::vector< ContactfindContacts (const rw::kinematics::State &state, ContactDetectorData &data, ContactDetectorTracking &tracking, rwsim::log::SimulatorLogScope *log=NULL)
 Find contacts in workcell while tracking known contacts. More...
 
virtual std::vector< ContactupdateContacts (const rw::kinematics::State &state, ContactDetectorData &data, ContactDetectorTracking &tracking, rwsim::log::SimulatorLogScope *log=NULL)
 Updates previously found contacts. More...
 
- Public Member Functions inherited from BaseContactDetector
 BaseContactDetector (rw::core::Ptr< rw::models::WorkCell > workcell, rw::proximity::ProximityFilterStrategy::Ptr filter=NULL)
 Contact detector for a workcell. More...
 
virtual ~BaseContactDetector ()
 Destruct contact detector. More...
 
void setProximityFilterStrategy (rw::proximity::ProximityFilterStrategy::Ptr filter)
 Set a new broad-phase filter. More...
 
virtual rw::proximity::ProximityFilterStrategy::Ptr getProximityFilterStrategy () const
 The broad-phase filter strategy used by the contact detector.
 
virtual double getTimer () const
 The number of seconds measured used in contact detection. More...
 
virtual void setTimer (double value=0)
 Set the value of a timer that will measure time used during contact detection. More...
 

Additional Inherited Members

- Protected Attributes inherited from BaseContactDetector
rw::core::Ptr< rw::proximity::ProximityFilterStrategy_bpFilter
 
rw::core::Ptr< rw::models::WorkCell_wc
 
double _timer
 

Member Function Documentation

◆ findContacts() [1/3]

virtual std::vector<Contact> findContacts ( const rw::kinematics::State state)
virtual

Find contacts in workcell.

Parameters
state[in] The state for which to check for contacts.
Returns
a vector of contacts, some might be subclasses of the Contact class.

Implements BaseContactDetector.

◆ findContacts() [2/3]

virtual std::vector<Contact> findContacts ( const rw::kinematics::State state,
ContactDetectorData data 
)
virtual

Find contacts in workcell.

Use of this function is encouraged if changes between consecutive calls are expected to be small. This will allow the detection algorithms to do certain speed-ups.

Parameters
state[in] The state for which to check for contacts.
data[in/out] Allows caching between contact detection calls, and makes it possible for detection algorithms to exploit spatial and temporal coherence.
Returns
a vector of contacts, some might be subclasses of the Contact class.

Implements BaseContactDetector.

◆ findContacts() [3/3]

virtual std::vector<Contact> findContacts ( const rw::kinematics::State state,
ContactDetectorData data,
ContactDetectorTracking tracking,
rwsim::log::SimulatorLogScope log = NULL 
)
virtual

Find contacts in workcell while tracking known contacts.

Parameters
state[in] the state to find contacts for.
data[in/out] allows caching between contact detection calls, and makes it possible for detection algorithms to exploit spatial and temporal coherence.
tracking[in/out] the tracking data with information about known contacts.
log[in/out] (optional) store detailed logging information.
Returns
a vector of new contacts.

Implements BaseContactDetector.

◆ updateContacts()

virtual std::vector<Contact> updateContacts ( const rw::kinematics::State state,
ContactDetectorData data,
ContactDetectorTracking tracking,
rwsim::log::SimulatorLogScope log = NULL 
)
virtual

Updates previously found contacts.

Parameters
state[in] the new state to find the updated contacts for.
data[in/out] allows caching between contact detection calls, and makes it possible for detection algorithms to exploit spatial and temporal coherence.
tracking[in/out] the tracking data with information about known contacts.
log[in/out] (optional) store detailed logging information.
Returns
a vector of contacts.

Implements BaseContactDetector.


The documentation for this class was generated from the following file: