This is the M2 control system.
Follow here to install the Rust in cRIO.
To avoid the stack overflow, do the following in the cRIO:
ulimit -s unlimitedTo run the application in the simulation mode by cargo, do:
cargo run -- -sYou can interrupt the running application by ctrl + c.
To get more information, do:
cargo run -- -hDo the following to build the executable:
cargo build --releaseThis will generate an optimized executable in the target/release/ directory, which is suitable for distribution.
The details can follow deployment.
See the config/ directory for the configuration files:
- cell/actuator directory has the actuator configuration files.
- lut/ directory has the look-up tables of gravity and temperature.
- parameters_app.yaml is the configuration of application.
- parameters_control.yaml is the configuration of control loop.
- parameters_power.yaml is the configuration of power system.
- cell_geom.yaml is the cell geometry.
- cell_actuator_mapping.yaml is the mapping between the cell and actuators.
- home_position.yaml is the home position of mirror.
- disp_ims.yaml has the information of displacement sensors used in the independent measurement system (IMS).
- stiff_matrix_m2.yaml is the stiffness matrix of M2 mirror.
- stiff_matrix_surrogate.yaml is the stiffness matrix of surrogate.
Some useful scripts are in script/ directory.
m2: Initialization file in the Linux system.
The logging files contain the mirror position are in the log/ directory.
While the application is running, you can see the system log in the log/application.log.
The logging level can be changed by the -l option when starting the application.
To format the code, do:
.githooks/pre-commitThe docker file is here that contains the dependencies to generate the test and coverage reports to support the CI integration.
Each module and function have the related unit tests. Since the CI test is needed, you can use the cargo-nextest instead of the built-in test framework. Do the following to run all tests:
cargo nextest runTo test a single module, do:
cargo nextest run --lib $module_nameTo generate the junit.xml (ouput path is target/nextest/ci/junit.xml), do:
cargo nextest run --profile ciSee here for the design of software.
The UML diagrams are used to detail the system design for each subsystem in the doc/ directory.
The GitHub supports the Mermaid natively.
You can use the online editor to edit them.
See here for the version history.