rby1-sdk
Loading...
Searching...
No Matches
model.h
1#pragma once
2
3#include <array>
4#include <string>
5
6#include "dynamics/robot.h"
7#include "export.h"
8
9namespace rb::y1_model {
10
17class RBY1_SDK_API A {
18 public:
20 static constexpr std::string_view kModelName = "A";
21
23 static constexpr size_t kRobotDOF = 24;
24
31 static constexpr std::array<std::string_view, kRobotDOF> kRobotJointNames = {
32 "right_wheel", "left_wheel", "torso_0", "torso_1", "torso_2", "torso_3",
33 "torso_4", "torso_5", "right_arm_0", "right_arm_1", "right_arm_2", "right_arm_3",
34 "right_arm_4", "right_arm_5", "right_arm_6", "left_arm_0", "left_arm_1", "left_arm_2",
35 "left_arm_3", "left_arm_4", "left_arm_5", "left_arm_6", "head_0", "head_1"};
36
42 static constexpr std::array<unsigned int, 2> kMobilityIdx = {0, 1};
43
49 static constexpr std::array<unsigned int, 20> kBodyIdx = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
50 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};
51
53 static constexpr std::array<unsigned int, 2> kHeadIdx = {22, 23};
54
56 static constexpr std::array<unsigned int, 7> kRightArmIdx = {8, 9, 10, 11, 12, 13, 14};
57
59 static constexpr std::array<unsigned int, 7> kLeftArmIdx = {15, 16, 17, 18, 19, 20, 21};
60
62 static constexpr std::array<unsigned int, 6> kTorsoIdx = {2, 3, 4, 5, 6, 7};
63
69 static constexpr std::array<unsigned int, 20> kVelocityEstimationRequiredIdx = kBodyIdx;
70
72 static constexpr double kControlPeriod = 0.002;
73
76
79};
80
88class RBY1_SDK_API M {
89 public:
90 static constexpr std::string_view kModelName = "M";
91
92 static constexpr size_t kRobotDOF = 26;
93
94 static constexpr std::array<std::string_view, kRobotDOF> kRobotJointNames = {
95 "wheel_fr", "wheel_fl", "wheel_rr", "wheel_rl", "torso_0", "torso_1", "torso_2",
96 "torso_3", "torso_4", "torso_5", "right_arm_0", "right_arm_1", "right_arm_2", "right_arm_3",
97 "right_arm_4", "right_arm_5", "right_arm_6", "left_arm_0", "left_arm_1", "left_arm_2", "left_arm_3",
98 "left_arm_4", "left_arm_5", "left_arm_6", "head_0", "head_1"};
99 static constexpr std::array<unsigned int, 4> kMobilityIdx = {0, 1, 2, 3};
100 static constexpr std::array<unsigned int, 20> kBodyIdx = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
101 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
102 static constexpr std::array<unsigned int, 2> kHeadIdx = {24, 25};
103 static constexpr std::array<unsigned int, 7> kRightArmIdx = {10, 11, 12, 13, 14, 15, 16};
104 static constexpr std::array<unsigned int, 7> kLeftArmIdx = {17, 18, 19, 20, 21, 22, 23};
105 static constexpr std::array<unsigned int, 6> kTorsoIdx = {4, 5, 6, 7, 8, 9};
106 static constexpr std::array<unsigned int, 20> kVelocityEstimationRequiredIdx = kBodyIdx;
107
108 static constexpr double kControlPeriod = 0.002;
109
112};
113
118class RBY1_SDK_API UB {
119 public:
120 static constexpr std::string_view kModelName = "UB";
121
122 static constexpr size_t kRobotDOF = 18;
123
124 static constexpr std::array<std::string_view, kRobotDOF> kRobotJointNames = {
125 "torso_hp", "torso_5", "right_arm_0", "right_arm_1", "right_arm_2", "right_arm_3",
126 "right_arm_4", "right_arm_5", "right_arm_6", "left_arm_0", "left_arm_1", "left_arm_2",
127 "left_arm_3", "left_arm_4", "left_arm_5", "left_arm_6", "head_0", "head_1"};
128 static constexpr std::array<unsigned int, 0> kMobilityIdx = {};
129 static constexpr std::array<unsigned int, 16> kBodyIdx = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
130 static constexpr std::array<unsigned int, 2> kHeadIdx = {16, 17};
131 static constexpr std::array<unsigned int, 7> kRightArmIdx = {2, 3, 4, 5, 6, 7, 8};
132 static constexpr std::array<unsigned int, 7> kLeftArmIdx = {9, 10, 11, 12, 13, 14, 15};
133 static constexpr std::array<unsigned int, 2> kTorsoIdx = {0, 1};
134 static constexpr std::array<unsigned int, 16> kVelocityEstimationRequiredIdx = kBodyIdx;
135
136 static constexpr double kControlPeriod = 0.002;
137
140};
141
142} // namespace rb::y1_model
Definition state.h:10
Definition state.h:13
Represents the model description of Robot A.
Definition model.h:17
Represents the model description of Robot M.
Definition model.h:88
Represents the model description of Robot UB.
Definition model.h:118