bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
ekf_sensor_fusion::ContactCounter Class Reference

Counts the contacts that touch any of a set of bodies, such as the obstacles a robot should not hit. More...

#include <contact_counter.h>

Inheritance diagram for ekf_sensor_fusion::ContactCounter:
Collaboration diagram for ekf_sensor_fusion::ContactCounter:

Public Member Functions

 ContactCounter (std::vector< std::shared_ptr< chrono::ChBody > > bodies)
uint_t count (chrono::ChSystem &system)
 The contacts of the system that touch one of the bodies now.
bool OnReportContact (const chrono::ChVector3d &, const chrono::ChVector3d &, const chrono::ChMatrix33<> &, double distance, double, const chrono::ChVector3d &, const chrono::ChVector3d &, chrono::ChContactable *a, chrono::ChContactable *b, int) override

Detailed Description

Counts the contacts that touch any of a set of bodies, such as the obstacles a robot should not hit.

Call count() after each step of the system: it asks the system for its contacts and returns how many of them touch one of the bodies and are in contact, with the bodies overlapping.

Constructor & Destructor Documentation

◆ ContactCounter()

bitsim::rb::bitsim_chrono::ContactCounter::ContactCounter ( std::vector< std::shared_ptr< chrono::ChBody > > bodies)
explicit

Member Function Documentation

◆ count()

The contacts of the system that touch one of the bodies now.

◆ OnReportContact()

bool bitsim::rb::bitsim_chrono::ContactCounter::OnReportContact ( const chrono::ChVector3d & ,
const chrono::ChVector3d & ,
const chrono::ChMatrix33<> & ,
double distance,
double ,
const chrono::ChVector3d & ,
const chrono::ChVector3d & ,
chrono::ChContactable * a,
chrono::ChContactable * b,
int  )
override

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