From e5dea54705a8825788bffee3c2444461c39660cb Mon Sep 17 00:00:00 2001 From: Gianni Borghesan Date: Thu, 24 Jun 2021 15:08:33 +0200 Subject: [PATCH 1/6] updated from getChannel to getConnection --- src/rtt_dot_service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtt_dot_service.cpp b/src/rtt_dot_service.cpp index beb91dc..4f0a10d 100644 --- a/src/rtt_dot_service.cpp +++ b/src/rtt_dot_service.cpp @@ -73,7 +73,7 @@ void Dot::scanService(std::string path, Service::shared_ptr sv) // Loop over all ports for(unsigned int j = 0; j < comp_ports.size(); j++){ log(Debug) << "Port: " << comp_ports[j] << endlog(); - std::list chns = sv->getPort(comp_ports[j])->getManager()->getChannels(); + std::list chns = sv->getPort(comp_ports[j])->getManager()->getConnections(); std::list::iterator k; if(chns.empty()){ log(Debug) << "Looks like we have an empty channel!" << endlog(); From 6afe5b80c8bc1381528b56a8b64a53e909b3295e Mon Sep 17 00:00:00 2001 From: Gianni Borghesan Date: Thu, 24 Jun 2021 15:08:47 +0200 Subject: [PATCH 2/6] documentation in the readme --- README | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index fa36af8..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -OROCOS dot service - -read the manifest.xml file for usage instructions From bfc928119e1d84d3cd284eab95fa667bb2de5f8c Mon Sep 17 00:00:00 2001 From: Gianni Borghesan Date: Thu, 24 Jun 2021 15:10:36 +0200 Subject: [PATCH 3/6] documentation in the readme --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..79b0799 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# OROCOS dot service + +_This branch is meant to be used in the contex of the rtt_ros integration._ + +Use the ros2 branch for ROS2-based installations. + +The rtt_dot_service is an RTT service which generates a file in the [DOT language format]("http://www.graphviz.org/doc/info/lang.html") containing an overview of your current deployment configuration. + It can be visualised with any DOT visualizer to give you an overview of: + + - all components currently deployed, together with their status information. + - all component ports (connected and unconnected), and how they are connected. + +The service takes into account all peer components of the component in which you load the service. To get an overview of your complete deployment configuration, load this service in the Deployer component. +You can trigger the execution: manually, using the `generate()` function, but it will execute automatically with every component update as well (don't forget to attach an activity to your Deployer component!) + +To use it, load the service in your Deployer component, e.g. in your .ops script, add: +``` + import("rtt_ros2") + ros.import("rtt_dot_service") + loadService("Deployer","dot") +``` + + or equivalently in a .lua script: + + ``` + rtt.provides("ros"):import("rtt_dot_service") + depl:loadService("Deployer","dot") +``` + +The service has a property, `dot_file`, which you can adjust to the file you like to be generated. The way components, connections and channels can be plotted can be tuned using the comp_args, conn_args and chan_args properties. Visualisation of the dot file is possible, e.g. with xdot: +``` + xdot orograph.dot +``` + +Colors are used to display the component's current state: + - Init - **white** + - PreOperational - **orange** + - FatalError, Exception, RunTimeError - **red** + - Stopped - **lightblue** + - Running - **green** + + +More information about the DOT language is available at http://www.graphviz.org/doc/info/lang.html and http://www.graphviz.org/Documentation/dotguide.pdf From 83b7de689d1eb3fade23342e85b7af567b457730 Mon Sep 17 00:00:00 2001 From: Gianni Date: Thu, 24 Jun 2021 15:16:07 +0200 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79b0799..7aadb56 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OROCOS dot service -_This branch is meant to be used in the contex of the rtt_ros integration._ +_This branch is meant to be used in the context of the rtt_ros integration._ Use the ros2 branch for ROS2-based installations. From e3d251e8a6123ca8b80879b9e8cc593313ef7c44 Mon Sep 17 00:00:00 2001 From: Gianni Date: Thu, 24 Jun 2021 15:16:54 +0200 Subject: [PATCH 5/6] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7aadb56..d8439e9 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,12 @@ The service has a property, `dot_file`, which you can adjust to the file you lik ``` Colors are used to display the component's current state: - - Init - **white** - - PreOperational - **orange** - - FatalError, Exception, RunTimeError - **red** - - Stopped - **lightblue** - - Running - **green** + + - Init - **white** + - PreOperational - **orange** + - FatalError, Exception, RunTimeError - **red** + - Stopped - **lightblue** + - Running - **green** More information about the DOT language is available at http://www.graphviz.org/doc/info/lang.html and http://www.graphviz.org/Documentation/dotguide.pdf From 66f1a85eb96c149aeca5e1d0af1766d9dcdb9361 Mon Sep 17 00:00:00 2001 From: Gianni Date: Wed, 7 Jul 2021 15:04:59 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8439e9..8a0232e 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,15 @@ To use it, load the service in your Deployer component, e.g. in your .ops script loadService("Deployer","dot") ``` - or equivalently in a .lua script: +or equivalently in a .lua script: ``` rtt.provides("ros"):import("rtt_dot_service") depl:loadService("Deployer","dot") ``` +To generate the graph, either set a period to the deployer, or trigger manually (`depl:trigger()`) + The service has a property, `dot_file`, which you can adjust to the file you like to be generated. The way components, connections and channels can be plotted can be tuned using the comp_args, conn_args and chan_args properties. Visualisation of the dot file is possible, e.g. with xdot: ``` xdot orograph.dot