robotology / robots-configuration

Contains robots configuration files
BSD 3-Clause "New" or "Revised" License
14 stars 69 forks source link

skinSpec mods done #348

Closed davidetome closed 2 years ago

davidetome commented 2 years ago

This PR modifies the skinSpec files for the arms

This is the script used for the ETH robots:

#!/bin/bash

fdfind arm.*eb.*skinSpec > list-eth.txt
filename='list-eth.txt'
n=1

while read line; do
# reading each line
#echo "Line No. $n : $line"
n=$((n+1))
sed -i '/defaultCfgTriangle/e cat add.xml' $line
sed -i -e '/enabled/s/true/false/g' $line
done < $filename

This is the script used for the CAN robots:

#!/bin/bash

fdfind arm.*can.*skinSpec > list-can.txt
filename='list-can.txt'
n=1

while read line; do
# reading each line
#echo "Line No. $n : $line"
n=$((n+1))
sed -i '/defaultCfgTriangle/e cat add.xml' $line
sed -i -e '/enabled/s/true/false/g' $line
done < $filename

and this the add.xml file used by both the scripts 👍🏻

    <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">     1           14          14          50          1       0xf0        </param> 

    </group>
davidetome commented 2 years ago

w/ the first commit I modified all the ETH robots.

Concerning the CAN robots, I noticed that the CAN ID is expressed in HEX format.

<group name="specialCfgTriangles">
        <param name="numOfSets">         0x01  </param> <!-- id starts from 1 for triangleSetCfg-->
        <!--                                 patch       boardAddr    idStart       idEnd        enabled          shift       cdcOffset      -->
           <param name="triangleSetCfg1">      8            0xE        0             6             1              0           0x2000      </param>
        </group> 

@marcoaccame @maggia80 , I guess I have to respect this format also while adding the <group name="specialCfgBoards"> group, am I right?

    <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">     1           0x0E          0x0E          50          1       0xf0        </param> 

    </group>

cc @pattacini

marcoaccame commented 2 years ago
0xE        

I would keep the IDs in decimal as usual

davidetome commented 2 years ago
0xE        

I would keep the IDs in decimal as usual

@marcoaccame thanks for replyimg, but probably I was not clear.. the specialCfgTriangles section present in the CAN robots contains the HEX format. My doubt was if adding the specialCfgBoards to them I have to use the HEX format also in it instead of the DEC format I used for the ETH robots.

marcoaccame commented 2 years ago
0xE        

I would keep the IDs in decimal as usual

@marcoaccame thanks for replyimg, but probably I was not clear.. the specialCfgTriangles section present in the CAN robots contains the HEX format. My doubt was if adding the specialCfgBoards to them I have to use the HEX format also in it instead of the DEC format I used for the ETH robots.

The parser of the xml is the same for all the robots, be them ETH or CAN. It supports the reading of both decimal and hex values in xml files.

So the use of hex values or decimal is just a choice.

davidetome commented 2 years ago

I modified also the CAN based robots, I put the PR in review!

davidetome commented 2 years ago

I've tested on the ETH robot in proto and it was ok but on iCubGenova01(CAN) there were the patch ID not aligned to the added one.

All the CAN based robots needs to be fixed, and only few ETH needs to be fixed.

I'm gonna fix it.

davidetome commented 2 years ago

I've fixed w/ the last commit

cc @pattacini

pattacini commented 2 years ago

Thanks heaps @davidetome 🚀