The benchmarking program is in the main.rs
and the benchmarking data and tools are in scripts
directory.
To install the testbench you'll need to have:
- Rust installed - see Rust installation
- EtherCAT IgH master installed - see EtherCAT IgH master installation
To install the testbench do the following:
git clone https://github.com/pollen-robotics/orbita2d_testbench.git
cd orbita2d_testbench
build the project:
cargo build --release
The benchmarking program is in the main.rs
. The benchmarking program takes in a timeseries csv file with the target values of the orbita2d actuator. The benchmarking program will send the target values to the orbita2d actuator and record the actual values of the actuator. The benchmarking program will output a csv file with the actual values of the actuator.
Generate the test input data by running the
generate_input_data.py
script in thescripts
directory. The script will output a csv file with the benchmarking input data.
To run the program do the following:
RUST_LOG=info cargo run --release --
The program will ask you the path to the input and the output csv files and will also use the default configuration file config/fake.yaml
. If you want to use a different configuration file, you can specify it with the --configfile
flag.
Additionally, you can specify the --viewer
flag to view the actuator in the Rerun
program.
Finally, you can also specify the input and output csv files with the --input-csv
and --output-csv
flags.
List of flags:
--configfile
- specify the configuration file (default isconfig/fake.yaml
, other options are for example:config/ethercat_poulpe.yaml
)--input-csv
- specify the input csv file--output-csv
- specify the output csv file--start-server
- start the EtherCAT server (IMPORTANT mandatory if not already running)--nb-loop
- number of iteration to make (default=1)--viewer
- view the actuator in theRerun
program- Note: the
Rerun
program must installed separately
cargo install cargo-binstall cargo binstall rerun-cli
- Note: the
- Run the test program with an input csv file:
- ie:
cargo run --release -- --start-server \
--configfile=config/ethercat_poulpe.yaml \
--input-csv=scripts/test_input.csv \
--output-csv=test_output.csv \
--viewer