How to read FT-IMU when FT is read with embObjMultipleFTsensors #583
-
I would like to read the IMU data coming from an FT which is loaded with the Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You should use service |
Beta Was this translation helpful? Give feedback.
-
This service is already used in some robots in IIT:
and can be used with multiple boards even of various type. |
Beta Was this translation helpful? Give feedback.
-
Thank you @marcoaccame and @triccyx for your answers! They are pretty helpful. A working set of configuration files for iCubGenova09 can be found at this PR ami-iit/robots-configuration#17 I will analyze only the configuration files for the left foot FTs. On iCubGenova09 two FTs are connected to the same ems. The specific files I will analyze can be found at this commit: ami-iit/robots-configuration@c51eed1 First of all, I had to add a file related to the physical 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="left_leg-eb8-imu" type="embObjIMU">
<xi:include href="../../general.xml" />
<xi:include href="../../hardware/electronics/left_leg-eb8-j3_5-eln.xml" />
<group name="SERVICE">
<param name="type"> eomn_serv_AS_inertials3 </param>
<group name="PROPERTIES">
<group name="CANBOARDS">
<param name="type"> eobrd_strain2 </param>
<group name="PROTOCOL">
<param name="major"> 0 </param>
<param name="minor"> 0 </param>
</group>
<group name="FIRMWARE">
<param name="major"> 0 </param>
<param name="minor"> 0 </param>
<param name="build"> 0 </param>
</group>
</group>
<group name="SENSORS">
<param name="id"> l_foot_rear_ft_acc l_foot_rear_ft_gyro l_foot_rear_ft_eul l_foot_rear_ft_mag l_foot_rear_ft_stat l_foot_front_ft_acc l_foot_front_ft_gyro l_foot_front_ft_eul l_foot_front_ft_mag l_foot_front_ft_stat</param>
<param name="type"> eoas_imu_acc eoas_imu_gyr eoas_imu_eul eoas_imu_mag eoas_imu_status eoas_imu_acc eoas_imu_gyr eoas_imu_eul eoas_imu_mag eoas_imu_status</param>
<param name="boardType"> strain2 strain2 strain2 strain2 strain2 strain2 strain2 strain2 strain2 strain2</param>
<param name="location"> CAN2:13 CAN2:13 CAN2:13 CAN2:13 CAN2:13 CAN2:14 CAN2:14 CAN2:14 CAN2:14 CAN2:14</param>
</group>
</group>
<group name="SETTINGS">
<param name="acquisitionRate"> 50 </param>
<param name="enabledSensors"> l_foot_rear_ft_acc l_foot_rear_ft_gyro l_foot_rear_ft_eul l_foot_rear_ft_mag l_foot_rear_ft_stat l_foot_front_ft_acc l_foot_front_ft_gyro l_foot_front_ft_eul l_foot_front_ft_mag l_foot_front_ft_stat</param>
</group>
</group>
</device> Once the hardware device has been defined I also added the associated server wrapper. The file is stored in <?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="left_foot-imu_wrapper" type="multipleanalogsensorsserver">
<param name="period"> 10 </param>
<param name="name"> /icub/left_foot/imu </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<!-- The name of the element can be any string (we use SetOfInertials to better express its nature).
Its value must match the device name in the corresponding body_part-jx_y-inertials.xml file
or in body_part-ebX-inertials.xml -->
<elem name="SetOfInertials">left_leg-eb8-imu </elem>
</paramlist>
</action>
<action phase="shutdown" level="5" type="detach" />
</device> I finally added the the following lines in the main xml file opened run by the <xi:include href="hardware/inertials/left_leg-eb8-IMU.xml" />
<xi:include href="wrappers/inertials/left_foot-IMU_wrapper.xml" /> |
Beta Was this translation helpful? Give feedback.
This service is already used in some robots in IIT:
and can be used with multiple boards even of various type.