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 port ImuPose (out).

Ports

ImuPose (out)

Data structure
  • struct ::or_pose_estimator::state ImuPose

    • 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), angular velocity and linear acceleration.


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 PublishOrientation flag.


SetBaudrate (attribute)

Inputs
  • long baudrate (default "115200")

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


SetVerbose (function)

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

Set the verbose level.


Stop (function)

Context

Stop the measurements.


ConnectDevice (function)

Throws
  • 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 (function)

Outputs
  • double heading

Throws
  • exception ::IMUDriver::measurement_error

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 ImuPose (out) port.


Tasks

update

Context
  • Frequency 100.0 Hz

Throws
  • exception ::IMUDriver::out_of_mem