From 4c528f9aa0640b014a599522379f26a39bf2e4d2 Mon Sep 17 00:00:00 2001 From: ipa-nhg Date: Tue, 31 Aug 2021 15:02:06 +0200 Subject: [PATCH] add documentation for the introspector --- README.md | 3 ++- docu/Introspection.md | 25 +++++++++++++++++++++++++ docu/NewRosModel.md | 4 ++-- docu/introspection.rosinstall | 8 ++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 docu/Introspection.md create mode 100644 docu/introspection.rosinstall diff --git a/README.md b/README.md index cf40bd4ad..4ce0ddce9 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,9 @@ Publications: - Create a model from your code: - (Prerequisite) [Add communication objects](docu/NewCommunicationObjects.md) - - [Create new ROS components](docu/NewProject.md) - [Create a ROS model from your source code(static code analyzer)](docu/NewRosModel.md) + - [Create a ROS model from a deployed robot using our introspection at runtime tool](docu/Introspection.md) + - [Create new ROS components](docu/NewProject.md) - [Generation of code from models](docu/CodeGeneration.md) - [Parameters definition](docu/Parameters.md) diff --git a/docu/Introspection.md b/docu/Introspection.md new file mode 100644 index 000000000..c17c90844 --- /dev/null +++ b/docu/Introspection.md @@ -0,0 +1,25 @@ +## Create a ROS model from a deployed robot using our introspection at runtime tool + +Please be sure that the tool is installed and your workspace setup, see the [installation guide](../README.md) for further details. + +The tools documented here were conceived as a simple way to obtain models of systems already developed during their execution. This series of scripts uses the popular ROS rosgraph library to obtain a list of the interfaces present in the system at runtime. + +You can install the tools directly on your workspace using the following command: + +``` +mkdir -p my_catkin_ws/src +cd my_catkin_ws/src +catkin_init_workspace +rosinstall . https://raw.githubusercontent.com/ipa320/ros-model/master/docu/introspection.rosinstall +cd my_catkin_ws +catkin_make (or catkin build) +``` + +To start the monitoring software the snapshot node has to be started on the same machine where the software to be analysed is running: + +``` +source my_catkin_ws/devel/setup.bash +rosrun rosgraph_monitor rossystem_snapshot +``` + +This script will generate automatically a new file (.rossystem) under the folder: 'rosgraph_monitor/results'. diff --git a/docu/NewRosModel.md b/docu/NewRosModel.md index 1c93fa15c..8e09322af 100644 --- a/docu/NewRosModel.md +++ b/docu/NewRosModel.md @@ -15,9 +15,9 @@ Under the link [Model extractor](http://ros-model.seronet-project.de/) a web ser ### Docker container -Clone the repository [ros-model-cloud](https://github.com/ipa320/ros-model-cloud) and follow its [documentation instructions](https://github.com/ipa320/ros-model-cloud/tree/master/extractor-interface) +Clone the repository [ros-model-extractors](https://github.com/ipa320/ros-model-extractors) and follow its [documentation instructions](https://github.com/ipa320/ros-model-extractors#ros-model-extractors). -Save the result content of the extraction as a ".ros" file in your tooling workspace. +Save the result content of the extraction as a ".ros" file in your tooling workspace. You can also contribute by sending us your generated files to be added to our database of models [RosCommonModels](https://github.com/ipa320/RosCommonModels). To check the created model open the file representation.aird with the Aird editor and in the menu representations choose the "component" option and press "New.." then choose the Artifact entity of your "*.ros" model and press finish. diff --git a/docu/introspection.rosinstall b/docu/introspection.rosinstall new file mode 100644 index 000000000..6a559db02 --- /dev/null +++ b/docu/introspection.rosinstall @@ -0,0 +1,8 @@ +- git: + local-name: ros_model_parser + uri: https://github.com/ipa-nhg/ros_model_parser.git + version: fix-value +- git: + local-name: rosgraph_monitor + uri: https://github.com/ipa-nhg/rosgraph_monitor.git + version: rossystem_snapshot