Biorbd
include
RigidBody
Contacts.h
1
#ifndef BIORBD_RIGIDBODY_CONTACTS_H
2
#define BIORBD_RIGIDBODY_CONTACTS_H
3
4
#include <vector>
5
#include <memory>
6
#include <rbdl/Constraints.h>
7
#include "biorbdConfig.h"
8
9
namespace
biorbd {
namespace
utils {
10
class
RotoTrans;
11
class
Vector3d;
12
class
Vector;
13
class
String;
14
class
SpatialVector;
15
}}
16
17
namespace
biorbd {
18
namespace
rigidbody {
19
class
Joints;
20
class
GeneralizedCoordinates;
21
25
#ifdef SWIG
26
class
BIORBD_API Contacts
27
#else
28
class BIORBD_API
Contacts
:
public
RigidBodyDynamics::ConstraintSet
29
#endif
30
{
31
public
:
35
Contacts
();
36
41
biorbd::rigidbody::Contacts
DeepCopy()
const
;
42
47
void
DeepCopy(
48
const
biorbd::rigidbody::Contacts
& other);
49
58
unsigned
int
AddConstraint(
59
unsigned
int
body_id,
60
const
biorbd::utils::Vector3d
&body_point,
61
const
biorbd::utils::Vector3d
&world_normal,
62
const
biorbd::utils::String
& name,
63
double
acc = 0);
64
73
74
unsigned
int
AddConstraint(
75
unsigned
int
body_id,
76
const
biorbd::utils::Vector3d
&body_point,
77
const
biorbd::utils::String
& axis,
78
const
biorbd::utils::String
& name,
79
double
acc = 0);
80
92
unsigned
int
AddLoopConstraint(
93
unsigned
int
body_id_predecessor,
94
unsigned
int
body_id_successor,
95
const
biorbd::utils::RotoTrans
& X_predecessor,
96
const
biorbd::utils::RotoTrans
& X_successor,
97
const
biorbd::utils::SpatialVector
& axis,
98
const
biorbd::utils::String
& name,
99
bool
enableStabilization =
false
,
100
double
stabilizationParam = 0.1);
101
105
virtual
~
Contacts
();
106
111
Contacts
&getConstraints();
112
117
bool
hasContacts()
const
;
118
123
unsigned
int
nbContacts()
const
;
124
129
std::vector<biorbd::utils::String> contactNames();
130
136
biorbd::utils::String
contactName(
unsigned
int
i);
137
144
std::vector<biorbd::utils::Vector3d> constraintsInGlobal(
145
const
biorbd::rigidbody::GeneralizedCoordinates
&Q,
146
bool
updateKin);
147
152
biorbd::utils::Vector
getForce()
const
;
153
154
protected
:
155
std::shared_ptr<unsigned int>
m_nbreConstraint
;
156
std::shared_ptr<bool>
m_isBinded
;
157
158
};
159
160
}}
161
162
#endif // BIORBD_RIGIDBODY_CONTACTS_H
biorbd::utils::SpatialVector
Wrapper of the Eigen::Matrix<double, 6, 1> or Casadi::MX(6, 1)
Definition:
SpatialVector.h:19
biorbd::utils::Vector
Wrapper of the Eigen VectorXd.
Definition:
Vector.h:20
biorbd::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition:
Vector3d.h:24
biorbd::rigidbody::GeneralizedCoordinates
Class GeneralizedCoordinates.
Definition:
GeneralizedCoordinates.h:15
biorbd::rigidbody::Contacts::m_nbreConstraint
std::shared_ptr< unsigned int > m_nbreConstraint
Number of constraints.
Definition:
Contacts.h:155
biorbd::utils::RotoTrans
Homogenous matrix to describe translations and rotations simultaneously.
Definition:
RotoTrans.h:34
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition:
String.h:17
biorbd::rigidbody::Contacts::m_isBinded
std::shared_ptr< bool > m_isBinded
If the model is ready.
Definition:
Contacts.h:156
biorbd::rigidbody::Contacts
Class Contacts.
Definition:
Contacts.h:30
Generated by
1.8.18