Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
replaced 3.14... with M_PI
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhouURI committed Jan 6, 2023
1 parent 8559e11 commit aef32ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alpha_localization/src/imu_ned_enu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ IMUNedEnu::IMUNedEnu() {

m_pnh.reset(new ros::NodeHandle("~"));

m_pnh->param<std::string>("frame_id", m_frame_id, "/imu");
m_pnh->param<std::string>("frame_id", m_frame_id, "imu");

}

Expand Down Expand Up @@ -89,7 +89,7 @@ void IMUNedEnu::f_imu_callback2(const sensor_msgs::ImuConstPtr& msg) {
tf::Matrix3x3(q).getRPY(roll, pitch, yaw);

tf2::Quaternion newq;
newq.setRPY(roll-3.1415926, -pitch, -yaw + 3.1415926/2);
newq.setRPY(roll-M_PI, -pitch, -yaw + M_PI_2);

newq = newq.normalize();

Expand Down

0 comments on commit aef32ff

Please sign in to comment.