We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9e88726 + 9148d17 commit a41fef3Copy full SHA for a41fef3
mjpc/agent.cc
@@ -73,6 +73,19 @@ void Agent::Initialize(const mjModel* model) {
73
if (model_) mj_deleteModel(model_);
74
model_ = mj_copyModel(nullptr, model); // agent's copy of model
75
76
+ // check for limits on all actuators
77
+ int num_missing = 0;
78
+ for (int i = 0; i < model_->nu; i++) {
79
+ if (!model_->actuator_ctrllimited[i]) {
80
+ num_missing++;
81
+ printf("%s (actuator %i) missing limits\n",
82
+ model_->names + model_->name_actuatoradr[i], i);
83
+ }
84
85
+ if (num_missing > 0) {
86
+ mju_error("Ctrl limits required for all actuators.\n");
87
88
+
89
// planner
90
planner_ = GetNumberOrDefault(0, model, "agent_planner");
91
0 commit comments