diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cb1df5531fbb4239993de8fbebdd3c6c4abfe6c..6ced02e7d647648931bbe3f35363168c61ea373a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3) - SET(PROJECT_ORG pyrene-dev) SET(PROJECT_NAME talos_data) SET(PROJECT_DESCRIPTION "Talos urdf model, srdf model and other data") diff --git a/src/SpringPlugin.cc b/src/SpringPlugin.cc index 452b09bec50f403beef8713778ac09c9b8f2e413..957c8b5ee6facd92b6a1c8ac823a40bbab9470db 100644 --- a/src/SpringPlugin.cc +++ b/src/SpringPlugin.cc @@ -65,7 +65,11 @@ void SpringPlugin::ExplicitUpdate() { common::Time stepTime = currTime - this->prevUpdateTime; this->prevUpdateTime = currTime; +#if GAZEBO_MAJOR_VERSION < 9 double pos = this->jointExplicit->GetAngle(0).Radian(); +#else + double pos = this->jointExplicit->Position(0); +#endif double vel = this->jointExplicit->GetVelocity(0); double force = -this->kpExplicit * pos - this->kdExplicit * vel; this->jointExplicit->SetForce(0, force);