forked from robotology/robots-configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 3DMID configuration files in experimentalSetups (robotology#525)
- Loading branch information
1 parent
2d542b6
commit 5d33ad5
Showing
14 changed files
with
444 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE params PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> | ||
|
||
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="iCubGenova01" build="1"> | ||
|
||
<group name="GENERAL"> | ||
<param name="skipCalibration"> false </param> | ||
<param name="useRawEncoderData"> false </param> | ||
<param name="useLimitedPWM"> false </param> | ||
<param name="verbose"> false </param> | ||
</group> | ||
</params> |
39 changes: 39 additions & 0 deletions
39
experimentalSetups/3DMID_Fingertip_Can/hardware/skin/left_arm-cfw2_can7-skinSpec.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE params PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> | ||
|
||
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="iCubGenova01" build="1"> | ||
|
||
<group name="defaultCfgBoard"> | ||
<param name="period"> 50 </param> | ||
<param name="skinType"> 0 </param> <!-- 0 ==> new skin | ||
1 ==> palm and fingertips skin | ||
2 ==> old skin without temperature compensation --> | ||
<param name="noLoad"> 0xf0 </param> | ||
<param name="diagnostic"> false </param> <!-- used to config high level --> | ||
</group> | ||
|
||
|
||
<group name="specialCfgBoards"> | ||
<!-- it tells some boards to be special. | ||
we can configure only: tx period, skinType, noLoad value. | ||
rule #1 -> CAN1:14 has: period = 50 ms, skinType = 1 (palm and fingertips skin), noLoad = 0xf0 | ||
--> | ||
<!--param name="numOfSets"> 1 </param> | ||
<!-- patch adr start adr end period type no_load > | ||
<param name="boardSetCfg1"> 7 14 14 50 1 0xf0 </param--> | ||
|
||
</group> | ||
<group name="defaultCfgTriangle"> | ||
<param name="enabled"> false </param> | ||
<param name="shift"> 2 </param> | ||
<param name="cdcOffset"> 0x2200 </param> | ||
</group> | ||
|
||
<group name="specialCfgTriangles"> | ||
<param name="numOfSets"> 0x01 </param> <!-- id starts from 1 for triangleSetCfg--> | ||
<!-- patch boardAddr idStart idEnd enabled shift cdcOffset --> | ||
<param name="triangleSetCfg1"> 7 0xA 0 3 1 0 0x0000 </param> | ||
</group> | ||
|
||
|
||
</params> |
16 changes: 16 additions & 0 deletions
16
experimentalSetups/3DMID_Fingertip_Can/hardware/skin/left_arm.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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_arm_skin" type="canBusSkin"> | ||
<xi:include href="../../general.xml" /> | ||
|
||
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="iCubGenova01" build="1"> | ||
<param name="canDeviceNum"> 7 </param> | ||
<param name="skinCanIds"> 10 </param> | ||
<param name="period"> 10 </param> | ||
<param name="canbusDevice"> cfw2can </param> | ||
</params> | ||
<xi:include href="./left_arm-cfw2_can7-skinSpec.xml" /> | ||
</device> | ||
|
14 changes: 14 additions & 0 deletions
14
experimentalSetups/3DMID_Fingertip_Can/hardware/skin/left_arm_accelerometers_mtb.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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" type="canBusInertialMTB" name="left_arm_accelerometers_mtb"> | ||
<param name="canbusDevice"> "sharedcan" </param> | ||
<param name="physDevice"> "cfw2can" </param> | ||
<param name="canDeviceNum"> 7 </param> | ||
<param name="canAddress"> 8 9 10 11 12 13 </param> | ||
<param name="period"> 10 </param> | ||
<param name="sensorPeriod"> 10 </param> | ||
<param name="sensorType"> "acc" </param> | ||
</device> | ||
|
16 changes: 16 additions & 0 deletions
16
experimentalSetups/3DMID_Fingertip_Can/hardware/skin/skin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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="fingertip_skin" type="canBusSkin"> | ||
<xi:include href="../../general.xml" /> | ||
|
||
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="skin" build="1"> | ||
<param name="canDeviceNum"> 0 </param> | ||
<param name="skinCanIds"> 10 </param> | ||
<param name="period"> 10 </param> | ||
<param name="canbusDevice"> socketcan </param> | ||
</params> | ||
<xi:include href="./skinSpec.xml" /> | ||
</device> | ||
|
39 changes: 39 additions & 0 deletions
39
experimentalSetups/3DMID_Fingertip_Can/hardware/skin/skinSpec.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE params PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> | ||
|
||
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="skin" build="1"> | ||
|
||
<group name="defaultCfgBoard"> | ||
<param name="period"> 50 </param> | ||
<param name="skinType"> 0 </param> <!-- 0 ==> new skin | ||
1 ==> palm and fingertips skin | ||
2 ==> old skin without temperature compensation --> | ||
<param name="noLoad"> 0xf0 </param> | ||
<param name="diagnostic"> false </param> <!-- used to config high level --> | ||
</group> | ||
|
||
|
||
<group name="specialCfgBoards"> | ||
<!-- it tells some boards to be special. | ||
we can configure only: tx period, skinType, noLoad value. | ||
rule #1 -> CAN1:14 has: period = 50 ms, skinType = 1 (palm and fingertips skin), noLoad = 0xf0 | ||
--> | ||
<param name="numOfSets"> 1 </param> | ||
<!-- patch adr start adr end period type no_load --> | ||
<param name="boardSetCfg1"> 0 10 10 50 1 0xd0 </param> | ||
|
||
</group> | ||
<group name="defaultCfgTriangle"> | ||
<param name="enabled"> false </param> | ||
<param name="shift"> 2 </param> | ||
<param name="cdcOffset"> 0x2200 </param> | ||
</group> | ||
|
||
<group name="specialCfgTriangles"> | ||
<param name="numOfSets"> 0x01 </param> <!-- id starts from 1 for triangleSetCfg--> | ||
<!-- patch boardAddr idStart idEnd enabled shift cdcOffset --> | ||
<param name="triangleSetCfg1"> 0 10 0 3 1 2 0x0000 </param> | ||
</group> | ||
|
||
|
||
</params> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> | ||
<robot name="iCubGenova01" portprefix="icub" build="0" xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<devices> | ||
<!-- cartesian --> | ||
<xi:include href="hardware/skin/skin.xml" />"> | ||
<!-- SKIN --> | ||
<xi:include href="wrappers/skin/left_arm_skin_wrapper.xml" /> | ||
</devices> | ||
</robot> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
### Preliminary | ||
|
||
Open more tabs | ||
1. launch `yarpserver` | ||
|
||
2. go into `cd ~/robotology-superbuild/robots-configuration/experimentalSetups/3DMID_Fingertip_Can/` | ||
- connect and inzialize the Esd can device: | ||
`sudo ip link set can0 type can bitrate 1000000` | ||
`sudo ip link set up can0` | ||
-launch YARP: | ||
`yarprobotinterface --config icub.xml` | ||
|
||
3. `yarpscope --xml yarpscope.fingertip.xml` | ||
- with data stuck to 0 means the output data port aren't properly connected to the yarpscope tmp ports: use `yarp connect /icub/skin/left_hand /tmp/port/<i>` (i: port index) | ||
- **warning** sometimes ports remain running when yarpscope is closed. in this case you will have port indices larger than 12 | ||
- in case you experience connection errors exit all yarp process and do a yarp clean | ||
|
||
4. anothe cause of stuck value is from wrong offsets/device reset etc. in this case you can use directly the CAN commands: | ||
`cansend can0 20a#4d0132d0` -- d0 stands for "noLoad" value | ||
`cansend can0 20a#50000302010000` -- 50 is the command code 00:starting triangle 03: ending triangle; 02: bitshift; 01: enable; 0000: CDC Offset | ||
`cansend can0 20a#0700` -- startTX | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
**aprire piu' tabs:** | ||
|
||
tab 1- yarpserver | ||
tab 2- cd ~/robotology-superbuild/robots-configuration/experimentalSetups/3DMID_Fingertip_Can/ | ||
- inzializza il can: | ||
sudo ip link set can0 type can bitrate 1000000 | ||
sudo ip link set up can0 | ||
-lancia YARP: | ||
yarprobotinterface --config icub.xml | ||
tab 3: yarpscope --xml yarpscope.fingertip.xml | ||
- se i dati sono fissi a 0 le porte dati non sono connesse alle porte yarpscope: connetterle con yarp connect /icub/skin/left_hand /tmp/port/<i> (i da 1 a n) | ||
|
||
se il valore si pianta, si possono mandare i comandi CAN: | ||
cansend can0 20a#4d0132f0 -- f0 e' il valore noLoad | ||
cansend can0 20a#50000302010000 -- 50 = comando; 00:primo triangolo 03: ultimo triangolo; 02: bitshift; 01: enable; 0000: CDC Offset | ||
cansend can0 20a#0700 -- start TX | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> | ||
<robot name="skin" portprefix="skin" build="0" xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<devices> | ||
<xi:include href="wrappers/skin/skin_wrapper.xml" /> | ||
|
||
</devices> | ||
</robot> | ||
|
23 changes: 23 additions & 0 deletions
23
experimentalSetups/3DMID_Fingertip_Can/wrappers/skin/left_arm_skin_wrapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?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_arm_skin_wrapper" type="skinWrapper"> | ||
<param name="period"> 20 </param> | ||
<param name="total_taxels"> 48 </param> | ||
<param name="device"> skinWrapper </param> | ||
|
||
<paramlist name="ports"> | ||
<elem name="left_hand"> 0 47 0 47</elem> | ||
</paramlist> | ||
|
||
<action phase="startup" level="5" type="attach"> | ||
<paramlist name="networks"> | ||
<!-- The param value must match the device name in the corresponding emsX file --> | ||
<elem name="FirstSetOfSkins"> fingertip_skin </elem> | ||
</paramlist> | ||
</action> | ||
|
||
<action phase="shutdown" level="5" type="detach" /> | ||
</device> | ||
|
23 changes: 23 additions & 0 deletions
23
experimentalSetups/3DMID_Fingertip_Can/wrappers/skin/skin_wrapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?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_arm_skin_wrapper" type="skinWrapper"> | ||
<param name="period"> 20 </param> | ||
<param name="total_taxels"> 48 </param> | ||
<param name="device"> skinWrapper </param> | ||
|
||
<paramlist name="ports"> | ||
<elem name="left_hand"> 0 47 0 47</elem> | ||
</paramlist> | ||
|
||
<action phase="startup" level="5" type="attach"> | ||
<paramlist name="networks"> | ||
<!-- The param value must match the device name in the corresponding emsX file --> | ||
<elem name="FirstSetOfSkins"> left_arm_skin </elem> | ||
</paramlist> | ||
</action> | ||
|
||
<action phase="shutdown" level="5" type="detach" /> | ||
</device> | ||
|
2 changes: 2 additions & 0 deletions
2
experimentalSetups/3DMID_Fingertip_Can/yarprobotinterface.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config ./skin.xml | ||
|
Oops, something went wrong.