Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to rst format #9

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build/
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
11 changes: 11 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# RosTooling.github.io

This repository holds the source and configuration files used to generate the [RosTooling documentation](https://ipa320.github.io/RosTooling.github.io/) page.

Dependencies for Build:
* [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)
* `sudo apt install python3-pip`
* `pip install sphinx`
* `sphinx-build -b html . _build`

The last command will create a _build folder to contain the html implementation.
74 changes: 0 additions & 74 deletions README.md

This file was deleted.

2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
theme: jekyll-theme-cayman
theme: jekyll-theme-slate
27 changes: 27 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'RosTooling.github.io'
copyright = '2024, Nadia Hammoudeh Garcia'
author = 'Nadia Hammoudeh Garcia'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx_rtd_theme']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
17 changes: 0 additions & 17 deletions docu/CodeGeneration.md

This file was deleted.

24 changes: 24 additions & 0 deletions docu/CodeGeneration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Systems code generator review
=============================

For the System model, the generation of code is automatic. This means if your model is correct and follows the connection rules, Xtext will automatically generate a ROS package into the *src-gen* folder, which has the typical structure of a Python package meant to hold launch file artifacts. More concretely:

- **README file**: This file will always be generated, even in cases of a system that only points to an existing launch file. The README contains information about the design of the system, as well as how to install the dependencies, set up the workspace to hold the created implementation, and start the generated artifact.

- **setup.py script**: This is the standard script required for a Python package, specifically created for the structure of this package.

- **package.xml file**: A template for the `package.xml` of the package, which contains the specification of all the required dependencies to start the package. The user should complete the type of license, maintainer, owner, and description of the package.

- **CMakeLists.txt**: A template of the `package.xml`, which includes the required tags to install the newly created files.

- **launch/NameOfTheSystem.launch.py script**: This is the core of the generator. It is a **ready-to-execute** file based on the `.rossystem` description:
- Add includes for all the defined nodes as components
- Define and set the values of the parameters. For packages containing more than 5 parameters, the `.yaml` file under the "config" folder will be loaded and launched.
- Remap topics to force connections (only working for nodes that are part of the system as components, not for subsystems). See `known issues <RosTooling_issues.rst#code-generators>`_.
- Include other launch files from subsystems.

- **resource/NameOfTheSystem.puml**: `An example of a PlantUML implementation of the described system <SystemModelsVisualization.rst#open-the-plantuml-auto-generated-description>`_.

- **config/NameOfTheSystem.yaml**: This file contains the configuration of the parameters. It will only be used if there are 5 or more parameters.

With the current implementation of RosTooling, adding new code generators to the `.rossystem` representation is very easy. Please report on our survey's open-ended questions regarding your wishes, such as the generation of install scripts, Docker container configuration, or ROS1-ROS2 bridges.
7 changes: 0 additions & 7 deletions docu/CreateYourModel.md

This file was deleted.

8 changes: 8 additions & 0 deletions docu/CreateYourModel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Create your model
=================

You can create a new file with the extension `.ros2` in the `rosnodes` folder from the previously created `project <LearnRosModels.rst>`_ by right-clicking on the folder and selecting **New -> File**.

This will create an empty file where you can create your model. As a helper, you can use the `reference documentation <RosModelDescription.rst>`_ and press **Ctrl + Space** to use the auto-complete functionality.

If auto-complete or the grammar highlighting is not working, check that the file is opened with the "Ros 2 Editor" by right-clicking on the file and selecting **Open with...**.
34 changes: 0 additions & 34 deletions docu/Environment_setup.md

This file was deleted.

35 changes: 35 additions & 0 deletions docu/Environment_setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Setup the environment and start the Eclipse application
=======================================================

Switch to the ROS Developer perspective
---------------------------------------

Go to Menu *Window* -> *Perspective* -> *Open Perspective* -> *Other...* -> *ROS developer*. Your application toolbar will be automatically configured.

Import the common communication objects project
-----------------------------------------------

Import the project located under the "ROSCommonObjects" folder of this repository to the workbench of your application:

.. code-block:: none

de.fraunhofer.ipa.ros.communication.objects

If you have an internet connection, you can use the button that clones the objects from GitHub into your workspace and imports them automatically:

.. image:: images/clone_and_import.png

.. image:: images/Attention.png

This button will only work on Linux machines. Alternatively, you can manually clone the `repository <https://github.com/ipa320/RosCommonObjects>`_ and import the project by navigating to *File* -> *Import* -> *General* -> *Existing Projects into Workspace*.
Then select the container folder of the cloned repository.

Import the catalog
------------------

You can also download and import a pre-existing catalog of examples. The catalog is publicly available on GitHub: `ipa-nhg/RosModelsCatalog <https://github.com/ipa-nhg/RosModelsCatalog>`_.

Please clone the repository and import it into your Eclipse workspace. This can be easily done by navigating to *File* -> *Import* -> *General* -> *Existing Projects into Workspace*.
Then select the container folder of the cloned repository.

.. image:: images/01_mobile_base_b.gif
Loading