Compute quaternion from angular velocity Twist

Hi,

I'm using ROS melodic with kitti bag file. I'm running Ubuntu 18.04 on i7 , with kernel 5.3.0-42-generic. I get the odometry of a Kitti bag file with viso2_ros. I want to predict the poses of the robot. To compute the next pose I should compute the quaternion of the robot. How can I compute it from angular velocity?

Thanks

edit retag close merge delete

Sort by » oldest newest most voted

Quaternions are the angular part of a non-moving pose. Angular velocity is a measurement of how fast an object is rotating about a certain point.

If you're looking for prediction, I suggest using forward Euler.

theta_t = theta_t-1 + omega_theta * dtheta/dt

Where theta is an angle and omega is the angular velocity.

You'll likely want to convert between quaternion and euler notation, in which ros has the following functions

import tf
quat = tf.transformations.quaternion_from_euler(roll, pitch, yaw)
(roll, pitch, yaw) = tf.transformations.euler_from_quaternion(quat)
more