WHILL / ros_whill

ROS Package for WHILL Model CR
https://whill.jp/model-cr
MIT License
34 stars 25 forks source link

Fix imu data #29

Closed Raku0130 closed 2 years ago

Raku0130 commented 2 years ago

The IMU data is disabled in the latest version because it is not reliable. #28 However, the IMU data sent from WHILL is the raw IMU data, not the degree per sec. Therefore, the correct value can be obtained by calculating according to the resolution. IMU datasheet

IMU topic after fixation

header: 
  seq: 668
  stamp: 
    secs: 1636746109
    nsecs: 851973746
  frame_id: "imu"
orientation: 
  x: 0.0
  y: 0.0
  z: 0.0
  w: 0.0
orientation_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity: 
  x: 0.03861642504603308
  y: -0.15885998303419815
  z: -0.08349137415125084
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration: 
  x: 7.411364327458609
  y: 0.0323222156099794
  z: -6.41176988174258
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

When this acceleration data is converted to acceleration at base_link, it looks like this. We can see that the gravitational acceleration is correctly observed and the IMU is functioning properly.

header: 
  seq: 61805
  stamp: 
    secs: 1636743368
    nsecs: 570296019
  frame_id: "base_link"
orientation: 
  x: 0.0
  y: 0.0
  z: 0.0
  w: 0.0
orientation_covariance: [0.0, 0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, 0.0]
angular_velocity: 
  x: 0.040097561229167966
  y: 0.1577947023432809
  z: -0.08478847122633333
angular_velocity_covariance: [0.0, 0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, 0.0]
linear_acceleration: 
  x: 0.03595979966291285
  y: 0.004788476388188037
  z: -9.797482665167069
linear_acceleration_covariance: [0.0, 0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, 0.0]

IMU is disabled in the latest version, but can it be re-enabled?

s-katsu commented 2 years ago

Thank you for your proposal.

the IMU data sent from WHILL is the raw IMU data, not the degree per sec.

This is correct.

The detail is described in this document

https://github.com/WHILL/whill_control_system_protocol_specification/blob/master/WHILL_Control_System_Protocl_Specification.pdf

Also, as mentioned about the mounting position, it is mounted at an angle to the fuselage, so it is not subject to gravitational acceleration in only one axis.

Also, I am sorry to say that we excluded IMU data from ros_whill because it is difficult to use for robotics due to the accuracy of the sensor, and it is difficult to handle due to the mounting position of the sensor. Therefore, even if the data is correct, we do not plan to officially support IMU data. There is no problem to use IMU Data in the fork.

Raku0130 commented 2 years ago

Sorry. I wasn't aware of that document.

I understand now why you excluded it from ros_whill. Thank you for the explanation.