iCub-main

imuFilter.h device driver for apply a filter to remove gyro bias

+ Collaboration diagram for imuFilter:

imuFilter.h device driver for apply a filter to remove gyro bias

This device driver applies filtering to remove gyro bias.
At startup it tries to attach directly to the IMU devcice of the specified robot or through a MultipleAnalogSensorsClient(using the subdevice mechanism).

Parameters

–name("imuFilter") // module's name; all the open ports will be tagged with the prefix /name.

–robot("icub") // name of the robot to connect to.

–gyro-order(5) // Order of the median filter for the gyro data

–mag-order(51) // Order of the median filter for the magnetometer data.

–mag-vel-thres-up(0.04) // Magnetic field up-threshold for stopping bias adaption.

–mag-vel-thres-down(0.02) // Magnetic field down-threshold for starting bias adaption.

–bias-gain(0.001) // Gain to integrate gyro bias.

–verbose(false) // If specified enable verbosity.

–proxy-remote // Required only if run with multipleanalgosensorsclient as subdevice, port prefix of the multipleanalogsensorsserver publishing the imu.

–proxy-local // Required only if run with multipleanalgosensorsclient as subdevice, port prefix of the multipleanalogsensorsclinet to be created.

how to run the imuFilter

The imuFilter can be instantiated using the yarprobotinterface with the following xml files:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="head-imuFilter" type="imuFilter">
<param name="period"> 10 </param>
<param name="name"> /imuFilter </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
à°␁<F
ÏDßX␅
or in body_part-ebX-inertials.xml -->
<elem name="SetOfIMUs"> head-inertial</elem>
</paramlist>
</action>
<action phase="shutdown" level="5" type="detach" />
</device
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="head-imuFilter_wrapper" type="multipleanalogsensorsserver">
<param name="period"> 10 </param>
<param name="name"> /imuFilter </param>
<action phase="startup" level="6" type="attach">
<paramlist name="networks">
ˆ/ßX␅
ÏDßX␅
or in body_part-ebX-inertials.xml -->
<elem name="SetOfIMUs"> head-imuFilter </elem>
</paramlist>
</action>
<action phase="shutdown" level="6" type="detach" />
</device>

Alternatively it can be run using yarpdev through this command line:

yarpdev –device imuFilter –subdevice multipleanalogsensorsclient –proxy-remote MASServerName –proxy-local MASClientName

Usage

The canonical way to use the imuFilter is to instantiate in the client code a MultipleAnalogSensorsClient specifying as <remote> argument the <name> used for the imuFilter.

Another way is reading through the streaming port <name>/measures:o.

Ports Created

The imuFilter device is executed combined with the network wrapper multipleanalogsensorsserver. It opens the followig ports:

Output ports:

Author
Ugo Pattacini, Nicolo' Genesio