I have accurate pitch, roll, and yaw values from an IMU, computed on an arduino. I have good serial comm and am already sending odometry data from the encoders and publishing that on /odom. I know that robot_pose_ekf can take in imu_data through sensor_msgs/imu but cannot figure out how to fill in the pitch, roll, yaw data into:
geometry_msgs/Quaternion orientation
float64[9] orientation_covariance
// Row major about x, y, z axes.
Also, do I need to supply values for angular velocity and linear acceleration? I see that those are part of sensor_msgs/imu, but don't want to send serial data at the rate required to accurately keep up with these velocities and it seems that /odom is doing fine with translation.
geometry_msgs/Vector3 angular_velocity
float64[9] angular_velocity_covariance
//Row major about x, y, z axes
geometry_msgs/Vector3
linear_acceleration float64[9] linear_acceleration_covariance
Row major x, y z
I have gone through the nav tutorials, looked (a lot) at turtlebot code, but just cannot decipher the details of computing the quaternion and properly filling in the covariances.
I did use this in /odom for yaw:
//since all odometry is 6DOF we'll need a quaternion created from yaw
geometry_msgs::Quaternion> odom_quat => tf::createQuaternionMsgFromYaw(th);
but how do you do that for pitch, roll, and yaw in the context of /imu?
Ultimately, I hope to figure out how to publish TwistWithCovariance and PoseWithCovariance, but for now I'll settle for just getting the imu data to robot_pose_ekf.
Thanks for the help!
Originally posted by dan on ROS Answers with karma: 875 on 2013-08-04
Post score: 0