Skip to content

Commit

Permalink
The amc board uses ICC and CAN to move the wrist of ergoCub (r…
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoaccame authored and valegagge committed Apr 11, 2024
1 parent 4c45383 commit 1e4d265
Show file tree
Hide file tree
Showing 27 changed files with 682 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<param name="rotorPosMax"> 0 0 0 </param>
</group>

<group name="AMCBLDC">
<group name="ADVFOC">
<param name="HasHallSensor"> 1 1 1 </param>
<param name="HasTempSensor"> 0 0 0 </param>
<param name="HasRotorEncoder"> 0 0 0 </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<param name="rotorPosMax"> 0 0 0 </param>
</group>

<group name="AMCBLDC">
<group name="ADVFOC">
<param name="HasHallSensor"> 1 1 1 </param>
<param name="HasTempSensor"> 0 0 0 </param>
<param name="HasRotorEncoder"> 0 0 0 </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<group name="SERVICE">

<param name="type"> eomn_serv_MC_foc </param>
<param name="type"> eomn_serv_MC_advfoc </param>

<group name="PROPERTIES">

Expand All @@ -14,23 +14,24 @@
</group>

<group name="CANBOARDS">
<param name="type"> amcbldc </param>
<param name="type"> amcbldc amc2c </param>
<group name="PROTOCOL">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="major"> 2 2 </param>
<param name="minor"> 0 0 </param>
</group>
<group name="FIRMWARE">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="build"> 4 </param>
<param name="major"> 2 3 </param>
<param name="minor"> 0 0 </param>
<param name="build"> 10 0 </param>
</group>
</group>

<group name="JOINTMAPPING">

<group name="ACTUATOR">
<param name="type"> foc foc foc </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="type"> advfoc advfoc advfoc </param>
<param name="onboard"> amcbldc amcbldc amc2c </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
</group>

<group name="ENCODER1">
Expand All @@ -43,10 +44,10 @@

<group name="ENCODER2">
<param name="type"> none none none </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
<param name="position"> atmotor atmotor atmotor </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
</group>

</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<group name="SERVICE">

<param name="type"> eomn_serv_MC_foc </param>
<param name="type"> eomn_serv_MC_advfoc </param>

<group name="PROPERTIES">

Expand All @@ -14,23 +14,24 @@
</group>

<group name="CANBOARDS">
<param name="type"> amcbldc </param>
<param name="type"> amcbldc amc2c </param>
<group name="PROTOCOL">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="major"> 2 2 </param>
<param name="minor"> 0 0 </param>
</group>
<group name="FIRMWARE">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="build"> 4 </param>
<param name="major"> 2 3 </param>
<param name="minor"> 0 0 </param>
<param name="build"> 10 0 </param>
</group>
</group>

<group name="JOINTMAPPING">

<group name="ACTUATOR">
<param name="type"> foc foc foc </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="type"> advfoc advfoc advfoc </param>
<param name="onboard"> amcbldc amcbldc amc2c </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
</group>

<group name="ENCODER1">
Expand All @@ -42,11 +43,11 @@
</group>

<group name="ENCODER2">
<param name="type"> none none none </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="position"> atmotor atmotor atmotor </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
<param name="type"> none none none </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
<param name="position"> atmotor atmotor atmotor </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
</group>

</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<param name="rotorPosMax"> 0 0 0 </param>
</group>

<group name="AMCBLDC">
<group name="ADVFOC">
<param name="HasHallSensor"> 1 1 1 </param>
<param name="HasTempSensor"> 0 0 0 </param>
<param name="HasRotorEncoder"> 0 0 0 </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<param name="rotorPosMax"> 0 0 0 </param>
</group>

<group name="AMCBLDC">
<group name="ADVFOC">
<param name="HasHallSensor"> 1 1 1 </param>
<param name="HasTempSensor"> 0 0 0 </param>
<param name="HasRotorEncoder"> 0 0 0 </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<group name="SERVICE">

<param name="type"> eomn_serv_MC_foc </param>
<param name="type"> eomn_serv_MC_advfoc </param>

<group name="PROPERTIES">

Expand All @@ -14,23 +14,24 @@
</group>

<group name="CANBOARDS">
<param name="type"> amcbldc </param>
<param name="type"> amcbldc amc2c </param>
<group name="PROTOCOL">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="major"> 2 2 </param>
<param name="minor"> 0 0 </param>
</group>
<group name="FIRMWARE">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="build"> 4 </param>
<param name="major"> 2 3 </param>
<param name="minor"> 0 0 </param>
<param name="build"> 10 0 </param>
</group>
</group>

<group name="JOINTMAPPING">

<group name="ACTUATOR">
<param name="type"> foc foc foc </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="type"> advfoc advfoc advfoc </param>
<param name="onboard"> amcbldc amcbldc amc2c </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
</group>

<group name="ENCODER1">
Expand All @@ -43,10 +44,10 @@

<group name="ENCODER2">
<param name="type"> none none none </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
<param name="position"> atmotor atmotor atmotor </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
</group>

</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<group name="SERVICE">

<param name="type"> eomn_serv_MC_foc </param>
<param name="type"> eomn_serv_MC_advfoc </param>

<group name="PROPERTIES">

Expand All @@ -14,23 +14,24 @@
</group>

<group name="CANBOARDS">
<param name="type"> amcbldc </param>
<param name="type"> amcbldc amc2c </param>
<group name="PROTOCOL">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="major"> 2 2 </param>
<param name="minor"> 0 0 </param>
</group>
<group name="FIRMWARE">
<param name="major"> 2 </param>
<param name="minor"> 0 </param>
<param name="build"> 4 </param>
<param name="major"> 2 3 </param>
<param name="minor"> 0 0 </param>
<param name="build"> 10 0 </param>
</group>
</group>

<group name="JOINTMAPPING">

<group name="ACTUATOR">
<param name="type"> foc foc foc </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="type"> advfoc advfoc advfoc </param>
<param name="onboard"> amcbldc amcbldc amc2c </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
</group>

<group name="ENCODER1">
Expand All @@ -42,11 +43,11 @@
</group>

<group name="ENCODER2">
<param name="type"> none none none </param>
<param name="port"> CAN1:1:0 CAN1:2:0 CAN1:3:0 </param>
<param name="position"> atmotor atmotor atmotor </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
<param name="type"> none none none </param>
<param name="port"> CAN1:1 CAN1:2 ICC1:3 </param>
<param name="position"> atmotor atmotor atmotor </param>
<param name="resolution"> 0 0 0 </param>
<param name="tolerance"> 0 0 0 </param>
</group>

</group>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?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="setup-calibrator" type="parametricCalibratorEth">

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

<group name="GENERAL">
<param name="joints"> 1 </param> <!-- the number of joints of the robot part -->
<param name="deviceName"> Setup_Calibrator </param>
</group>

<group name="HOME">
<param name="positionHome"> 0 </param>
<param name="velocityHome"> 10 </param>
</group>

<group name="CALIBRATION">
<param name="calibrationType"> 12 </param>

<param name="calibration1"> 6865 </param>
<param name="calibration2"> 0 </param>
<param name="calibration3"> 0 </param>
<param name="calibration4"> 0 </param>
<param name="calibration5"> 0 </param>
<param name="calibrationZero"> 0 </param>
<param name="calibrationDelta"> 0 </param>

<param name="startupPosition"> 0.0 </param>
<param name="startupVelocity"> 30.0 </param>
<param name="startupMaxPwm"> 16000 </param>
<param name="startupPosThreshold"> 2 </param>
</group>

<param name="CALIB_ORDER"> (0) </param>

<action phase="startup" level="10" type="calibrate">
<param name="target">setup-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">setup-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />

</device>
2 changes: 2 additions & 0 deletions experimentalSetups/lego_setup_amc_advfoc/firmwareupdater.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[DRIVERS]
ETH "eth"
12 changes: 12 additions & 0 deletions experimentalSetups/lego_setup_amc_advfoc/general.xml
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="setup" 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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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="setup" build="1">

<group name="PC104">
<param name="PC104IpAddress"> 10.0.1.104 </param>
<param name="PC104IpPort"> 12345 </param>
<param name="PC104TXrate"> 1 </param>
<param name="PC104RXrate"> 5 </param>
</group>

</params>

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?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="setup" build="1">

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

<group name="ETH_BOARD">

<group name="ETH_BOARD_PROPERTIES">
<param name="IpAddress"> 10.0.1.1 </param>
<param name="IpPort"> 12345 </param>
<param name="Type"> amc </param>
<param name="maxSizeRXpacket"> 768 </param>
<param name="maxSizeROP"> 384 </param>
</group>

<group name="ETH_BOARD_SETTINGS">
<param name="Name"> "setup-eb2-j0_2" </param>
<group name="RUNNINGMODE">
<param name="period"> 1000 </param>
<param name="maxTimeOfRXactivity"> 400 </param>
<param name="maxTimeOfDOactivity"> 300 </param>
<param name="maxTimeOfTXactivity"> 300 </param>
<param name="TXrateOfRegularROPs"> 5 </param>
</group>
</group>

<group name="ETH_BOARD_ACTIONS">
<group name="MONITOR_ITS_PRESENCE">
<param name="enabled"> true </param>
<param name="timeout"> 0.020 </param>
<param name="periodOfMissingReport"> 60.0 </param>
</group>
</group>

</group>

</params>

Loading

0 comments on commit 1e4d265

Please sign in to comment.