Config Package
3 minute read
A config package holds the configuration a Motorcortex application reads at startup and while it runs — software parameter values, the EtherCAT bus layout, the links between modules, and the mechanism description.
Config packages are deployed from motorcortex.io to the controller. An application may also modify parameters and save them back, calibration values for instance, so the updated files can be fetched from the controller into your project again — see Portal Basics. Each fetch is timestamped, so you can track changes.
When a config package is deployed it is installed in /etc/motorcortex/apps-available/{config_package_name+timestamp}, and a link to that folder is created at /etc/motorcortex/config so the startup service knows which application to start.
The layout is set by config.json
There is no fixed file list. config.json is the only file the application is told about directly — on the motorcortex.conf command line — and every other path is named from inside it. That is why two config packages can look quite different and both be correct.
Linking is the clearest case: it is not one global setting but a key on each feature block, holding the file or files that feature links from. A robot application therefore carries one *.link.json per feature:
"ManipulatorControl": { "Linking": "linking/manipulator-control.link.json" },
"AGVControl": { "Linking": "linking/agv-control.link.json" },
"UdpComm": { "Linking": "udp/udp.link.json" }
A small hand-written application with one feature names a single file instead, commonly linking.json. Both are valid; the filename is yours to choose. The same is true of the licence file, whose name comes from the License setting.
Note
When a package looks unfamiliar, read its config.json first — it tells you which of these files that application actually uses.
A shipped config package
This is the layout of MCX-Anthropomorphic-Robot.conf, the config package of the standard robot application:
├── config.json # application startup parameters
├── motorcortex.conf # executable command line
├── control
│ ├── control.xml # application parameter values
│ └── persistence.bin # persistent parameter values
├── io
│ └── master.xml # EtherCAT bus configuration
├── linking # one file per feature
│ ├── base.link.json
│ ├── manipulator-control.link.json
│ ├── collision-detector.link.json
│ └── … # 14 in total
├── mech
│ └── mech-parameters.xml # mechanism description
├── motionfiles
│ └── 00_ExampleFile.csv # recorded joint trajectories
├── udp
│ ├── udp.link.json
│ └── udp.packets.json
└── user
└── parameters.json # user parameter definitions
Two more files appear once the application is installed on a controller rather than in the package: accounts.conf and the licence file. A io/firmware directory holds SII data for EtherCAT slaves whose EEPROM is too small.
The files
| File | Holds |
|---|---|
| config.json | Startup parameters, and the paths of every other file |
| motorcortex.conf | Which executable to run, and its command line |
| control.xml | Application parameter values, plus persistence.bin |
| io/master.xml | EtherCAT bus configuration |
| mech/mech-parameters.xml | Mechanism description and IK solver settings |
| linking/*.link.json | Links between module parameters, and set-parameter groups |
| udp/udp.packets.json | UDP packet definitions and their linking |
| user/parameters.json | Parameters added without recompiling |
| motionfiles | Recorded joint trajectories the motion player replays |
| accounts.conf | User accounts and passwords |
| license.lic | The application licence |