ContactSensor Class Reference
Class for a contact sensor.
More...
#include <contactsensor.h>
List of all members.
Detailed Description
Class for a contact sensor.
The sensor is on if a collision occurs and stores the penetration depth (as a crude measure for the colission force). It can be either attached to an existing primitive (e.g. a leg) or create its own sensor object. The latter is recommended if you want very localized force sensors. The information of a collision comes to the sensor via the collision callback of the substance used for the primitive. However of no collision is detected the sensor needs to ajust its output as well. Therefore a reset function is provided.
Constructor & Destructor Documentation
ContactSensor |
( |
bool |
binary = true , |
|
|
double |
forcescale = 1 , |
|
|
double |
radius = 0.05 | |
|
) |
| | |
- Parameters:
-
| binary | if true then the sensor is 0 or 1 (for contact), no force value returned |
| forcescale | scale of the measured collision force (default: 1) |
| size | size of little box representing the sensor (if it has an own body) (default: 0.05) |
Member Function Documentation
returns the sensor value in the range >=0; 0 means nothing no contact >0 means contact with another object: size is the force in arbitrary unit
- See also:
- characteritic()
void setDepth |
( |
float |
depth |
) |
[virtual] |
void update |
( |
|
) |
[virtual] |
Member Data Documentation
if contact sensor is a switch
primitive to which the sensor is bound
The documentation for this class was generated from the following files: