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

Control board named 'ankle_setup_control_board', works with linear motion in range 0-100 [mm], fixed indentation, no more skipping park #706

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion experimentalSetups/ankleSetup/ankle-setup.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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">
<robot name="ankle-setup" build="1" portprefix="/ankleSetup" xmlns:xi="http://www.w3.org/2001/XInclude">

<devices>
<params>
Expand Down
6 changes: 3 additions & 3 deletions experimentalSetups/ankleSetup/general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<!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"> true </param>
<param name="skipCalibration"> false </param>
<param name="useRawEncoderData"> false </param>
<param name="useLimitedPWM"> false </param>
<param name="verbose"> false </param>
</group>
</params>
</params>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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">
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="ankle_setup_control_board" build="1">

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

Expand All @@ -16,7 +16,7 @@
</group>

<group name="ETH_BOARD_SETTINGS">
<param name="Name"> "ankle-setup" </param>
<param name="Name"> "ankle_setup_control_board" </param>
<group name="RUNNINGMODE">
<param name="period"> 1000 </param>
<param name="maxTimeOfRXactivity"> 400 </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<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="Gearbox_M2J"> 72 </param>
<param name="Gearbox_E2J"> 1 </param>
<param name="useMotorSpeedFbk"> 1 </param>
<param name="MotorType"> "MECAPION_APM-SA01ACN-8" </param>
<param name="Verbose"> 0 </param>
<param name="Verbose"> 0 </param>
</group>

<group name="LIMITS">
<param name="hardwareJntPosMax"> 0 </param>
<param name="hardwareJntPosMin"> 0 </param>
<param name="hardwareJntPosMax"> 0 </param>
<param name="hardwareJntPosMin"> -100 </param>
<param name="rotorPosMin"> 0 </param>
<param name="rotorPosMax"> 0 </param>
</group>
Expand All @@ -34,7 +34,7 @@
<param name="HasRotorEncoderIndex"> 1 </param>
<param name="HasSpeedEncoder"> 0 </param>
<param name="RotorIndexOffset"> 105 </param>
<param name="MotorPoles"> 8 </param>
<param name="MotorPoles"> 8 </param>
</group>

<group name="COUPLINGS">
Expand All @@ -61,7 +61,8 @@
</group>

<group name="JOINTSET_CFG">
<param name= "numberofsets"> 1 </param>
<param name= "numberofsets"> 1 </param>

<group name="JOINTSET_0">
<param name="listofjoints"> 0 </param>
<param name="constraint"> none </param>
Expand Down
158 changes: 70 additions & 88 deletions experimentalSetups/ankleSetup/hardware/motorControl/ankle-setup-mc.xml
Original file line number Diff line number Diff line change
@@ -1,127 +1,109 @@
<?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>
<!-- joint number 0 -->
<param name="jntPosMax"> -0.002 </param>
<param name="jntPosMin"> -99 </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>
<param name="velocity"> 100 </param>
</group>

<group name="IMPEDANCE">
<param name="stiffness"> 0 </param>
<param name="damping"> 0 </param>
<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>
<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>
<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>
<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>
<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>
<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>
<param name="deadZone"> 0.0049 </param>
</group>

</device>
Loading