33 #include <Rcs_macros.h> 34 #include <Rcs_typedef.h> 40 fixedInitState(fixedInitState)
43 platform = RcsGraph_getBodyByName(graph,
"ImetronPlatform");
45 rail = RcsGraph_getBodyByName(graph,
"RailBot");
47 link2L = RcsGraph_getBodyByName(graph,
"lbr_link_2_L");
49 link4L = RcsGraph_getBodyByName(graph,
"lbr_link_4_L");
69 min[2] = RCS_DEG2RAD(-10.);
70 max[2] = RCS_DEG2RAD(10.);
73 min[4] = RCS_DEG2RAD(20.);
74 max[4] = RCS_DEG2RAD(60.);
75 min[5] = RCS_DEG2RAD(70.);
76 max[5] = RCS_DEG2RAD(95.);
81 return {
"base_x",
"base_y",
"base_theta",
"rail_z",
"joint_2_L",
"joint_4_L"};
86 bool b0, b1, b2, b3, b4, b5;
90 b0 = RcsGraph_setJoint(
graph,
"DofBaseX", 0.);
91 b1 = RcsGraph_setJoint(
graph,
"DofBaseY", 0.);
92 b2 = RcsGraph_setJoint(
graph,
"DofBaseThZ", 0.);
93 b3 = RcsGraph_setJoint(
graph,
"DofChestZ", 0.8);
94 b4 = RcsGraph_setJoint(
graph,
"lbr_joint_2_L", RCS_DEG2RAD(30));
95 b5 = RcsGraph_setJoint(
graph,
"lbr_joint_4_L", RCS_DEG2RAD(90));
98 b0 = RcsGraph_setJoint(
graph,
"DofBaseX", initialState->ele[0]);
99 b1 = RcsGraph_setJoint(
graph,
"DofBaseY", initialState->ele[1]);
100 b2 = RcsGraph_setJoint(
graph,
"DofBaseThZ", initialState->ele[2]);
101 b3 = RcsGraph_setJoint(
graph,
"DofChestZ", initialState->ele[3]);
102 b4 = RcsGraph_setJoint(
graph,
"lbr_joint_2_L", initialState->ele[4]);
103 b5 = RcsGraph_setJoint(
graph,
"lbr_joint_4_L", initialState->ele[5]);
106 if (!(b0 && b1 && b2 && b3 && b4 && b5)) {
107 throw std::invalid_argument(
"Setting graph failed for at least one of the joints!");
virtual std::vector< std::string > getNames() const
unsigned int getDim() const override
virtual ~ISSBoxShelving()
void getMinMax(double *min, double *max) const override
void applyInitialState(const MatNd *initialState) override
ISSBoxShelving(RcsGraph *graph, bool fixedInitState)