Skip to content

Commit

Permalink
Replace embObjInertials w/ embObjIMU
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene committed Nov 13, 2023
1 parent f99a887 commit 6e86d07
Show file tree
Hide file tree
Showing 185 changed files with 2,315 additions and 1,593 deletions.
50 changes: 25 additions & 25 deletions ergoCubSN000/hardware/skin/torso-ems5-inertial_gyro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,54 @@
<!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="torso_inertialGYRO" type="embObjInertials">
<xi:include href="../../general.xml" />

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="torso_inertialGYRO" type="embObjIMU">

<xi:include href="../../general.xml" />

<xi:include href="../../hardware/electronics/torso-ems5-eln.xml" />

<group name="SERVICE">
<param name="type"> eomn_serv_AS_inertials </param>

<param name="type"> eomn_serv_AS_inertials3 </param>

<group name="PROPERTIES">

<group name="CANBOARDS">
<param name="type"> eobrd_mtb </param>

<group name="PROTOCOL">
<param name="major"> 0 </param>
<param name="minor"> 0 </param>
</group>
<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="major"> 0 </param>
<param name="minor"> 0 </param>
<param name="build"> 0 </param>
</group>
</group>

<group name="SENSORS">
<param name="id"> on_ems10_gyros
<param name="id"> on_ems10_gyros
</param>

<param name="type"> eoas_gyros_st_l3g4200d
</param>

<param name="boardType"> ems4 </param>
<param name="location"> ETH:0
</param>
</param>
</group>

</group>
<group name="SETTINGS">

<group name="SETTINGS">
<param name="acquisitionRate"> 10 </param>
<param name="enabledSensors"> on_ems10_gyros </param>
<param name="enabledSensors"> on_ems10_gyros </param>
</group>
</group>

</group>

</device>



50 changes: 25 additions & 25 deletions ergoCubSN001/hardware/skin/torso-ems5-inertial_gyro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,54 @@
<!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="torso_inertialGYRO" type="embObjInertials">
<xi:include href="../../general.xml" />

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="torso_inertialGYRO" type="embObjIMU">

<xi:include href="../../general.xml" />

<xi:include href="../../hardware/electronics/torso-ems5-eln.xml" />

<group name="SERVICE">
<param name="type"> eomn_serv_AS_inertials </param>

<param name="type"> eomn_serv_AS_inertials3 </param>

<group name="PROPERTIES">

<group name="CANBOARDS">
<param name="type"> eobrd_mtb </param>

<group name="PROTOCOL">
<param name="major"> 0 </param>
<param name="minor"> 0 </param>
</group>
<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="major"> 0 </param>
<param name="minor"> 0 </param>
<param name="build"> 0 </param>
</group>
</group>

<group name="SENSORS">
<param name="id"> on_ems10_gyros
<param name="id"> on_ems10_gyros
</param>

<param name="type"> eoas_gyros_st_l3g4200d
</param>

<param name="boardType"> ems4 </param>
<param name="location"> ETH:0
</param>
</param>
</group>

</group>
<group name="SETTINGS">

<group name="SETTINGS">
<param name="acquisitionRate"> 10 </param>
<param name="enabledSensors"> on_ems10_gyros </param>
<param name="enabledSensors"> on_ems10_gyros </param>
</group>
</group>

</group>

</device>



Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
on 24 mar 2016 i had a chat with silvio.traversaro and other users of the inertial analog sensors and we defined a desired behaviour for the device.
the discussion originated the xml file for embObjInertials but also those (much simpler) for embObjMais and embObjFTsensor.
the discussion originated the xml file for embObjIMU but also those (much simpler) for embObjMais and embObjFTsensor.
the configuration should be general enough to allow future extensions and at the same time easy enough for managing code in three environment:
1. the C++ code inside the device embObjInertials.cpp ... parsing xml, build relevant data structures, publishing data in streaming, in rpc etc.
1. the C++ code inside the device embObjIMU.cpp ... parsing xml, build relevant data structures, publishing data in streaming, in rpc etc.
2. the code of those using the published data ... reading xyz plus timestamp, to be able to associate them to a given sensor ID which can be directly linked to the CAD.
3. the C code in the ETH board ... we need compact messaging from icub-main to the board, such as a list of can sensors, a list of sensors directly managed by the board
plus their properties, etc ...
Expand All @@ -28,7 +28,7 @@
(01) the place of this xml file could be in ... i would say: iCubGenova02/hardware/inertials
(02) the device is called embObjInertials and manages N xyz sensors all associated to a given ETH board. The name of device can be changed.
(02) the device is called embObjIMU and manages N xyz sensors all associated to a given ETH board. The name of device can be changed.
(04) The idea is that the device publishes data related to the N sensors in three formats:
Expand All @@ -48,10 +48,10 @@
(05) We need to put careful attention to make (x, y, z) consistent with (t).
The device receives (x, y, z) and (t) one at a time at reception of a UDP packet, hence the vectors are refreshed by function embObjInertials::update() in a given
position pos. The device publishes the vectors with a different function embObjInertials::read() which is called asynchronously with respect to embObjInertials::update().
The device receives (x, y, z) and (t) one at a time at reception of a UDP packet, hence the vectors are refreshed by function embObjIMU::update() in a given
position pos. The device publishes the vectors with a different function embObjIMU::read() which is called asynchronously with respect to embObjIMU::update().
In order to maintain consistency, we must use one mutex which gives mutual exclusion to update() and read().
Moreover, the function read() must have two arguments and be embObjInertials::read(vector<t>& v1, vector<xyz>& v2), where vector v1 will be put in metadata, vector v2 in data.
Moreover, the function read() must have two arguments and be embObjIMU::read(vector<t>& v1, vector<xyz>& v2), where vector v1 will be put in metadata, vector v2 in data.
-->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,66 @@
<!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_arm-eb2-j4_15-inertials" type="embObjInertials">
<xi:include href="../../general.xml" />

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="left_arm-eb2-j4_15-inertials" type="embObjIMU">

<xi:include href="../../general.xml" />

<xi:include href="../../hardware/electronics/left_arm-eb2-j4_15-eln.xml" />

<group name="SERVICE">
<param name="type"> eomn_serv_AS_inertials </param>

<param name="type"> eomn_serv_AS_inertials3 </param>

<group name="PROPERTIES">

<group name="CANBOARDS">
<param name="type"> eobrd_mtb </param>

<group name="PROTOCOL">
<param name="major"> 0 </param>
<param name="minor"> 0 </param>
</group>
<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="major"> 0 </param>
<param name="minor"> 0 </param>
<param name="build"> 0 </param>
</group>
</group>

<group name="SENSORS">
<param name="id"> on_eb2_accel on_eb2_gyros
l_upper_arm_4 l_upper_arm_1 l_upper_arm_3 l_upper_arm_2
<param name="id"> on_eb2_accel on_eb2_gyros
l_upper_arm_4 l_upper_arm_1 l_upper_arm_3 l_upper_arm_2
l_forearm_1 l_forearm_2 l_hand l_hand_gyro
</param>

<param name="type"> eoas_accel_st_lis3x eoas_gyros_st_l3g4200d
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_gyros_mtb_ext
<param name="type"> eoas_accel_st_lis3x eoas_gyros_st_l3g4200d
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_gyros_mtb_ext
</param>

<param name="location"> ETH:0 ETH:0
CAN2:8 CAN2:9 CAN2:10 CAN2:11
<param name="boardType"> ems4 ems4
mtb mtb mtb mtb
mtb mtb mtb mtb
</param>

<param name="location"> ETH:0 ETH:0
CAN2:8 CAN2:9 CAN2:10 CAN2:11
CAN2:12 CAN2:13 CAN2:14 CAN2:14
</param>
</param>
</group>

</group>
<group name="SETTINGS">

<group name="SETTINGS">
<param name="acquisitionRate"> 50 </param>
<param name="enabledSensors"> l_hand l_forearm_1 l_forearm_2 l_hand_gyro </param>
<param name="enabledSensors"> l_hand l_forearm_1 l_forearm_2 l_hand_gyro </param>
</group>
</group>

</group>

</device>




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,69 @@
<!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-eb10-inertials" type="embObjInertials">
<xi:include href="../../general.xml" />

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="left_leg-eb10-inertials" type="embObjIMU">

<xi:include href="../../general.xml" />

<xi:include href="../../hardware/electronics/left_leg-eb10-skin-eln.xml" />

<group name="SERVICE">
<param name="type"> eomn_serv_AS_inertials </param>

<param name="type"> eomn_serv_AS_inertials3 </param>

<group name="PROPERTIES">

<group name="CANBOARDS">
<param name="type"> eobrd_mtb </param>

<group name="PROTOCOL">
<param name="major"> 0 </param>
<param name="minor"> 0 </param>
</group>
<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="major"> 0 </param>
<param name="minor"> 0 </param>
<param name="build"> 0 </param>
</group>
</group>

<group name="SENSORS">
<param name="id"> on_eb10_accel on_eb10_gyros l_upper_leg_1_10B1
l_upper_leg_2_10B2 l_upper_leg_3_10B3 l_upper_leg_4_10B4 l_upper_leg_5_10B5
l_upper_leg_6_10B6 l_upper_leg_7_10B7 l_lower_leg_1_10B8 l_lower_leg_2_10B9
l_lower_leg_3_10B10 l_lower_leg_4_10B11 l_foot_1_10B12 l_foot_2_10B13
<param name="id"> on_eb10_accel on_eb10_gyros l_upper_leg_1_10B1
l_upper_leg_2_10B2 l_upper_leg_3_10B3 l_upper_leg_4_10B4 l_upper_leg_5_10B5
l_upper_leg_6_10B6 l_upper_leg_7_10B7 l_lower_leg_1_10B8 l_lower_leg_2_10B9
l_lower_leg_3_10B10 l_lower_leg_4_10B11 l_foot_1_10B12 l_foot_2_10B13
</param>

<param name="type"> eoas_accel_st_lis3x eoas_gyros_st_l3g4200d eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
<param name="type"> eoas_accel_st_lis3x eoas_gyros_st_l3g4200d eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int eoas_accel_mtb_int
</param>

<param name="location"> ETH:0 ETH:0 CAN1:1
CAN1:2 CAN1:3 CAN1:4 CAN1:5
CAN1:6 CAN1:7 CAN2:8 CAN2:9
CAN2:10 CAN2:11 CAN2:13 CAN2:12
</param>
<param name="boardType"> ems4 ems4 mtb
mtb mtb mtb mtb
mtb mtb mtb mtb
mtb mtb mtb mtb
</param>

<param name="location"> ETH:0 ETH:0 CAN1:1
CAN1:2 CAN1:3 CAN1:4 CAN1:5
CAN1:6 CAN1:7 CAN2:8 CAN2:9
CAN2:10 CAN2:11 CAN2:13 CAN2:12
</param>
</group>

</group>
<group name="SETTINGS">

<group name="SETTINGS">
<param name="acquisitionRate"> 50 </param>
<param name="enabledSensors"> l_upper_leg_1_10B1 l_upper_leg_2_10B2 l_upper_leg_3_10B3 l_upper_leg_4_10B4 </param>
<param name="enabledSensors"> l_upper_leg_1_10B1 l_upper_leg_2_10B2 l_upper_leg_3_10B3 l_upper_leg_4_10B4 </param>
</group>
</group>

</group>

</device>



Loading

0 comments on commit 6e86d07

Please sign in to comment.