From f95bfa144ceb8453482c091ecc638fa799bde1b2 Mon Sep 17 00:00:00 2001 From: Martina Gloria <114698424+martinaxgloria@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:02:55 +0100 Subject: [PATCH] Keep the documentation updated (#209) --- .github/workflows/gh-pages.yml | 3 ++ doc/mkdocs/docs/ergoCubEmotions.md | 26 ------------- doc/mkdocs/docs/ergocubemotions.md | 1 + doc/mkdocs/docs/index.md | 60 +---------------------------- doc/mkdocs/docs/modules_intro.md | 2 +- doc/mkdocs/site-compile.sh | 3 +- doc/mkdocs/mkdocs.yml => mkdocs.yml | 4 +- 7 files changed, 11 insertions(+), 88 deletions(-) delete mode 100644 doc/mkdocs/docs/ergoCubEmotions.md create mode 100644 doc/mkdocs/docs/ergocubemotions.md rename doc/mkdocs/mkdocs.yml => mkdocs.yml (96%) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a8a1704e..4ea8b787 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,6 +4,9 @@ on: push: branches: - 'master' + pull_request: + branches: + - 'master' jobs: docs: diff --git a/doc/mkdocs/docs/ergoCubEmotions.md b/doc/mkdocs/docs/ergoCubEmotions.md deleted file mode 100644 index 15044186..00000000 --- a/doc/mkdocs/docs/ergoCubEmotions.md +++ /dev/null @@ -1,26 +0,0 @@ - -# ergoCubEmotions - -This repo contains the `ergoCubEmotions` module that allows displaying several facial expressions on ergoCub. - -![type:video](https://user-images.githubusercontent.com/114698424/236434116-8c9d69a1-5cce-43b8-8655-6fc3d20aec82.mp4) - -This module can be run enabling the cmake flag `COMPILE_ergoCubEmotions` and it needs [OpenCV v4.x](https://github.com/opencv/opencv) or higher to be used. - -## Usage - -```sh -mkdir build -cd build -cmake -DCOMPILE_ergoCubEmotions=BOOL:ON .. -make -(make install) -``` - -The module is already integrated in `yarpmanager` and, in order to use it, run the following command in a console: - -```console -yarp rpc /ergoCubEmotions/rpc -``` - -The module is ["_thrifted_"](https://yarp.it/latest/idl_thrift.html), hence you can get a list of the available options via the `help` command. \ No newline at end of file diff --git a/doc/mkdocs/docs/ergocubemotions.md b/doc/mkdocs/docs/ergocubemotions.md new file mode 100644 index 00000000..709d65f7 --- /dev/null +++ b/doc/mkdocs/docs/ergocubemotions.md @@ -0,0 +1 @@ +--8<-- "src/modules/ergoCubEmotions/README.md" \ No newline at end of file diff --git a/doc/mkdocs/docs/index.md b/doc/mkdocs/docs/index.md index 50e50e7c..4ab0748e 100644 --- a/doc/mkdocs/docs/index.md +++ b/doc/mkdocs/docs/index.md @@ -1,59 +1 @@ -# ergoCub Software - -Main collector of ergoCub specific SW - -## Installation - -For installing it just: - -```sh -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX= .. -make -(make install) -``` - -`ergocub` model needs [Gazebo YARP Plugins v4.6.0](https://github.com/robotology/gazebo-yarp-plugins/releases/tag/v4.6.0) or higher in order to be used. - -In order to use the model, the following env variables must be configured: - -```sh -# ergoCub model in YARP -export YARP_DATA_DIRS=${YARP_DATA_DIRS}:/share/ergoCub -# ergoCub model in Gazebo -export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:/share/ergoCub/robots -export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:/share/ -``` - -## Run Whole-body-dynamics - -Currently whole-body-dynamics does not run along with `ergoCubGazeboV1`. To start it please run the following command in a console once `yarpserver` and -the robot has been placed in `gazebo` - -```console -yarprobotinterface --config conf/launch_wholebodydynamics_ecub.xml -``` - -## URDF generation - -This repo hosts the `ergoCub` urdf, enabling the cmake flag `ERGOCUB_MODEL_GENERATE_SIMMECHANICS` it is possible to generate it from simmechanics xml. -Enabling also `ERGOCUB_MODEL_COPY_TO_SRC` the generated models are copied in the `urdf` directory for being committed. - -### Dependencies - -- [Ruby](https://www.ruby-lang.org/en/) -- [iDynTree](https://github.com/robotology/idyntree) -- [YARP](https://github.com/robotology/yarp) -- [simmechanics-to-urdf](https://github.com/robotology/simmechanics-to-urdf) - -### Usage - -```sh -mkdir build -cd build -cmake -DERGOCUB_MODEL_GENERATE_SIMMECHANICS=BOOL:ON -DERGOCUB_MODEL_COPY_TO_SRC=BOOL:ON .. -make -(make install) -``` - +--8<-- "README.md" \ No newline at end of file diff --git a/doc/mkdocs/docs/modules_intro.md b/doc/mkdocs/docs/modules_intro.md index 6d063f9d..0df51238 100644 --- a/doc/mkdocs/docs/modules_intro.md +++ b/doc/mkdocs/docs/modules_intro.md @@ -2,4 +2,4 @@ These are the modules currently available: -- [ergoCubEmotions](ergoCubEmotions.md) \ No newline at end of file +- [ergoCubEmotions](ergocubemotions.md) \ No newline at end of file diff --git a/doc/mkdocs/site-compile.sh b/doc/mkdocs/site-compile.sh index 12a3e594..9803a7f1 100755 --- a/doc/mkdocs/site-compile.sh +++ b/doc/mkdocs/site-compile.sh @@ -1,3 +1,4 @@ #!/bin/bash -mkdocs build -c -v --site-dir site +cd ../../ +mkdocs build -c -v --site-dir doc/mkdocs/site diff --git a/doc/mkdocs/mkdocs.yml b/mkdocs.yml similarity index 96% rename from doc/mkdocs/mkdocs.yml rename to mkdocs.yml index 14e04fc3..4f60902a 100644 --- a/doc/mkdocs/mkdocs.yml +++ b/mkdocs.yml @@ -7,6 +7,7 @@ copyright: BSD 3-Clause License repo_name: icub-tech-iit/ergocub-software repo_url: https://github.com/icub-tech-iit/ergocub-software/ edit_uri: 'edit/master/doc/mkdocs/docs' +docs_dir: 'doc/mkdocs/docs' markdown_extensions: - attr_list @@ -17,6 +18,7 @@ markdown_extensions: - pymdownx.caret - pymdownx.critic - pymdownx.details + - pymdownx.snippets - pymdownx.inlinehilite - pymdownx.highlight - pymdownx.keys @@ -96,4 +98,4 @@ nav: - Documentation: https://icub-tech-iit.github.io/ergocub-software/doc/doxygen/doc/html/index.html - Modules: - Getting started: 'modules_intro.md' - - ergoCubEmotions: 'ergoCubEmotions.md' \ No newline at end of file + - ergoCubEmotions: 'ergocubemotions.md' \ No newline at end of file