- changed status to resolved
CControllerGc does not set actuator torques
Issue #209
resolved
Patch for fix:
$ git diff ../../src/scl/control/gc/CControllerGc.cpp
diff --git a/src/scl/control/gc/CControllerGc.cpp b/src/scl/control/gc/CControllerGc.cpp
index c4162f5..c7c7423 100644
--- a/src/scl/control/gc/CControllerGc.cpp
+++ b/src/scl/control/gc/CControllerGc.cpp
@@ -72,6 +72,8 @@ namespace scl
// We do not use the centrifugal/coriolis forces. They can cause instabilities.
data_->des_force_gc_ = data_->gc_model_->M_gc_ * tmp3 - data_->gc_model_->force_gc_grav_;
+ // copy to actuator force
+ data_->io_data_->actuators_.force_gc_commanded_ = data_->des_force_gc_;
return true;
}
@@ -97,6 +99,8 @@ namespace scl
// We do not use the centrifugal/coriolis forces. They can cause instabilities.
data_->des_force_gc_ = data_->gc_model_->M_gc_ * tmp3 - data_->gc_model_->force_gc_grav_;
+ // copy to actuator force
+ data_->io_data_->actuators_.force_gc_commanded_ = data_->des_force_gc_;
return true;
}
@@ -134,6 +138,8 @@ namespace scl
// We do not use the centrifugal/coriolis forces. They can cause instabilities.
data_->des_force_gc_ = data_->gc_model_->M_gc_ * tmp3 - data_->gc_model_->force_gc_grav_;
+ // copy to actuator force
+ data_->io_data_->actuators_.force_gc_commanded_ = data_->des_force_gc_;
return true;
}
@@ -151,6 +157,9 @@ namespace scl
data_->des_force_gc_ = data_->gc_model_->M_gc_ * tmp1 - data_->gc_model_->force_gc_grav_;
+ // copy to actuator force
+ data_->io_data_->actuators_.force_gc_commanded_ = data_->des_force_gc_;
+
#ifdef DEBUG
Eigen::VectorXd tmp2 = data_->gc_model_->M_gc_ * tmp1;
std::cout<<"\n******* F* *******\n"<<tmp1.transpose()
Comments (2)
-
repo owner -
reporter Thanks!
- Log in to comment
Fixed as of 7dea9716b9abcfc23a727f6b9e11f08d1dd3f02a