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

transforming linear acceleration - robot_localization

asked 2020-09-24 18:17:24 -0600

JadTawil gravatar image

While inspecting the robot_localization source code, i see the following in line 2469 of ros_filter.cpp:

  // Transform to correct frame
  // @todo: This needs to take into account offsets from the origin. Right now,
  // it assumes that if the sensor is placed at some non-zero offset from the
  // vehicle's center, that the vehicle turns with constant velocity. This needs
  // to be something like
  // accTmp = targetFrameTrans.getBasis() * accTmp - targetFrameTrans.getOrigin().cross(rotation_acceleration);
  // We can get rotational acceleration by differentiating the rotational velocity
  // (if it's available)
  accTmp = targetFrameTrans.getBasis() * accTmp;
  maskAcc = targetFrameTrans.getBasis() * maskAcc;

I am curious, why are we assuming that the imu is not offset from the center of the robot? Clearly on most robots this will be the case.. It seems like the correct code is commented out. Also, it seems like this is done properly in prepareTwist() line 3006:

  // Transform to correct frame. Note that we can get linear velocity
  // as a result of the sensor offset and rotational velocity
  measTwistRot = targetFrameTrans.getBasis() * measTwistRot;
  twistLin = targetFrameTrans.getBasis() * twistLin + targetFrameTrans.getOrigin().cross(stateTwistRot);
  maskLin = targetFrameTrans.getBasis() * maskLin;
  maskRot = targetFrameTrans.getBasis() * maskRot;

Any clarification!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-09-29 05:02:06 -0600

Tom Moore gravatar image

I am curious, why are we assuming that the imu is not offset from the center of the robot?

We aren't. :) The comment is marked as todo, which means I know it needs to be done, but I didn't have the cycles to test it. But I welcome PRs.

edit flag offensive delete link more

Comments

No problem, I will uncomment and try.

Another couple questions, can you provide some references for the mathematics involved in transforming the angular velocities and linear accelerations from one frame to another?

What advise would you give for performing an extrinsic calibration between IMU and base_link on a real robot?

JadTawil gravatar image JadTawil  ( 2020-09-29 05:59:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-24 18:17:24 -0600

Seen: 239 times

Last updated: Sep 29 '20