Skip to content

Commit a8088b0

Browse files
authored
Correct amcfoc files to run a motor and update old lego setups (#732)
1 parent 436b1c7 commit a8088b0

File tree

5 files changed

+36
-119
lines changed

5 files changed

+36
-119
lines changed

experimentalSetups/lego_setup_amc_advfoc/hardware/motorControl/setup-eb2-j0_2-mc_service.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
</group>
105105
<group name="FIRMWARE">
106106
<param name="major"> 3 2 </param>
107-
<param name="minor"> 1 0 </param>
107+
<param name="minor"> 6 0 </param>
108108
<param name="build"> 0 10 </param>
109109
</group>
110110
</group>

experimentalSetups/lego_setup_amc_amcbldc/hardware/mechanicals/wrist-eb2-j0_2-mec.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
<param name="Encoder"> 182.044 </param>
1212
<param name="fullscalePWM"> 32000 </param>
1313
<param name="ampsToSensor"> 1000.0 </param>
14-
<param name="Gearbox_M2J"> -384.44 </param>
15-
<param name="Gearbox_E2J"> 1.778 </param>
14+
<param name="Gearbox_M2J"> -196 </param>
15+
<param name="Gearbox_E2J"> 1 </param>
1616
<param name="useMotorSpeedFbk"> 0 </param>
17-
<param name="MotorType"> "BLL_MOOG" </param>
18-
<param name="Verbose"> 0 </param>
17+
<param name="MotorType"> "FAULHABER" </param>
18+
<param name="Verbose"> 0 </param>
1919
</group>
2020

2121
<group name="LIMITS">
22-
<param name="hardwareJntPosMax"> 180 </param>
23-
<param name="hardwareJntPosMin"> -180 </param>
22+
<param name="hardwareJntPosMax"> 180 </param>
23+
<param name="hardwareJntPosMin"> -180 </param>
2424
<param name="rotorPosMin"> 0 </param>
2525
<param name="rotorPosMax"> 0 </param>
2626
</group>

experimentalSetups/lego_setup_amc_amcbldc/hardware/motorControl/wrist-eb2-j0_2-mc_service.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
</group>
2222
<group name="FIRMWARE">
2323
<param name="major"> 2 </param>
24-
<param name="minor"> 0 </param>
25-
<param name="build"> 4 </param>
24+
<param name="minor"> 1 </param>
25+
<param name="build"> 0 </param>
2626
</group>
2727
</group>
2828

@@ -34,9 +34,9 @@
3434
</group>
3535

3636
<group name="ENCODER1">
37-
<param name="type"> eomc_enc_aea </param>
37+
<param name="type"> aea3 </param>
3838
<param name="port"> CONN:J5_X1 </param>
39-
<param name="position"> eomc_pos_atjoint </param>
39+
<param name="position"> atjoint </param>
4040
<param name="resolution"> 4096 </param>
4141
<param name="tolerance"> 0.4 </param>
4242
</group>

experimentalSetups/lego_setup_amcfoc_advfoc/hardware/motorControl/setup-eb2-j0_0-mc.xml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
<!-- joint name -->
1414
<group name="LIMITS">
1515
<param name="jntPosMax"> 180 </param>
16-
<param name="jntPosMin"> -180 </param>
17-
<param name="jntVelMax"> 90 </param>
18-
<param name="motorNominalCurrents"> 1000 </param>
19-
<param name="motorPeakCurrents"> 1500 </param>
20-
<param name="motorOverloadCurrents"> 2000 </param>
21-
<param name="motorPwmLimit"> 16000 </param>
16+
<param name="jntPosMin"> -180 </param>
17+
<param name="jntVelMax"> 90 </param>
18+
<param name="motorNominalCurrents"> 1000 </param>
19+
<param name="motorPeakCurrents"> 1500 </param>
20+
<param name="motorOverloadCurrents"> 2000 </param>
21+
<param name="motorPwmLimit"> 16000 </param>
2222
</group>
2323

2424
<group name="TIMEOUTS">
25-
<param name="velocity"> 100 </param>
25+
<param name="velocity"> 100 </param>
2626
</group>
2727

2828
<group name="IMPEDANCE">
29-
<param name="stiffness"> 0 </param>
30-
<param name="damping"> 0 </param>
29+
<param name="stiffness"> 0 </param>
30+
<param name="damping"> 0 </param>
3131
</group>
3232

3333
<group name="CONTROLS">
@@ -43,18 +43,18 @@
4343
<!-- default position PID: begin -->
4444

4545
<group name="POS_PID_DEFAULT">
46-
<param name="controlLaw"> minjerk </param>
47-
<param name="outputType"> current </param>
48-
<param name="fbkControlUnits"> metric_units </param>
49-
<param name="outputControlUnits"> machine_units </param>
50-
<param name="kp"> -30 </param>
51-
<param name="kd"> -10 </param>
52-
<param name="ki"> -100 </param>
53-
<param name="maxOutput"> 500 </param>
54-
<param name="maxInt"> 200 </param>
55-
<param name="stictionUp"> 0 </param>
56-
<param name="stictionDown"> 0 </param>
57-
<param name="kff"> 0 </param>
46+
<param name="controlLaw"> minjerk </param>
47+
<param name="outputType"> pwm </param>
48+
<param name="fbkControlUnits"> metric_units </param>
49+
<param name="outputControlUnits"> machine_units </param>
50+
<param name="kp"> 200 </param>
51+
<param name="kd"> 0 </param>
52+
<param name="ki"> 40 </param>
53+
<param name="maxOutput"> 1600 </param>
54+
<param name="maxInt"> 1600 </param>
55+
<param name="stictionUp"> 0 </param>
56+
<param name="stictionDown"> 0 </param>
57+
<param name="kff"> 0 </param>
5858
</group>
5959

6060
<!-- default position PID: end -->
@@ -66,9 +66,9 @@
6666
<param name="controlLaw"> low_lev_current </param>
6767
<param name="fbkControlUnits"> machine_units </param>
6868
<param name="outputControlUnits"> machine_units </param>
69-
<param name="kp"> 2 </param>
69+
<param name="kp"> 0 </param>
7070
<param name="kd"> 0 </param>
71-
<param name="ki"> 500 </param>
71+
<param name="ki"> 0 </param>
7272
<param name="shift"> 0 </param>
7373
<param name="maxOutput"> 32000 </param>
7474
<param name="maxInt"> 32000 </param>

experimentalSetups/lego_setup_amcfoc_advfoc/hardware/motorControl/setup-eb2-j0_0-mc_service.xml

Lines changed: 2 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -4,90 +4,7 @@
44
<params xmlns:xi="http://www.w3.org/2001/XInclude" robot="setup" build="1">
55

66
<group name="SERVICE">
7-
8-
9-
<!--
10-
templates: description
11-
12-
the group templates is not parsed by icub-main and contains xml snapshots that help to compose the MC service
13-
14-
we can test two MC service types (advfoc and foc) with a number of actuator boards (amcbldc and amc2c).
15-
the controlling ETH board shall be:
16-
- amc for both the advfoc and foc MC service types;
17-
- ems for the single case of foc MC service type
18-
19-
so, you need to:
20-
1. pick up a type (either eomn_serv_MC_advfoc or eomn_serv_MC_foc)
21-
2. for the given type pick up the wanted ACTUATOR:
22-
- advfoc.ACTUATOR-01-amc2c-icc: the amc uses ICC to communicate w/ its second core
23-
- advfoc.ACTUATOR-02-amc2c-can: the amc uses CAN to communicate w/ its second core
24-
- advfoc.ACTUATOR-03-amcbldc-can: the amc uses CAN to communicate w/ an amcbldc
25-
- foc.ACTUATOR-01-amcbldc: the amc uses CAN to communicate w/ an amcbldc w/ legacy foc mode
26-
note: this mode is also available if we use an ems instead of the amc
27-
3. for the eomn_serv_MC_foc w/ amcbldc also put the amcbldc in first position as in the following
28-
29-
<group name="CANBOARDS">
30-
<param name="type"> amcbldc amc2c </param>
31-
<group name="PROTOCOL">
32-
<param name="major"> 2 2 </param>
33-
<param name="minor"> 0 0 </param>
34-
</group>
35-
<group name="FIRMWARE">
36-
<param name="major"> 2 3 </param>
37-
<param name="minor"> 0 0 </param>
38-
<param name="build"> 9 0 </param>
39-
</group>
40-
</group>
41-
42-
-->
43-
44-
<!--
45-
templates: code snippets
46-
47-
<group name="templates">
48-
49-
<group name="advfoc">
50-
51-
<param name="type"> eomn_serv_MC_advfoc </param>
52-
53-
<group name="ACTUATOR-01-amc2c-icc">
54-
<param name="type"> eomc_act_advfoc </param>
55-
<param name="onboard"> amc2c </param>
56-
<param name="port"> ICC1:3 </param>
57-
</group>
58-
59-
<group name="ACTUATOR-02-amc2c-can">
60-
<param name="type"> eomc_act_advfoc </param>
61-
<param name="onboard"> amc2c </param>
62-
<param name="port"> CAN1:3 </param>
63-
</group>
64-
65-
<group name="ACTUATOR-03-amcbldc-can">
66-
<param name="type"> eomc_act_advfoc </param>
67-
<param name="onboard"> amcbldc </param>
68-
<param name="port"> CAN1:1 </param>
69-
</group>
70-
71-
</group>
72-
73-
74-
<group name="foc">
75-
76-
<param name="type"> eomn_serv_MC_foc </param>
77-
78-
<group name="ACTUATOR-01-amcbldc">
79-
<param name="type"> eomc_act_foc </param>
80-
<param name="onboard"> amcbldc </param>
81-
<param name="port"> CAN1:1 </param>
82-
</group>
83-
84-
</group>
85-
86-
</group>
87-
88-
-->
89-
90-
7+
918
<param name="type"> eomn_serv_MC_advfoc </param>
929

9310
<group name="PROPERTIES">
@@ -103,7 +20,7 @@
10320
<param name="minor"> 0 </param>
10421
</group>
10522
<group name="FIRMWARE">
106-
<param name="major"> 0 </param> <!--put correct version number -->
23+
<param name="major"> 0 </param>
10724
<param name="minor"> 0 </param>
10825
<param name="build"> 0 </param>
10926
</group>

0 commit comments

Comments
 (0)