Biorbd Release_1.13.0
Loading...
Searching...
No Matches
SoftContacts.h
1#ifndef BIORBD_RIGIDBODY_SOFT_CONTACTS_H
2#define BIORBD_RIGIDBODY_SOFT_CONTACTS_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7#include <vector>
8
9#include "rbdl/rbdl_math.h"
10
11namespace BIORBD_NAMESPACE {
12namespace utils {
13class String;
14}
15
16namespace rigidbody {
19class SoftContactNode;
20class NodeSegment;
21
25class BIORBD_API SoftContacts {
26 public:
31
35 virtual ~SoftContacts() {}
36
41 SoftContacts DeepCopy() const;
42
47 void DeepCopy(const SoftContacts &other);
48
54 utils::String softContactName(size_t i);
55
60 std::vector<utils::String> softContactNames();
61
66 void addSoftContact(const SoftContactNode &contact);
67
73 SoftContactNode &softContact(size_t idx);
74
82 NodeSegment softContact(
84 size_t idx,
85 bool updateKin = true);
86
93 std::vector<NodeSegment> softContacts(
95 bool updateKin = true);
96
105 NodeSegment softContactVelocity(
106 const GeneralizedCoordinates &Q,
107 const GeneralizedVelocity &Qdot,
108 size_t idx,
109 bool updateKin = true);
110
119 NodeSegment softContactAngularVelocity(
120 const GeneralizedCoordinates &Q,
121 const GeneralizedVelocity &Qdot,
122 size_t idx,
123 bool updateKin = true);
124
132 std::vector<NodeSegment> softContactsVelocity(
133 const GeneralizedCoordinates &Q,
134 const GeneralizedVelocity &Qdot,
135 bool updateKin = true);
136
144 std::vector<NodeSegment> softContactsAngularVelocity(
145 const GeneralizedCoordinates &Q,
146 const GeneralizedVelocity &Qdot,
147 bool updateKin = true);
148
153 size_t nbSoftContacts() const;
154
160 std::vector<size_t> segmentSoftContactIdx(size_t idx) const;
161
162 protected:
163 std::shared_ptr<std::vector<std::shared_ptr<SoftContactNode>>>
165};
166
167} // namespace rigidbody
168} // namespace BIORBD_NAMESPACE
169
170#endif // BIORBD_RIGIDBODY_SOFT_CONTACTS_H
A point attached to a segment, generally speaking a skin marker.
Definition NodeSegment.h:20
A point attached to a contact node, generally speaking a skin marker.
Holder for the biorbd contact set.
std::shared_ptr< std::vector< std::shared_ptr< SoftContactNode > > > m_softContacts
The contacts.
virtual ~SoftContacts()
Virtual destructor.
SoftContacts()
Construct a contact biorbd set.
Wrapper around the std::string class with augmented functionality.
Definition String.h:18