Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse order of rotation offset (rpyOffset) calculation in p3d and imu plugins #1241

Open
wants to merge 4 commits into
base: melodic-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gazebo_plugins/src/gazebo_ros_imu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void GazeboRosIMU::UpdateChild()
rot = pose.Rot();

// apply rpy offsets
rot = this->offset_.Rot()*rot;
rot = rot*this->offset_.Rot();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to condition this based on what version of libsdformat is being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added version check in fca594d. It assumes that the release will be made in sdformat 6.3.0 and forward ported though. So we'll need to merge and release the sdformat pull request first

rot.Normalize();

// get Rates
Expand Down
2 changes: 1 addition & 1 deletion gazebo_plugins/src/gazebo_ros_p3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ void GazeboRosP3D::UpdateChild()
// apply xyz offsets and get position and rotation components
pose.Pos() = pose.Pos() + this->offset_.Pos();
// apply rpy offsets
pose.Rot() = this->offset_.Rot()*pose.Rot();
pose.Rot() = pose.Rot()*this->offset_.Rot();
pose.Rot().Normalize();

// compute accelerations (not used)
Expand Down