From e4b8b59ee45a3c05370a4d72ff5def91734747e2 Mon Sep 17 00:00:00 2001 From: Naoki-Hiraoka Date: Wed, 11 Dec 2019 15:46:02 +0900 Subject: [PATCH 1/2] [IOBPlugin.cpp]use SetParam(vel) instead of SetVelocity() --- hrpsys_gazebo_general/src/IOBPlugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hrpsys_gazebo_general/src/IOBPlugin.cpp b/hrpsys_gazebo_general/src/IOBPlugin.cpp index af2d86ea..19333a59 100644 --- a/hrpsys_gazebo_general/src/IOBPlugin.cpp +++ b/hrpsys_gazebo_general/src/IOBPlugin.cpp @@ -975,7 +975,12 @@ void IOBPlugin::UpdatePID_Velocity_Control(double _dt) { this->robotState.kpv_position[i]); #endif // apply velocity to joint +#if __cplusplus >= 201103L + this->joints[i]->SetParam("vel", 0, j_velocity); +#else this->joints[i]->SetVelocity(0, j_velocity); +#endif + } } From 4747e0362ad46ba1582aeb9a48515f8a7fa1bc16 Mon Sep 17 00:00:00 2001 From: Naoki-Hiraoka Date: Wed, 11 Dec 2019 15:46:43 +0900 Subject: [PATCH 2/2] [IOBPlugin.cpp]use SetParam(fmax) --- hrpsys_gazebo_general/src/IOBPlugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/hrpsys_gazebo_general/src/IOBPlugin.cpp b/hrpsys_gazebo_general/src/IOBPlugin.cpp index 19333a59..3117072a 100644 --- a/hrpsys_gazebo_general/src/IOBPlugin.cpp +++ b/hrpsys_gazebo_general/src/IOBPlugin.cpp @@ -963,6 +963,7 @@ void IOBPlugin::UpdatePID_Velocity_Control(double _dt) { // update max force #if __cplusplus >= 201103L this->joints[i]->SetParam("max_force", 0, this->joints[i]->GetEffortLimit(0)); + //this->joints[i]->SetParam("fmax", 0, this->joints[i]->GetEffortLimit(0)); #else this->joints[i]->SetMaxForce(0, this->joints[i]->GetEffortLimit(0)); #endif