|
Computational Embodied Neuroscience Simulator
1.1
3D simulation library
|
A custom HingeConstraint Class. More...
#include <cens_physics.h>


Public Member Functions | |
| CENSHingeConstraint (btRigidBody &rbA, btRigidBody &rbB, const btVector3 &pivotInA, const btVector3 &pivotInB, btVector3 &axisInA, btVector3 &axisInB, bool useReferenceFrameA=false) | |
| CENSHingeConstraint (btRigidBody &rbA, const btVector3 &pivotInA, btVector3 &axisInA, bool useReferenceFrameA=false) | |
| CENSHingeConstraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &rbAFrame, const btTransform &rbBFrame, bool useReferenceFrameA=false) | |
| CENSHingeConstraint (btRigidBody &rbA, const btTransform &rbAFrame, bool useReferenceFrameA=false) | |
| void | setPDMotorTarget (float targetAngle, float kp=3, float ki=0, float kd=.5, float dt=.05) |
Static Private Attributes | |
| static std::map < CENSHingeConstraint *, float > | angles |
A custom HingeConstraint Class.
Through this class a custom control of the motor of the joint can be implemented. The method CENSHingeConstraint::setPDMotorTarget can be used instead of the standard btHingeConstraint::setMotorTarget, to change the joint angular position with a PD control.
Definition at line 374 of file cens_physics.h.
|
inline |
Definition at line 378 of file cens_physics.h.
|
inline |
Definition at line 386 of file cens_physics.h.
|
inline |
Definition at line 393 of file cens_physics.h.
|
inline |
Definition at line 400 of file cens_physics.h.
| void cens::CENSHingeConstraint::setPDMotorTarget | ( | float | targetAngle, |
| float | kp = 3, |
||
| float | ki = 0, |
||
| float | kd = .5, |
||
| float | dt = .05 |
||
| ) |
Change motor velocity based on the PD torque
| targetAngle | the desired angular position of the joint |
| kp | proportional gain |
| kd | derivative gain |
| dt | integration timestep |
Definition at line 336 of file cens_physics.cpp.
References angles.
Referenced by cens::CENSSerializedRobot::update().
|
staticprivate |
Definition at line 419 of file cens_physics.h.
Referenced by setPDMotorTarget().
1.8.8