Skip to content

Performance Indicator calculation for periodic walking motions

License

Notifications You must be signed in to change notification settings

eurobench/eb_hum_bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance Indicator calculation for periodic walking motions

License BSD%202  Clause blue

Copyright Felix Aller 2020

Purpose

Scripts to calculate various performance indicators based on metrics from literature and physical quantities. Applicable to periodic walking motions on humanoid robots. Developed with the intention of integration into the EUROBENCH benchmarking framework. Tested on Python 3.8.

Installing the library

PIP3 can be used to install this module locally:

git clone https://gitlab.com/orb-benchmarking/eb_hum_bench.git
cd eb_hum_bench
python3 -m venv my_venv
source my_venv/bin/activate
pip3 install -e src/

Using the virtual environment, the package and dependencies are installed locally in the folder venv. To deactivate the virtual environment, type deactivate.

To install the code permanently, only use pip3 install -e src/.

Note: When adding or modifying Performance Indicators, run the installation command again. To keep the PIs up-to-date, run git pull and the installation command.

The code was tested using Python 3.8 on a machine running Linux. Apart from several Python3 libraries the code makes heavy use of RBDL and the Balance Addon.

Usage

To apply the PI calculation to data obtained from a specific robot, a .urdf model of the robotic systems must be provided and linked in a robot.yaml configuration file among other additional information about the robot which need to be specified in the file.

All PI (or a subset depending on the optional input files) associated to i3sa can be launched using (assuming folder output exists):

run_i3sa.py --conf tests/reemc_conf/robot.yaml --pos tests/input/2021_02_19/14/1/pos.csv --vel tests/input/2021_02_19/14/1/vel.csv --acc tests/input/2021_02_19/14/1/acc.csv --trq tests/input/2021_02_19/14/1/trq.csv --ftl tests/input/2021_02_19/14/1/ftl.csv --ftr tests/input/2021_02_19/14/1/ftr.csv --gait tests/input/2021_02_19/14/1/gaitEvents.yaml --out tests/output/

Input Files

  • model.urdf (required): location specified in robot.yaml (currently .lua model instead of .urdf)

  • robot.yaml(required): robot specific information; points to robot model

  • gaitEvents.yaml (required): contains information about the foot contacts i.e. support phase (double, single left/right)

  • joint_states.csv (required): joint angle file

  • joint_velocities.csv (optional): joint velocity file

  • joint_accelerations.csv (optional): joint acceleration file

  • joint_torques.csv (optional): joint torque file

  • grf_left.csv (optional): ground reaction forces file of left foot

  • grf_right.csv (optional): ground reaction forces file of right foot

Docker Image

Build from Source

docker build -t=i3sa .

Note: The Docker currently does not automatically pull this (private) repository. Please attach to the Docker and use your credentials to manually pull the code.

Pull docker image

An image maintained by Eurobench can be automatically downloaded, without needing to clone this code. First visit the Docker Hub page, and check the latest tag, which has to be used in the following command:

docker pull eurobenchtest/eb_hum_bench:tag
# if the name i3sa is to be maintained:
docker rename eurobenchtest/eb_hum_bench:tag i3sa:latest

Launch the docker image

Assuming the tests/reemc_conf/ contains the robot data (in this case REEM-C), tests/test/input contains the input data, the PI output will be written to output:

docker run --rm -v $PWD/tests/reemc_conf:/conf -v $PWD/tests/input/2021_02_19/14/1:/in -v $PWD/output:/out i3sa:latest run_i3sa.py --conf /conf/robot.yaml --model /conf/reemc.lua --pos /in/pos.csv --vel /in/vel.csv --acc /in/acc.csv --trq /in/trq.csv --ftl /in/ftl.csv --ftr /in/ftr.csv --gait /in/gaitEvents.yaml --out /out

Using the Eurobench constraint:

docker run --rm -v $PWD/tests/reemc_conf:/conf -v $PWD/tests/input/2021_02_19/14/1:/in -v $PWD/output:/out i3sa:latest run_i3sa /conf/robot.yaml /conf/reemc.lua /in/pos.csv  /in/vel.csv /in/acc.csv /in/trq.csv /in/ftl.csv /in/ftr.csv /in/gaitEvents.yaml /out

Example Data

The example data are obtained by executing the I3SA - Increased Step Size Stability Assessment protocol with the humanoid robot REEM-C by PAL Robotics. The input data in the input directory consits of several preprocessed .csv files based on a real benchmarking run.

I3SA PIs

Some of the resulting PI are calculated for several different gait Phases. We classify following phases:

  1. Complete: Complete dataset without segregation/classification.

  2. FL: Single support and Left Foot is stance foot.

  3. FR: Single support and Right Foot is stance foot.

  4. DFL: Double Support and Left Foot was the stance foot in the previous single support phase.

  5. DFR: Double Support and Right Foot was the stance foot in the previous single support phase.

The currently implemented PIs include:

  1. Center of Mass (COM): Average velocity, average acceleration (complete)

  2. Normalized Angular Momentum at COM: Integrated absolute angular momentum about all axes. Average absolute angular momentum about all axes (FL, FR, DFL, DFR)

  3. Zero Moment Point (ZMP): Average Distance to Base of Support (Dist-BoS), Integrated Dist-BOS, Min/max Dist-Bos (FL, FR, DFL, DFR)

  4. Center of Pressure (COP): Average Distance to Base of Support (Dist-BoS), Integrated Dist-BOS, Min/max Dist-Bos (FL, FR, DFL, DFR)

  5. Capture Point (CAP): Average Distance to Base of Support (Dist-BoS), Integrated Dist-BOS, Min/max Dist-Bos (FL, FR, DFL, DFR)

  6. Foot Placement Estimator (FPE): Average Distance to Base of Support (Dist-BoS), Integrated Dist-BOS, Min/max Dist-Bos (FL, FR, DFL, DFR)

  7. Base Orientation Error of the Pelvis: Average Norm of Base Orientation Error (complete)

  8. Travelled Distance: Travelled Distance (complete)

  9. Ground Reaction Force (GRF) impact: Average Max Impact (FL, FR, DFL, DFR)

  10. Linear and angular velocity of the Feet: Average of norm of linear and angular velocity (FL, FR, DFL, DFR)

Acknowledgements

cropped logoweb

Supported by Eurobench - the European robotic platform for bipedal locomotion benchmarking. More information: Eurobench website

Euro flag

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 779963. The opinions and arguments expressed reflect only the author‘s view and reflect in no way the European Commission‘s opinions. The European Commission is not responsible for any use that may be made of the information it contains.