ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Compute quaternion from angular velocity Twist

asked 2020-04-25 13:12:57 -0500

Younès gravatar image

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 flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-04-25 14:14:46 -0500

pring gravatar image

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)
edit flag offensive delete link more

Comments

Thank you. It works fine.

Younès gravatar image Younès  ( 2020-04-25 17:44:13 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-25 13:12:57 -0500

Seen: 864 times

Last updated: Apr 25 '20