Project

General

Profile

IMUDriver component

This is the IMUDriver component from the GenoM3 OSMOSIS show case. It controls an xsence IMU.

It produces a pose_estimator in two ports IMU_Orientation (out) (not intrinsic) and IMU_AngVel_LinAcc (out) (intrinsic).

Ports

IMU_AngVel_LinAcc (out)

Data structure
  • struct ::or_pose_estimator::state IMU_AngVel_LinAcc

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::pos_cov > pos_cov

      • double cov[6]

    • optional< struct ::or::t3d::att_cov > att_cov

      • double cov[10]

    • optional< struct ::or::t3d::att_pos_cov > att_pos_cov

      • double cov[12]

    • optional< struct ::or::t3d::vel_cov > vel_cov

      • double cov[6]

    • optional< struct ::or::t3d::avel_cov > avel_cov

      • double cov[6]

    • optional< struct ::or::t3d::acc_cov > acc_cov

      • double cov[6]

    • optional< struct ::or::t3d::aacc_cov > aacc_cov

      • double cov[6]

The pose_estimator produced by the IMU: angular velocity and linear acceleration (intrinsic).


IMU_Orientation (out)

Data structure
  • struct ::or_pose_estimator::state IMU_Orientation

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::pos_cov > pos_cov

      • double cov[6]

    • optional< struct ::or::t3d::att_cov > att_cov

      • double cov[10]

    • optional< struct ::or::t3d::att_pos_cov > att_pos_cov

      • double cov[12]

    • optional< struct ::or::t3d::vel_cov > vel_cov

      • double cov[6]

    • optional< struct ::or::t3d::avel_cov > avel_cov

      • double cov[6]

    • optional< struct ::or::t3d::acc_cov > acc_cov

      • double cov[6]

    • optional< struct ::or::t3d::aacc_cov > aacc_cov

      • double cov[6]

The pose_estimator produced by the IMU: orientation quaternion (ENU) (not intrinsic).


Services

SetDevice (attribute)

Inputs
  • string device (default "/dev/xsens")

Set the device name for com.


SetPublishOrientation (attribute)

Inputs
  • boolean publish_orientation (default "1")

Set the publish_orientation flag.


SetPublishAngularVelocity (attribute)

Inputs
  • boolean publish_ang_vel (default "1")

Set the publish_ang_vel flag.


SetPublishLinearAcceleration (attribute)

Inputs
  • boolean publish_lin_acc (default "1")

Set the publish_lin_acc flag.


SetBaudrate (attribute)

Inputs
  • long baudrate (default "115200")

Set the speed for com. By default 115200 for serial line and useless for USB.


GetAvelBias (attribute)

Outputs
  • struct ::or::t3d::avel avel_bias_applied_in_measure

    • double wx

    • double wy

    • double wz

Get the avel bias applied in the measurement.


SetVerbose (function)

Inputs
  • long verbose_level (default "0") Verbose level

Set the verbose level.


Stop (function)

Context

Stop the measurements.


ConnectDevice (activity)

Throws
  • exception ::IMUDriver::out_of_mem

  • exception ::IMUDriver::cant_open_device

  • exception ::IMUDriver::cant_set_parameter

  • exception ::IMUDriver::out_of_mem

Context

Connect the serial line to the hadware device (xsense)


GetHeading (activity)

Outputs
  • double heading

Throws
  • exception ::IMUDriver::out_of_mem

  • exception ::IMUDriver::measurement_error

Context

Get the imu heading


Measure (activity)

Throws
  • exception ::IMUDriver::out_of_mem

  • exception ::IMUDriver::measurement_start_error

  • exception ::IMUDriver::measurement_error

  • exception ::IMUDriver::bad_imu_pose_port

Context

Read a measure from the serial line and publish in the [IMU_Orientation and IMU_AngVel_LinAcc] port.


EstimateAVelBias (activity)

Inputs
  • short seconds

Outputs
  • struct ::or::t3d::avel avel_bias_out

    • double wx

    • double wy

    • double wz

  • long sample

Throws
  • exception ::IMUDriver::out_of_mem

Context

Estimate the bias on angular velocity


SetMeasureAVelBias (activity)

Inputs
  • struct ::or::t3d::avel avel_bias

    • double wx (default "0")

    • double wy (default "0")

    • double wz (default "0")

Throws
  • exception ::IMUDriver::out_of_mem

Context

Set the Bias within the measurement.


Tasks

update

Context
  • Free running

Throws
  • exception ::IMUDriver::out_of_mem