10 #include <sensor_msgs/Imu.h> 16 double d_roll, d_pitch, d_yaw;
17 static double roll, pitch, yaw;
21 q.setX(imu_in->orientation.x);
22 q.setY(imu_in->orientation.y);
23 q.setZ(imu_in->orientation.z);
24 q.setW(imu_in->orientation.w);
28 m.
getRPY(d_roll, d_pitch, d_yaw);
34 q.
setRPY(roll, pitch, yaw);
41 int main(
int argc,
char *argv[])
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROSCPP_DECL void spin(Spinner &spinner)
int main(int argc, char *argv[])
void setRPY(const tfScalar &roll, const tfScalar &pitch, const tfScalar &yaw)
void getRPY(tfScalar &roll, tfScalar &pitch, tfScalar &yaw, unsigned int solution_number=1) const
void imuCallback(const sensor_msgs::ImuConstPtr &imu_in)