Computational Embodied Neuroscience Simulator
1.1
3D simulation library
|
A custom SliderConstraint Class. More...
#include <cens_physics.h>
Public Member Functions | |
CENSSliderConstraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &rbAFrame, const btTransform &rbBFrame, bool useReferenceFrameA=false) | |
void | setMotorTarget (float targetPos, float dt=.05) |
void | setPDMotorTarget (float targetPos, float kp=3, float ki=0, float kd=.5, float dt=.05) |
Static Private Attributes | |
static std::map < CENSSliderConstraint *, float > | positions |
A custom SliderConstraint Class.
Through this class a custom control of the motor of the joint can be implemented. The methods CENSSliderConstraint::setMotorTarget and CENSSliderConstraint::setPDMotorTarget can be used to change the joint position with a P or PD control.
Definition at line 435 of file cens_physics.h.
|
inline |
Definition at line 439 of file cens_physics.h.
void cens::CENSSliderConstraint::setMotorTarget | ( | float | targetPos, |
float | dt = .05 |
||
) |
Definition at line 386 of file cens_physics.cpp.
References positions.
void cens::CENSSliderConstraint::setPDMotorTarget | ( | float | targetPos, |
float | kp = 3 , |
||
float | ki = 0 , |
||
float | kd = .5 , |
||
float | dt = .05 |
||
) |
Change motor velocity based on the PD force
targetPos | the desired position of the joint |
kp | proportional gain |
kd | derivative gain |
dt | integration timestep |
Definition at line 415 of file cens_physics.cpp.
References positions.
|
staticprivate |
Definition at line 461 of file cens_physics.h.
Referenced by setMotorTarget(), and setPDMotorTarget().