Ask Your Question
0

[robot_localization] imu data frames and format

asked 2019-09-11 09:52:25 -0500

davidllp gravatar image

Hi everyone,

we've been some time trying to configure our robot_localization node without success and we started wondering if all the data is expressed correctly. We've checked the forums and rep but we still have some uncertainties/confusion with regards to the IMU data. Could you please review the following imu data/configuration?

IMU position in the robot

The imu frame_id is the xsens and the robot frame_id is the base_link. There is a rotation of 180º and a small translation between them, hence, there is a static transform declared as:

header:
  seq: 0
  stamp:
    secs: 1568211169
    nsecs:  84573437
  frame_id: "base_link"
child_frame_id: "xsens"
transform:
  translation:
    x: -0.149
    y: 0.00282
    z: -0.09554
  rotation:
    x: 0.0
    y: 0.0
    z: 1.0
    w: -1.03411553555e-13

IMU message and data format

A message sample:

header:
  seq: 15568
  stamp:
    secs: 1568187188
    nsecs: 501295089
  frame_id: "xsens"
orientation:
  x: 0.00370850449759
  y: 0.00397378783653
  z: 0.970476713346
  w: -0.241133583015
orientation_covariance: [0.00030461741978670857, 0.0, 0.0, 0.0, 0.00030461741978670857, 0.0, 0.0, 0.0, 0.024674011002723394]
angular_velocity:
  x: 0.0198734942824
  y: -0.0251334197819
  z: 0.0117437923327
angular_velocity_covariance: [1.9038588736669286e-05, 0.0, 0.0, 0.0, 1.9038588736669286e-05, 0.0, 0.0, 0.0, 1.9038588736669286e-05]
linear_acceleration:
  x: 0.599029839039
  y: 0.185431167483
  z: 9.05651855469
linear_acceleration_covariance: [0.0004, 0.0, 0.0, 0.0, 0.0004, 0.0, 0.0, 0.0, 0.0004]

Message data explanation:

orientation: the orientation.x reports the rotation along the longitudinal axis of the imu, the orientation.y reports the rotation along the transversal axis of the imu and, the orientation.z reports the rotation along the global Z axis (gravity direction) CCW w.r.t. the True East. Are these values correct w.r.t. the specified by the robot_localization: ENU frame? Specifically we are concerned by the fact that roll and pitch aren't aligned with East and North.

angular_velocity: expressed in the frames of the imu. angular_velocity.x along the longitudinal imu axis, angular_velocity.y along the transversal imu axis and , angular_velocity.z along the perpendicular axis defined by x and y.

linear_acceleration: expressed in the same frames as the angular velocity. Also, it reports the data as specified in the robot localization documentation as right-side-up.

Is the configuration of the imu data correct?

Thank you in advanced.

edit retag flag offensive close merge delete

Comments

What is the issue that youre trying to fix?

stevemacenski gravatar imagestevemacenski ( 2019-09-11 10:48:53 -0500 )edit

More than fixing, the issue I'm trying to figure out is if the provided data by the IMU is correct to use with the robot_localization package or it needs further modifications in order to comply with what the package is expecting?

davidllp gravatar imagedavidllp ( 2019-09-11 10:56:01 -0500 )edit

Fixing _what_ exactly? You haven't described your issue at all

stevemacenski gravatar imagestevemacenski ( 2019-09-11 10:57:14 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-11 11:18:57 -0500

pavel92 gravatar image

updated 2019-09-11 11:27:47 -0500

The transform looks ok. You did not mention but by the frame_id I guess you are using xsens imu.

Are these values correct w.r.t. the specified by the robot_localization: ENU frame?

They should be since according to the driver we have this:

~frame_local (string, default: ENU)
    the desired orientation of the ~frame_id reference frame

Since the sensor_msgs/Imu accelerations are in m/s^2 , and rotational velocityin rad/sec you can easily check if the values make sense by simple moving the imu around (not so easy for the quaternions but you can write a converter function to convert to degrees and simply print them out).

I am not sure if the imu data you posted was from stationary or while moving the imu (I see linear acc of 9 m/s^2 so I guess it was moving). If it was stationary then something might be wrong.


You also did not post your imu configuration that you are feeding into the robot_localization but you can check the configuration documentation.
If you are trying to run robot_localization with just imu check this answer.

edit flag offensive delete link more

Comments

In fact, it doesn't really matter if the imu is a xsens or not, because what I am asking is if the data in the message complies with robot_localization. Regarding what the imu provides, the imu driver says it's ENU, however, the point is that I don't know if the definition of ENU is the same for the imu driver and for the robot_localization (where REP-103 defines ENU as x axis pointing to East and y axis pointing to North). Regarding the acceleration, the 9 m/s^2 is the gravity, so regardless of the fact that the imu is static or moving, it will appear. Furthermost, the specific configuration of the imu in the robot_localization package is meaningless if the input data is wrong, which is my actual question here.

davidllp gravatar imagedavidllp ( 2019-09-11 11:31:42 -0500 )edit

Yeah my bad, completely forgot about the gravity part. I think the message and the driver compiles with REP-103 and REP-105 but I am not sure if the imu needs any specific configuration before use.

pavel92 gravatar imagepavel92 ( 2019-09-11 11:47:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-09-11 09:52:25 -0500

Seen: 23 times

Last updated: Sep 11