Skip to content

Commit

Permalink
Merge pull request #99 from ye-luo-xi-tui/master
Browse files Browse the repository at this point in the history
Fix bug
  • Loading branch information
ye-luo-xi-tui authored Feb 5, 2023
2 parents 646a88f + 0b56ad7 commit ae4facf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rm_gazebo/src/rm_robot_hw_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ void RmRobotHWSim::readSim(ros::Time time, ros::Duration period)
imu.angular_vel[0] = rate.X();
imu.angular_vel[1] = rate.Y();
imu.angular_vel[2] = rate.Z();
ignition::math::Vector3d gravity = {0., 0., -9.81};
ignition::math::Vector3d accel = imu.linkPrt_->RelativeLinearAccel() - pose.Rot().RotateVectorReverse(gravity);

ignition::math::Vector3d gravity = { 0., 0., -9.81 };
ignition::math::Vector3d accel = imu.link_ptr->RelativeLinearAccel() - pose.Rot().RotateVectorReverse(gravity);
imu.linear_acc[0] = accel.X();
imu.linear_acc[1] = accel.Y();
imu.linear_acc[2] = accel.Z();
Expand Down

0 comments on commit ae4facf

Please sign in to comment.