Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration files for an experimental setup #701

Merged
merged 6 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions experimentalSetups/ankleSetup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ankle setup
The setup was created to do some test for the ErgoCub 2.0 Ankle Design project. It utilizes a Camozzi linear actuator, shown in the image below. <br>

<img align="left" src="readme_assets/imgs/setup.jpg">
pattacini marked this conversation as resolved.
Show resolved Hide resolved

| Motor | Electronic boards |
|-------- |------------------- |
| `MECAPION APM SA01ACN-8` [Datasheet](http://wingst-icub.iit.local/direct_download.php?LINK=%2F%2Fiiticubstor01.iit.local%2Ficub-tech%2Fmechatronics%2FDatasheet%2FMotors%2FMecapion%2FMecapion+servo+motors+2012.pdf) | `2FOC` [Documentation](https://github.com/icub-tech-iit/electronics-boards/tree/master/2foc/docs) |
pattacini marked this conversation as resolved.
Show resolved Hide resolved
|| `EMS4` [Documentation](https://github.com/icub-tech-iit/electronics-boards/tree/master/ems4/docs) | <br>

The motor datasheet includes integrated encoder specifications.
28 changes: 28 additions & 0 deletions experimentalSetups/ankleSetup/ankle-setup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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="ankle-setup" build="1" portprefix="ankleSetup" xmlns:xi="http://www.w3.org/2001/XInclude">

<devices>
<params>
<xi:include href="hardware/electronics/pc104.xml" />
</params>

<!-- motor controllers wrappers -->
<xi:include href="wrappers/motorControl/ankle-setup-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/ankle-setup-mc_remapper.xml" />


<!-- ankle -->
<xi:include href="hardware/motorControl/ankle-setup-mc.xml" />

<!-- CALIBRATORS -->
<xi:include href="calibrators/ankle-setup-calib.xml" />

<!-- ROBOMETRY -->
<xi:include href="telemetry/telemetry.xml" />
<!-- nws wrapper -->
<xi:include href="wrappers/motorControl/ankle-setup-rawval-nws_wrapper.xml" />

</devices>
</robot>
52 changes: 52 additions & 0 deletions experimentalSetups/ankleSetup/calibrators/ankle-setup-calib.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?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="ankle-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"> ankleSetupCalib </param>
</group>

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



<group name="CALIBRATION">
<!-- small -->
<param name="calibrationType"> 5 </param>
<param name="calibration1"> 1600 </param> <!-- 20934 amo (12) -4200 (10) 63820 aksim2-->
<param name="calibration2"> 17816 </param>
<param name="calibration3"> 0 </param>


<param name="calibration4"> 0 </param>
<param name="calibration5"> 0 </param>
<param name="calibrationZero"> 0 </param> <!-- -100(10)-->
<param name="calibrationDelta"> 0 </param>

<param name="startupPosition"> 0 </param>
<param name="startupVelocity"> 20 </param>
<param name="startupMaxPwm"> 4000 </param>
<param name="startupPosThreshold"> 2 </param>
</group>

<!-- check old calibrator for the correct sequence, then ask to Randazz -->
<param name="CALIB_ORDER"> (0) </param>

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

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

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

</device>
2 changes: 2 additions & 0 deletions experimentalSetups/ankleSetup/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/ankleSetup/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="ankleSetup" 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,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="ankle-setup" build="1">

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

<group name="ETH_BOARD">

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

<group name="ETH_BOARD_SETTINGS">
<param name="Name"> "ankle-setup" </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>
14 changes: 14 additions & 0 deletions experimentalSetups/ankleSetup/hardware/electronics/pc104.xml
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="ankle" 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,73 @@
<?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="ankle-setup" build="1">
<group name="GENERAL">
<param name="MotioncontrolVersion"> 6 </param>
<param name="Joints"> 1 </param>
<param name="AxisMap"> 0 </param>
<param name="AxisName"> "ankle_joint" </param>
<param name="AxisType"> "revolute" </param>
<param name="Encoder"> 182.044 </param>
<param name="fullscalePWM"> 32000 </param>
<param name="ampsToSensor"> 1000.0 </param>
<param name="Gearbox_M2J"> 1 </param>
<param name="Gearbox_E2J"> 1 </param> <!--64 when using AMO 1 when using aksim (is the number of sectors)-->
<param name="useMotorSpeedFbk"> 1 </param>
<param name="MotorType"> "MECAPION_APM-SA01ACN-8" </param>
<param name="Verbose"> 0 </param>
</group>

<group name="LIMITS">
<param name="hardwareJntPosMax"> 0 </param>
<param name="hardwareJntPosMin"> 0 </param>
<param name="rotorPosMin"> 0 </param>
<param name="rotorPosMax"> 0 </param>
</group>

<group name="2FOC">
<param name="Verbose"> 0 </param>
<param name="AutoCalibration"> 0 </param>
<param name="HasHallSensor"> 0 </param>
<param name="HasTempSensor"> 0 </param>
<param name="HasRotorEncoder"> 1 </param>
<param name="HasRotorEncoderIndex"> 1 </param>
<param name="HasSpeedEncoder"> 0 </param>
<param name="RotorIndexOffset"> 105 </param>
<param name="MotorPoles"> 8 </param>
</group>

<group name="COUPLINGS">
<param name ="matrixJ2M">
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
0.000 0.000 0.000 1.000
</param>

<param name ="matrixM2J">
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
0.000 0.000 0.000 1.000
</param>

<param name ="matrixE2J">
1.00 0.00 0.00 0.00 0.00 0.00
0.00 1.00 0.00 0.00 0.00 0.00
0.00 0.00 1.00 0.00 0.00 0.00
0.00 0.00 0.00 1.00 0.00 0.00
</param>
</group>

<group name="JOINTSET_CFG">
<param name= "numberofsets"> 1 </param>
<group name="JOINTSET_0">
<param name="listofjoints"> 0 </param>
<param name="constraint"> none </param>
<param name="param1"> 0 </param>
<param name="param2"> 0 </param>
</group>
</group>

</params>
127 changes: 127 additions & 0 deletions experimentalSetups/ankleSetup/hardware/motorControl/ankle-setup-mc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?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="ankle-setup-mc" type="embObjMotionControl">

<xi:include href="../../general.xml" />
<xi:include href="../../hardware/electronics/ankle-setup-eln.xml" />
<xi:include href="../../hardware/mechanicals/ankle-setup-mec.xml" />
<xi:include href="./ankle-setup-mc_service.xml" />

<!-- joint number 0 -->
<!-- joint name -->
<group name="LIMITS">
<param name="jntPosMax"> 0 </param>
<param name="jntPosMin"> 0 </param>
<param name="jntVelMax"> 100 </param>
<param name="motorNominalCurrents"> 5000 </param>
<param name="motorPeakCurrents"> 10000 </param>
<param name="motorOverloadCurrents"> 15000 </param>
<param name="motorPwmLimit"> 32000 </param>
</group>

<group name="TIMEOUTS">
<param name="velocity"> 100 </param>
</group>

<group name="IMPEDANCE">
<param name="stiffness"> 0 </param>
<param name="damping"> 0 </param>
</group>

<group name="CONTROLS">
<param name="positionControl"> POS_PID_DEFAULT </param>
<param name="velocityControl"> POS_PID_DEFAULT </param>
<param name="mixedControl"> POS_PID_DEFAULT </param>
<param name="torqueControl"> TRQ_PID_DEFAULT </param>
<param name="currentPid"> 2FOC_CUR_CONTROL </param>
<param name="speedPid"> 2FOC_VEL_CONTROL </param>
</group>


<!-- default position PID: begin -->

<group name="POS_PID_DEFAULT">
<param name="controlLaw"> minjerk </param>
<param name="outputType"> pwm </param>
<param name="fbkControlUnits"> metric_units </param>
<param name="outputControlUnits"> machine_units </param>
<param name="kp"> 500 </param>
<param name="kd"> 0 </param>
<param name="ki"> 100 </param>
<param name="maxOutput"> 32000 </param>
<param name="maxInt"> 3000 </param>
<param name="stictionUp"> 0 </param>
<param name="stictionDown"> 0 </param>
<param name="kff"> 0 </param>
</group>

<!-- default position PID: end -->


<!-- default torque PID: begin -->
<group name="TRQ_PID_DEFAULT">
<param name="controlLaw"> torque </param>
<param name="outputType"> current </param>
<param name="fbkControlUnits"> machine_units </param>
<param name="outputControlUnits"> machine_units </param>
<param name="kp"> 1.8 </param>
<param name="kd"> 0 </param>
<param name="ki"> 0 </param>
<param name="maxOutput"> 2000 </param>
<param name="maxInt"> 1000 </param>
<param name="ko"> 0.55 </param>
<param name="stictionUp"> 0 </param>
<param name="stictionDown"> 0 </param>
<param name="kff"> 0 </param>
<param name="kbemf"> 0 </param>
<param name="filterType"> 3 </param>
<param name="ktau"> 0 </param>
<param name="viscousPos"> 1.0 </param>
<param name="viscousNeg"> 1.0 </param>
<param name="coulombPos"> 0.0 </param>
<param name="coulombNeg"> 0.0 </param>
</group>
<!-- default torque PID: end -->


<!-- other default PIDs: begin -->

<group name="2FOC_CUR_CONTROL">
<param name="controlLaw"> low_lev_current </param>
<param name="fbkControlUnits"> machine_units </param>
<param name="outputControlUnits"> machine_units </param>
<param name="kp"> 8 </param>
<param name="kd"> 0 </param>
<param name="ki"> 2 </param>
<param name="shift"> 10 </param>
<param name="maxOutput"> 32000 </param>
<param name="maxInt"> 32000 </param>
<param name="kff"> 0 </param>
</group>

<group name="2FOC_VEL_CONTROL">
<param name="controlLaw"> low_lev_speed </param>
<param name="fbkControlUnits"> machine_units </param>
<param name="outputControlUnits"> machine_units </param>
<param name="kff"> 0 </param>
<param name="kp"> 12 </param>
<param name="kd"> 0 </param>
<param name="ki"> 16 </param>
<param name="shift"> 10 </param>
<param name="maxOutput"> 32000 </param>
<param name="maxInt"> 32000 </param>
</group>

<!-- other default PIDs: end -->


<!-- custom PIDs: begin -->
<!-- custom PIDs: end -->

<group name="OTHER_CONTROL_PARAMETERS">
<param name="deadZone"> 0.0049 </param>
</group>

</device>
Loading
Loading