|
Biorbd
|
#include <Contacts.h>
Public Member Functions | |
| Contacts () | |
| Construct contacts. | |
| biorbd::rigidbody::Contacts | DeepCopy () const |
| Deep copy of contacts. More... | |
| void | DeepCopy (const biorbd::rigidbody::Contacts &other) |
| Deep copy of contacts. More... | |
| unsigned int | AddConstraint (unsigned int body_id, const biorbd::utils::Vector3d &body_point, const biorbd::utils::Vector3d &world_normal, const biorbd::utils::String &name, double acc=0) |
| Add a constraint to the constraint set. More... | |
| unsigned int | AddConstraint (unsigned int body_id, const biorbd::utils::Vector3d &body_point, const biorbd::utils::String &axis, const biorbd::utils::String &name, double acc=0) |
| Add a constraint to the constraint set. More... | |
| unsigned int | AddLoopConstraint (unsigned int body_id_predecessor, unsigned int body_id_successor, const biorbd::utils::RotoTrans &X_predecessor, const biorbd::utils::RotoTrans &X_successor, const biorbd::utils::SpatialVector &axis, const biorbd::utils::String &name, bool enableStabilization=false, double stabilizationParam=0.1) |
| Add a loop constraint to the constraint set. More... | |
| virtual | ~Contacts () |
| Destroy the class properly. | |
| Contacts & | getConstraints () |
| Get constraints. More... | |
| bool | hasContacts () const |
| Check if there are contacts. More... | |
| unsigned int | nbContacts () const |
| Return the number of contacts. More... | |
| std::vector< biorbd::utils::String > | contactNames () |
| Return the name of the all contacts. More... | |
| biorbd::utils::String | contactName (unsigned int i) |
| Return the name of the contact of a specified axis. More... | |
| std::vector< biorbd::utils::Vector3d > | constraintsInGlobal (const biorbd::rigidbody::GeneralizedCoordinates &Q, bool updateKin) |
| Return the contraints position in the global reference. More... | |
| biorbd::utils::Vector | getForce () const |
| Return the force acting on the contraint. More... | |
Protected Attributes | |
| std::shared_ptr< unsigned int > | m_nbreConstraint |
| Number of constraints. | |
| std::shared_ptr< bool > | m_isBinded |
| If the model is ready. | |
Class Contacts.
Definition at line 28 of file Contacts.h.
| unsigned int biorbd::rigidbody::Contacts::AddConstraint | ( | unsigned int | body_id, |
| const biorbd::utils::Vector3d & | body_point, | ||
| const biorbd::utils::String & | axis, | ||
| const biorbd::utils::String & | name, | ||
| double | acc = 0 |
||
| ) |
Add a constraint to the constraint set.
| body_id | The body which is affected directly by the constraint |
| body_point | The point that is constrained relative to the contact body |
| axis | The axis along which the constraint acts |
| name | A human readable name |
| acc | The acceleration of the contact along the normal |
Definition at line 46 of file Contacts.cpp.
| unsigned int biorbd::rigidbody::Contacts::AddConstraint | ( | unsigned int | body_id, |
| const biorbd::utils::Vector3d & | body_point, | ||
| const biorbd::utils::Vector3d & | world_normal, | ||
| const biorbd::utils::String & | name, | ||
| double | acc = 0 |
||
| ) |
Add a constraint to the constraint set.
| body_id | The body which is affected directly by the constraint |
| body_point | The point that is constrained relative to the contact body |
| world_normal | The normal along the constraint acts (in base coordinates) |
| name | A human readable name |
| acc | The acceleration of the contact along the normal |
Definition at line 37 of file Contacts.cpp.
| unsigned int biorbd::rigidbody::Contacts::AddLoopConstraint | ( | unsigned int | body_id_predecessor, |
| unsigned int | body_id_successor, | ||
| const biorbd::utils::RotoTrans & | X_predecessor, | ||
| const biorbd::utils::RotoTrans & | X_successor, | ||
| const biorbd::utils::SpatialVector & | axis, | ||
| const biorbd::utils::String & | name, | ||
| bool | enableStabilization = false, |
||
| double | stabilizationParam = 0.1 |
||
| ) |
Add a loop constraint to the constraint set.
| body_id_predecessor | The identifier of the predecessor body |
| body_id_successor | The identifier of the successor body |
| X_predecessor | A spatial transform localizing the constrained frames on the predecessor body, expressed with respect to the predecessor body frame |
| X_successor | A spatial transform localizing the constrained frames on the successor body, expressed with respect to the successor body frame |
| axis | A spatial vector indicating the axis along which the constraint acts |
| name | A human readable name |
| enableStabilization | Whether stabilization should be enabled or not |
| stabilizationParam | The value used for stabilization |
Definition at line 71 of file Contacts.cpp.
| std::vector< biorbd::utils::Vector3d > biorbd::rigidbody::Contacts::constraintsInGlobal | ( | const biorbd::rigidbody::GeneralizedCoordinates & | Q, |
| bool | updateKin | ||
| ) |
Return the contraints position in the global reference.
| Q | The generalized coordinates of the joints |
| updateKin | Whether the kinematics of the model should be updated from Q |
Definition at line 135 of file Contacts.cpp.
| biorbd::utils::String biorbd::rigidbody::Contacts::contactName | ( | unsigned int | i | ) |
Return the name of the contact of a specified axis.
| i | The axis |
Definition at line 128 of file Contacts.cpp.
| std::vector< biorbd::utils::String > biorbd::rigidbody::Contacts::contactNames | ( | ) |
Return the name of the all contacts.
Definition at line 119 of file Contacts.cpp.
| biorbd::rigidbody::Contacts biorbd::rigidbody::Contacts::DeepCopy | ( | ) | const |
| void biorbd::rigidbody::Contacts::DeepCopy | ( | const biorbd::rigidbody::Contacts & | other | ) |
Deep copy of contacts.
| other | The contacts to copy |
Definition at line 29 of file Contacts.cpp.
| biorbd::rigidbody::Contacts & biorbd::rigidbody::Contacts::getConstraints | ( | ) |
| biorbd::utils::Vector biorbd::rigidbody::Contacts::getForce | ( | ) | const |
Return the force acting on the contraint.
Definition at line 157 of file Contacts.cpp.
| bool biorbd::rigidbody::Contacts::hasContacts | ( | ) | const |
Check if there are contacts.
Definition at line 106 of file Contacts.cpp.
| unsigned int biorbd::rigidbody::Contacts::nbContacts | ( | ) | const |
Return the number of contacts.
Definition at line 114 of file Contacts.cpp.
1.8.18