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

Revision history [back]

Assuming the x and y axes of your IMU are aligned with your robot and you want the x and y velocities with respect to the robot:

delta_t = time between accelerometer readings

loop:
velocity_x = (accel_x * delta_t) + previous_velocity_x
velocity_y = (accel_y * delta_t) + previous_velocity_y
previous_velocity_x = velocity_x
previous_velocity_y = velocity_y

Assuming the x and y axes of your IMU are aligned with your robot and you want the x and y velocities with respect to the robot:

delta_t = time between accelerometer readings

loop:
velocity_x = += (accel_x * delta_t) + previous_velocity_x
 velocity_y = += (accel_y * delta_t) + previous_velocity_y
previous_velocity_x = velocity_x
previous_velocity_y = velocity_y
delta_t)