Skip to content
Snippets Groups Projects
Commit dfe867d2 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

fix Gazebo 9

parent 3194b1a6
No related branches found
No related tags found
No related merge requests found
Pipeline #6586 passed
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
SET(PROJECT_ORG pyrene-dev) SET(PROJECT_ORG pyrene-dev)
SET(PROJECT_NAME talos_data) SET(PROJECT_NAME talos_data)
SET(PROJECT_DESCRIPTION "Talos urdf model, srdf model and other data") SET(PROJECT_DESCRIPTION "Talos urdf model, srdf model and other data")
......
...@@ -65,7 +65,11 @@ void SpringPlugin::ExplicitUpdate() { ...@@ -65,7 +65,11 @@ void SpringPlugin::ExplicitUpdate() {
common::Time stepTime = currTime - this->prevUpdateTime; common::Time stepTime = currTime - this->prevUpdateTime;
this->prevUpdateTime = currTime; this->prevUpdateTime = currTime;
#if GAZEBO_MAJOR_VERSION < 9
double pos = this->jointExplicit->GetAngle(0).Radian(); double pos = this->jointExplicit->GetAngle(0).Radian();
#else
double pos = this->jointExplicit->Position(0);
#endif
double vel = this->jointExplicit->GetVelocity(0); double vel = this->jointExplicit->GetVelocity(0);
double force = -this->kpExplicit * pos - this->kdExplicit * vel; double force = -this->kpExplicit * pos - this->kdExplicit * vel;
this->jointExplicit->SetForce(0, force); this->jointExplicit->SetForce(0, force);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment