-
Notifications
You must be signed in to change notification settings - Fork 2
/
RevoluteChainWithRotor.hpp
49 lines (34 loc) · 1.92 KB
/
RevoluteChainWithRotor.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef GRBDA_ROBOTS_REVOLUTE_CHAIN_WITH_ROTOR_H
#define GRBDA_ROBOTS_REVOLUTE_CHAIN_WITH_ROTOR_H
#include "grbda/Robots/SerialChains/SerialChain.hpp"
namespace grbda
{
template <size_t N, typename Scalar = double>
class RevoluteChainWithRotor : public SerialChain<Scalar>
{
public:
typedef typename ClusterJoints::RevoluteWithRotor<Scalar> RevoluteWithRotor;
typedef typename ClusterJoints::GearedTransmissionModule<Scalar> TransmissionModule;
RevoluteChainWithRotor(bool random_parameters = true)
: SerialChain<Scalar>(random_parameters) {}
size_t getNumDofs() const override { return N; }
DVec<double> forwardDynamics(
const DVec<double> &y, const DVec<double> &yd, const DVec<double> &tau) const override;
DVec<double> forwardDynamicsReflectedInertia(
const DVec<double> &y, const DVec<double> &yd, const DVec<double> &tau) const override;
DVec<double> forwardDynamicsReflectedInertiaDiag(
const DVec<double> &y, const DVec<double> &yd, const DVec<double> &tau) const override;
DVec<double> inverseDynamics(
const DVec<double> &y, const DVec<double> &yd, const DVec<double> &ydd) const override;
DVec<double> inverseDynamicsReflectedInertia(
const DVec<double> &y, const DVec<double> &yd, const DVec<double> &ydd) const override;
DVec<double> inverseDynamicsReflectedInertiaDiag(
const DVec<double> &y, const DVec<double> &yd, const DVec<double> &ydd) const override;
private:
ClusterTreeModel<Scalar> buildRandomClusterTreeModel() const override;
ClusterTreeModel<Scalar> buildUniformClusterTreeModel() const override;
void appendContactPoints(ClusterTreeModel<Scalar> &model, const int i,
const std::string link_name) const;
};
} // namespace grbda
#endif // GRBDA_ROBOTS_REVOLUTE_CHAIN_WITH_ROTOR_H