Skip to content

Commit

Permalink
Adapt Gazebo plugin to Gazebo 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rubmascaro committed Dec 9, 2019
1 parent 7ec4ffe commit 66f6cdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gazebo_poltergeist_gimbal_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class GazeboPoltergeistGimbalPlugin : public ModelPlugin {
if (joints_[joint_index] != nullptr)
return ConvertAngle180(
std::fmod(
joints_[joint_index]->GetAngle(0).Degree() + 72000000.0, 360.0));
joints_[joint_index]->Position(0) * (180 / M_PI) + 72000000.0, 360.0));

return -1e16;
}
Expand All @@ -225,9 +225,9 @@ class GazeboPoltergeistGimbalPlugin : public ModelPlugin {
double test_math() {
double joint_index = 1;
ROS_INFO_STREAM(
" 1: " << joints_[joint_index]->GetAngle(0).Degree() << " 2: "
" 1: " << joints_[joint_index]->Position(0) * (180 / M_PI) << " 2: "
<< std::fmod(
joints_[joint_index]->GetAngle(0).Degree() + 72000000.0,
joints_[joint_index]->Position(0) * (180 / M_PI) + 72000000.0,
360.0)
<< " 3: " << GetJointPosition(1) << " 4: "
<< GetJointPosition(joint_index) - base_points_[joint_index] +
Expand Down

0 comments on commit 66f6cdd

Please sign in to comment.