├── fkie_iop_component
├── include
│ ├── JConstants.h
│ └── fkie_iop_component
│ │ ├── timer.hpp
│ │ └── timestamp.hpp
├── README.md
├── package.xml
├── src
│ ├── main.cpp
│ └── iop_config.cpp
└── CMakeLists.txt
├── doc
├── images
│ ├── iop-bridge-case1.png
│ ├── iop-bridge-case2.png
│ ├── iop-bridge-component.png
│ └── iop-bridge-controllib-layer.png
├── install_oracle_java.md
├── examples.md
├── how_it_works.md
└── iop_core_packages.md
├── jaustoolset
├── templates
│ ├── component
│ │ ├── main.cpp.tpl
│ │ ├── %component_name%.h.tpl_
│ │ ├── main.cs.tpl
│ │ ├── Main.java.tpl
│ │ ├── %component_name%.cs.tpl
│ │ ├── %component_name%.java.tpl
│ │ └── %component_name%.cpp.tpl_
│ ├── statemachine
│ │ ├── %statemachine_name%.cpp.tpl
│ │ ├── %statemachine_name%.cs.tpl
│ │ ├── %statemachine_name%.java.tpl
│ │ └── %statemachine_name%.h.tpl
│ └── service
│ │ ├── %service_name%.h.tpl
│ │ ├── %service_name%.java.tpl
│ │ └── %service_name%.cs.tpl
├── libs_external
│ ├── smc
│ │ ├── Smc.jar
│ │ └── statemap.jar
│ ├── jargs-1.0
│ │ └── jargs.jar
│ ├── jaxb
│ │ ├── jaxb-core-2.3.0.1.jar
│ │ ├── javax.activation-api-1.2.0.jar
│ │ ├── jaxb-api-2.4.0-b180830.0359.jar
│ │ └── jaxb-impl-2.4.0-b180830.0438.jar
│ └── runtime
│ │ └── commons-lang-2.5.jar
├── resources
│ └── schema
│ │ └── JSIDL_Plus
│ │ ├── jsidl_plus.rnc
│ │ ├── version_1_1.xsd
│ │ └── xml.xsd
├── src
│ ├── org
│ │ └── jts
│ │ │ ├── jsidl
│ │ │ └── binding
│ │ │ │ └── package-info.java
│ │ │ └── codegenerator
│ │ │ ├── support
│ │ │ ├── EMemberVisibility.java
│ │ │ ├── IVisibility.java
│ │ │ ├── FieldDeclaration.java
│ │ │ ├── FileExtensionFilter.java
│ │ │ ├── PathExtender.java
│ │ │ ├── FileFilter.java
│ │ │ └── Reference.java
│ │ │ ├── CodeGeneratorException.java
│ │ │ └── Pair.java
│ ├── rte
│ │ └── jts_node_manager.cpp
│ └── SimpleThread.cpp
├── package.xml
├── scripts
│ └── jaus_node_manager.sh
├── cmake
│ └── jts_cfg.cmake
└── include
│ ├── Transport
│ ├── JUDPTransportL.h
│ ├── JUDPTransport.h
│ └── ChecksumCRC.h
│ ├── rte
│ ├── JUDPTransportLB.h
│ ├── JTCPTransport.h
│ └── JSerial.h
│ ├── SimpleThread.h
│ ├── Messages
│ └── Message.h
│ ├── InternalEvents
│ ├── InternalEventHandler.h
│ └── InternalEvent.h
│ └── EventReceiver.h
├── dependencies.rosinstall
├── NOTICE
├── iop_foxy.rosinstall
├── fkie_iop_transport
├── README.md
├── plugin_iop.xml
├── package.xml
├── include
│ └── urn_jaus_jss_core_Transport
│ │ └── TransportService.h
└── CMakeLists.txt
├── fkie_iop_liveness
├── plugin_iop.xml
├── README.md
├── package.xml
└── CMakeLists.txt
├── .gitignore
├── fkie_iop_events
├── plugin_iop.xml
├── package.xml
├── README.md
├── include
│ └── fkie_iop_events
│ │ ├── EventsConfig.h
│ │ └── EventHandlerInterface.h
└── src
│ └── EventsConfig.cpp
├── fkie_iop_discovery
├── plugin_iop.xml
├── launch
│ ├── discovery_services.yaml
│ └── discovery_client.launch.xml
├── package.xml
├── include
│ ├── fkie_iop_discovery
│ │ ├── DiscoveryServiceList.h
│ │ ├── DiscoveryServiceDef.h
│ │ ├── DiscoveryComponent.h
│ │ └── DiscoveryComponentList.h
│ ├── urn_jaus_jss_core_Discovery
│ │ └── DiscoveryService.h
│ └── urn_jaus_jss_core_DiscoveryClient
│ │ └── DiscoveryClientService.h
└── src
│ ├── DiscoveryServiceList.cpp
│ ├── DiscoveryClient.cpp
│ ├── DiscoveryComponent.cpp
│ └── DiscoveryServiceDef.cpp
├── fkie_iop_builder
├── jsidl
│ ├── urn.jaus.jss.core-v1.1
│ │ └── MessageSet
│ │ │ ├── BasicConstants.xml
│ │ │ └── MessageSet.xml
│ ├── urn.jaus.jss.environmentSensing
│ │ └── MessageSet
│ │ │ ├── BasicConstants.xml
│ │ │ └── MessageSet.xml
│ ├── urn.jaus.jss.manipulator-v2.0
│ │ ├── MessageSet
│ │ │ ├── BasicConstants.xml
│ │ │ └── MessageSet.xml
│ │ ├── PanTiltMotionProfileServiceClient.xml
│ │ ├── PanTiltSpecificationServiceClient.xml
│ │ ├── ManipulatorSpecificationServiceClient.xml
│ │ └── PanTiltJointPositionSensorClient.xml
│ ├── urn.jaus.jss.manipulator
│ │ └── MessageSet
│ │ │ ├── BasicConstants.xml
│ │ │ └── MessageSet.xml
│ ├── urn.jaus.jss.mobility
│ │ ├── MessageSet
│ │ │ ├── BasicConstants.xml
│ │ │ └── MessageSet.xml
│ │ └── PrimitiveDriverClient.xml
│ ├── urn.jaus.jss.core-v1.0
│ │ ├── MessageSet
│ │ │ └── MessageSet.xml
│ │ ├── Liveliness.xml
│ │ └── ManagementClient.xml
│ └── urn.jaus.jss.iop
│ │ ├── MessageSet
│ │ └── MessageSet.xml
│ │ ├── UnsolicitedHeartbeat.xml
│ │ ├── HealthMonitorClient_V1.4.xml
│ │ └── MeasurementSensorClient.xml
├── package.xml
├── cmake
│ ├── cpy.py
│ └── cpp.py
├── include
│ └── fkie_iop_builder
│ │ └── util.h
└── CMakeLists.txt
├── .github
└── workflows
│ └── main.yml
├── fkie_iop_management
├── plugin_iop.xml
├── package.xml
└── README.md
├── fkie_iop_list_manager
├── plugin_iop.xml
├── README.md
├── package.xml
└── include
│ └── fkie_iop_list_manager
│ ├── ListManagerListenerInterface.h
│ └── InternalElement.h
├── fkie_iop_accesscontrol
├── plugin_iop.xml
├── package.xml
├── README.md
└── include
│ └── fkie_iop_accesscontrol
│ ├── RemoteComponent.h
│ └── RemoteComponentList.h
├── CONTRIBUTIONS
├── iop_robot.rosinstall
├── fkie_iop_ocu_slavelib
├── package.xml
├── include
│ └── fkie_iop_ocu_slavelib
│ │ ├── common.h
│ │ ├── Component.h
│ │ └── ServiceInfo.h
├── CMakeLists.txt
├── README.md
└── src
│ └── Component.cpp
├── iop_ocu.rosinstall
└── iop.rosinstall
/fkie_iop_component/include/JConstants.h:
--------------------------------------------------------------------------------
1 | #ifndef JCONSTANTS_H
2 | #define JCONSTANTS_H
3 | #endif
4 |
--------------------------------------------------------------------------------
/doc/images/iop-bridge-case1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/doc/images/iop-bridge-case1.png
--------------------------------------------------------------------------------
/doc/images/iop-bridge-case2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/doc/images/iop-bridge-case2.png
--------------------------------------------------------------------------------
/jaustoolset/templates/component/main.cpp.tpl:
--------------------------------------------------------------------------------
1 | // empty, if no executable service implemented for this library
2 |
--------------------------------------------------------------------------------
/doc/images/iop-bridge-component.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/doc/images/iop-bridge-component.png
--------------------------------------------------------------------------------
/jaustoolset/libs_external/smc/Smc.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/smc/Smc.jar
--------------------------------------------------------------------------------
/doc/images/iop-bridge-controllib-layer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/doc/images/iop-bridge-controllib-layer.png
--------------------------------------------------------------------------------
/jaustoolset/libs_external/smc/statemap.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/smc/statemap.jar
--------------------------------------------------------------------------------
/dependencies.rosinstall:
--------------------------------------------------------------------------------
1 | - git:
2 | local-name: iop_msgs
3 | uri: https://github.com/fkie/iop_msgs
4 | version: ros2
5 |
6 |
7 |
--------------------------------------------------------------------------------
/jaustoolset/libs_external/jargs-1.0/jargs.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/jargs-1.0/jargs.jar
--------------------------------------------------------------------------------
/jaustoolset/libs_external/jaxb/jaxb-core-2.3.0.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/jaxb/jaxb-core-2.3.0.1.jar
--------------------------------------------------------------------------------
/jaustoolset/libs_external/runtime/commons-lang-2.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/runtime/commons-lang-2.5.jar
--------------------------------------------------------------------------------
/jaustoolset/resources/schema/JSIDL_Plus/jsidl_plus.rnc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/resources/schema/JSIDL_Plus/jsidl_plus.rnc
--------------------------------------------------------------------------------
/jaustoolset/libs_external/jaxb/javax.activation-api-1.2.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/jaxb/javax.activation-api-1.2.0.jar
--------------------------------------------------------------------------------
/jaustoolset/libs_external/jaxb/jaxb-api-2.4.0-b180830.0359.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/jaxb/jaxb-api-2.4.0-b180830.0359.jar
--------------------------------------------------------------------------------
/jaustoolset/libs_external/jaxb/jaxb-impl-2.4.0-b180830.0438.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fkie/iop_core/HEAD/jaustoolset/libs_external/jaxb/jaxb-impl-2.4.0-b180830.0438.jar
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | ROS/IOP Bridge contains subcomponents with separate copyright notices and
2 | license terms. Your use of the source code for the these subcomponents
3 | is subject to the terms and conditions of their respective licenses.
4 |
--------------------------------------------------------------------------------
/iop_foxy.rosinstall:
--------------------------------------------------------------------------------
1 | - git:
2 | local-name: iop_msgs
3 | uri: https://github.com/fkie/iop_msgs
4 | version: ros2
5 | - git:
6 | local-name: iop_core
7 | uri: https://github.com/fkie/iop_core
8 | version: ros2
9 |
--------------------------------------------------------------------------------
/fkie_iop_transport/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## _fkie_iop_transport:_ Transport
5 |
6 | No function beside generated code, it's only plugin.
7 |
--------------------------------------------------------------------------------
/fkie_iop_liveness/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fkie_iop_transport/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.diff
2 | *.gen
3 | .project
4 | .cproject
5 | .pydevproject
6 | *.pyc
7 | .*.swp
8 | *~
9 | .settings/
10 | **/msg/*.py
11 | **/srv/*.py
12 | *.zip
13 | *.7z
14 | *.deb
15 | *.dsc
16 | *.changes
17 | *.build
18 | *.tar
19 | *.tar.*
20 | Copy of*
21 | Kopie von*
22 | .idea/
23 | .fullbuild
24 | .rebuild
25 | jaustoolset/build/jaustoolset/
26 | .vscode/
27 |
--------------------------------------------------------------------------------
/fkie_iop_liveness/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## _fkie_iop_liveness:_ Liveness
5 |
6 | This service sends ReportHeartbeatPulse on request or as event.
7 |
8 | #### Parameter:
9 |
10 | > None
11 |
12 | #### Publisher:
13 |
14 | > None
15 |
16 | #### Subscriber:
17 |
18 | > None
19 |
20 |
--------------------------------------------------------------------------------
/doc/install_oracle_java.md:
--------------------------------------------------------------------------------
1 | # Installation of [Oracle Java 7 JDK](https://help.ubuntu.com/community/Java)
2 |
3 | >JAUS Tool Set does not work with java 8!
4 |
5 | sudo apt-get install python-software-properties
6 | sudo add-apt-repository ppa:webupd8team/java
7 | sudo apt-get update
8 | sudo apt-get install oracle-java7-installer
9 | sudo apt-get install oracle-java7-set-default
10 |
--------------------------------------------------------------------------------
/fkie_iop_events/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.core-v1.1/MessageSet/BasicConstants.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: jazzy
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | industrial_ci:
7 | strategy:
8 | matrix:
9 | env:
10 | - {ROS_DISTRO: jazzy, UPSTREAM_WORKSPACE: 'dependencies.rosinstall', CMAKE_ARGS: '--event-handlers console_direct+'}
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 | - uses: 'ros-industrial/industrial_ci@master'
15 | env: ${{matrix.env}}
16 |
--------------------------------------------------------------------------------
/fkie_iop_management/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.environmentSensing/MessageSet/BasicConstants.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/fkie_iop_list_manager/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fkie_iop_accesscontrol/plugin_iop.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.manipulator-v2.0/MessageSet/BasicConstants.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fkie_iop_component/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## fkie_iop_component
5 |
6 | Contains the plugin interface for all IOP services. The services which implement this interface can be included into the component on start. The **iop_component** binary represents an IOP component. The services of this component can be configured dynamically. For further details see [how it works](how_it_works.md) or [simulation example](https://github.com/fkie/fkie_iop_cfg_sim_stage/blob/master/README.md)
7 |
8 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.manipulator/MessageSet/BasicConstants.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.mobility/MessageSet/BasicConstants.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/jaustoolset/src/org/jts/jsidl/binding/package-info.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
3 | // See http://java.sun.com/xml/jaxb
4 | // Any modifications to this file will be lost upon recompilation of the source schema.
5 | // Generated on: 2018.12.21 at 10:07:33 AM CET
6 | //
7 |
8 | @javax.xml.bind.annotation.XmlSchema(namespace = "urn:jaus:jsidl:1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
9 | package org.jts.jsidl.binding;
10 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/launch/discovery_services.yaml:
--------------------------------------------------------------------------------
1 | iop_discovery_node:
2 | ros__parameters:
3 | iop_services:
4 | - fkie_iop_discovery/Discovery
5 | - fkie_iop_list_manager/ListManager
6 | - fkie_iop_list_manager/ListManagerClient
7 | Events.timeout: 5
8 | Discovery:
9 | # 0: Reserved, 1: System Identification, 2: Subsystem Identification, 3: Node Identification, 4: Component Identification, 5 – 255: Reserved
10 | system_id: 2
11 | # 10001: VEHICLE, 20001: OCU, 30001: OTHER_SUBSYSTEM, 40001: NODE, 50001: PAYLOAD, 60001: COMPONENT
12 | system_type: 10001
13 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.core-v1.1/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.core-v1.0/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.environmentSensing/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/jaustoolset/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | jaustoolset
4 | 3.3.0
5 | Reduced version of JausToolSet (http://jaustoolset.org/)
6 | Alexander Tiderko
7 | BSD
8 | ament_cmake
9 |
10 | tinyxml2_vendor
11 | java
12 |
13 | ament_lint_auto
14 | ament_lint_common
15 |
16 | ament_cmake
17 |
18 |
19 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/launch/discovery_client.launch.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/jaustoolset/templates/statemachine/%statemachine_name%.cpp.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | %user_include_definitions%
4 |
5 | %user_constants_definitions%
6 |
7 | using namespace JTS;
8 |
9 | namespace %service_namespace%
10 | {
11 |
12 | %user_definitions%
13 |
14 | %statemachine_name%::%statemachine_name%(%parent_fsm_arguments%)
15 | %sm_constuctor%
16 |
17 | %statemachine_name%::~%statemachine_name%()
18 | {
19 | delete context;
20 | }
21 |
22 | void %statemachine_name%::setupNotifications()
23 | {
24 | %setup_notifications%
25 | }
26 |
27 | %setup_iop_configuration%
28 |
29 | %action_method_definitions%
30 |
31 | %guard_method_definitions%
32 |
33 | }
--------------------------------------------------------------------------------
/jaustoolset/templates/statemachine/%statemachine_name%.cs.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | using JTS;
4 | using System;
5 |
6 |
7 |
8 | namespace %service_namespace%
9 | {
10 | public class %statemachine_name% : StateMachine{
11 | %parent_fsm_references%
12 | public %statemachine_name%Context context;
13 |
14 | %user_definitions%
15 |
16 | public %statemachine_name%(%parent_fsm_arguments%)
17 | %sm_constuctor%
18 |
19 | /// Handle notifications on parent state changes
20 | public override void setupNotifications()
21 | {
22 | %setup_notifications%
23 | }
24 |
25 | %action_method_definitions%
26 |
27 | %guard_method_definitions%
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/fkie_iop_list_manager/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## _fkie_iop_list_manager:_ ListManager
5 |
6 | Implements list manager functionality used e.g. by GlobalWaypointListDriver
7 |
8 | #### Parameter:
9 |
10 | > None
11 |
12 | #### Publisher:
13 |
14 | > None
15 |
16 | #### Subscriber:
17 |
18 | > None
19 |
20 |
21 | ## _fkie_iop_list_manager:_ ListManagerClient
22 |
23 | Implements client for list manager functionality used e.g. by GlobalWaypointListDriverClient
24 |
25 | #### Parameter:
26 |
27 | > None
28 |
29 | #### Publisher:
30 |
31 | > None
32 |
33 | #### Subscriber:
34 |
35 | > None
36 |
37 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.manipulator-v2.0/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
--------------------------------------------------------------------------------
/doc/examples.md:
--------------------------------------------------------------------------------
1 | For convenient usage of ROS environment use the `node_manager` of `multimaster_fkie`. You can install it from ROS apt repository or from [https://github.com/fkie/multimaster_fkie](https://github.com/fkie/multimaster_fkie) using
2 |
3 | git clone https://github.com/fkie/multimaster_fkie
4 |
5 | On each host you run IOP components you need to start the JTS-`nodeManager`:
6 | ```bash
7 | rosrun fkie_iop_builder jaus_node_manager.sh start
8 | ```
9 |
10 | ## `fkie_iop_cfg_sim_stage`
11 | This package contains working configuration files specified to run with a stage simulator.
12 |
13 | You can find the description to this example on https://github.com/fkie/iop_examples/blob/master/fkie_iop_cfg_sim_stage/README.md
14 |
--------------------------------------------------------------------------------
/CONTRIBUTIONS:
--------------------------------------------------------------------------------
1 | If you wish to submit contributions to this software for inclusion in our
2 | repository (such as pull requests), we need you to sign a Contributor License
3 | Agreement ("CLA") to grant us a perpetual, worldwide, non-exclusive,
4 | no-charge, royalty-free, irrevocable copyright license to reproduce,
5 | prepare derivative works of, publicly display, publicly perform, sublicense,
6 | and distribute your contributions and such derivative works.
7 |
8 | The CLA protects both you and us from liability issues, it will not change
9 | your rights to use your own contributions for any other purpose.
10 |
11 | For details, please contact
12 |
13 | Alexander Tiderko
14 | Fraunhofer FKIE
15 | alexander.tiderko@fkie.fraunhofer.de
16 |
17 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.manipulator/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
--------------------------------------------------------------------------------
/fkie_iop_list_manager/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_list_manager
4 | 2.1.0
5 | List Manager to support services with list operations.
6 |
7 | Alexander Tiderko
8 | GPLv2
9 | https://github.com/fkie/iop_jaus_mobility
10 |
11 | ament_cmake
12 |
13 | fkie_iop_management
14 |
15 | ament_lint_auto
16 | ament_lint_common
17 |
18 |
19 | ament_cmake
20 |
21 |
22 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.mobility/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
11 |
12 |
--------------------------------------------------------------------------------
/jaustoolset/resources/schema/JSIDL_Plus/version_1_1.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/fkie_iop_liveness/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_liveness
4 | 2.1.0
5 | The full functional implementation of JAUS liveness service.
6 | This service can be included into other components.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_jaus_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_events
15 |
16 | ament_lint_auto
17 | ament_lint_common
18 |
19 |
20 | ament_cmake
21 |
22 |
23 |
--------------------------------------------------------------------------------
/fkie_iop_transport/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_transport
4 | 2.1.0
5 | The full functional implementation of JAUS transport service.
6 | This service can be included into other components.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_jaus_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_component
15 |
16 | ament_lint_auto
17 | ament_lint_common
18 |
19 |
20 | ament_cmake
21 |
22 |
23 |
--------------------------------------------------------------------------------
/fkie_iop_management/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_management
4 | 2.1.0
5 | The full functional implementation of JAUS Management service.
6 | This service can be included into other components.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_jaus_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_accesscontrol
15 |
16 | ament_lint_auto
17 | ament_lint_common
18 |
19 |
20 | ament_cmake
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/fkie_iop_events/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_events
4 | 2.1.0
5 | The full functional implementation of JAUS events service.
6 | This service can be included into other components.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_jaus_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_transport
15 | rclcpp
16 |
17 | ament_lint_auto
18 | ament_lint_common
19 |
20 |
21 | ament_cmake
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/jaustoolset/templates/component/%component_name%.h.tpl_:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | #ifndef %component_name_allcaps%_H
4 | #define %component_name_allcaps%_H
5 |
6 | #include
7 | #include "EventReceiver.h"
8 | #include "Transport/JausTransport.h"
9 | #include "InternalEvents/InternalEvent.h"
10 | %service_include_list%
11 |
12 | class %component_name% : public JTS::EventReceiver
13 | {
14 | public:
15 | %component_name%(unsigned int subsystem, unsigned short node, unsigned short component);
16 | virtual ~%component_name%();
17 |
18 | void startComponent();
19 | void shutdownComponent();
20 |
21 | protected:
22 | virtual void processInternalEvent(JTS::InternalEvent* ie);
23 |
24 | std::vector serviceList;
25 | JTS::JausRouter* jausRouter;
26 |
27 | };
28 |
29 | #endif // %component_name_allcaps%_H
30 |
--------------------------------------------------------------------------------
/jaustoolset/resources/schema/JSIDL_Plus/xml.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_discovery
4 | 2.1.0
5 | The full functional implementation of JAUS discovery service.
6 | This service can be included into other components.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_jaus_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_events
15 | fkie_iop_msgs
16 | std_srvs
17 |
18 | ament_lint_auto
19 | ament_lint_common
20 |
21 |
22 | ament_cmake
23 |
24 |
25 |
--------------------------------------------------------------------------------
/fkie_iop_accesscontrol/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_accesscontrol
4 | 2.1.0
5 | The full functional implementation of JAUS AccessControl v1.1 service.
6 | This service can be included into other components.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_jaus_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_events
15 | fkie_iop_msgs
16 | std_msgs
17 |
18 | ament_lint_auto
19 | ament_lint_common
20 |
21 |
22 | ament_cmake
23 |
24 |
25 |
--------------------------------------------------------------------------------
/iop_robot.rosinstall:
--------------------------------------------------------------------------------
1 | - git:
2 | local-name: iop_msgs
3 | uri: https://github.com/fkie/iop_msgs
4 | version: ros2
5 | - git:
6 | local-name: iop_core
7 | uri: https://github.com/fkie/iop_core
8 | version: ros2
9 | - git:
10 | local-name: iop_platform
11 | uri: https://github.com/fkie/iop_platform
12 | version: ros2
13 | - git:
14 | local-name: iop_sensing
15 | uri: https://github.com/fkie/iop_sensing
16 | version: ros2
17 | #- git:
18 | # local-name: iop_jaus_manipulator
19 | # uri: https://github.com/fkie/iop_jaus_manipulator
20 | # version: ros2
21 | - git:
22 | local-name: iop_jaus_mobility
23 | uri: https://github.com/fkie/iop_jaus_mobility
24 | version: ros2
25 | - git:
26 | local-name: iop_jaus_sensing
27 | uri: https://github.com/fkie/iop_jaus_sensing
28 | version: ros2
29 | - git:
30 | local-name: iop_jaus_ugv
31 | uri: https://github.com/fkie/iop_jaus_ugv
32 | version: ros2
33 |
--------------------------------------------------------------------------------
/fkie_iop_component/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_component
4 | 2.1.0
5 |
6 | A dynamic configurabale component. The IOP services are loaded as plugins
7 | while start of this component. The function of the component depend on loaded services.
8 |
9 |
10 | Alexander Tiderko
11 | GPLv2
12 |
13 | https://github.com/fkie/iop_jaus_core.git
14 |
15 | ament_cmake
16 |
17 | fkie_iop_builder
18 | diagnostic_msgs
19 | pluginlib
20 | rclcpp
21 |
22 | ament_lint_auto
23 | ament_lint_common
24 |
25 | ament_cmake
26 |
27 |
28 |
--------------------------------------------------------------------------------
/fkie_iop_ocu_slavelib/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_ocu_slavelib
4 | 2.1.0
5 | A helper library for ROS/IOP-Bridge OCU nodes. This library combines the IOP client services (AccessControlClient, DiscoveryClient and ManagementClient)
6 | and listen to the command of the master to synchronize the access of multiple OCU client to robot services.
7 |
8 | Alexander Tiderko
9 | GPLv2
10 | https://github.com/fkie/iop_core.git
11 |
12 | ament_cmake
13 |
14 | fkie_iop_discovery
15 | fkie_iop_management
16 | fkie_iop_msgs
17 |
18 | ament_lint_auto
19 | ament_lint_common
20 |
21 |
22 | ament_cmake
23 |
24 |
25 |
--------------------------------------------------------------------------------
/jaustoolset/templates/component/main.cs.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | using System;
4 | using System.Threading;
5 |
6 | public class MainClass
7 | {
8 | // Boolean to determine if program should keep running.
9 | private static bool run = true;
10 |
11 | public static void Main()
12 | {
13 | // Instantiate the component and start it.
14 | %component_name% cmpt = new %component_name%(126, 1, %component_id%);
15 |
16 | // Start the component and the services
17 | cmpt.startComponent();
18 |
19 | // Wait until signaled to exit
20 | Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e)
21 | {
22 | e.Cancel = true;
23 | MainClass.run = false;
24 | };
25 |
26 | while(run)
27 | {
28 | Thread.Sleep(100);
29 | }
30 |
31 | // Shutdown the component and threads
32 | cmpt.shutdownComponent();
33 | }
34 |
35 | protected static void exit_handler(object sender, ConsoleCancelEventArgs args)
36 | {
37 | args.Cancel = true;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/fkie_iop_events/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## _fkie_iop_events:_ Events
5 |
6 | The Events service implements the functionality to send registered events. The events are reports registered by plugins on load. Events supports periodic and on change notifications. Currently CommandEvents are not supported.
7 |
8 | #### Parameter:
9 |
10 | _events_timeout (int_, (Default: 1)
11 |
12 | > Time period in minutes after which the event will be canceled if no update for event received. Zero disables the timeout.
13 |
14 | #### Publisher:
15 |
16 | > None
17 |
18 | #### Subscriber:
19 |
20 | > None
21 |
22 | ## _fkie_iop_events:_ EventsClient
23 |
24 | This service register events on Events service and update it to avoid timeout or if change for event is needed. The received events forwarded to handler plugin which requested the report by event.
25 |
26 | #### Parameter:
27 |
28 | > None
29 |
30 | #### Publisher:
31 |
32 | > None
33 |
34 | #### Subscriber:
35 |
36 | > None
37 |
--------------------------------------------------------------------------------
/fkie_iop_builder/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fkie_iop_builder
4 | 2.1.0
5 | JAUS build helper. It generates CPP sources from JSIDL files.
6 | An installed JausToolSet is required. This is done by scripts in jaustoolset.
7 | If some error occurs regarding missing "pthread" and "timer" the libpthread and
8 | librt have to be included.
9 |
10 | This can be done by replacing LIBS=[] by LIBS=['-lpthread', '-lrt'] in
11 | GUI/templates/Common/SConstruct
12 |
13 | Timo Roehling
14 | Alexander Tiderko
15 | Alexander Tiderko
16 | GPLv2
17 | ament_cmake
18 |
19 | jaustoolset
20 | python3-lxml
21 | rclcpp
22 |
23 | ament_lint_auto
24 | ament_lint_common
25 |
26 | ament_cmake
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/jaustoolset/templates/statemachine/%statemachine_name%.java.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 | package src.%service_namespace%;
3 |
4 | import java.util.StringTokenizer;
5 | import java.nio.ByteBuffer;
6 | import java.nio.ByteOrder;
7 | import framework.transport.JausRouter;
8 | import framework.transport.JausAddress;
9 | import framework.internalEvents.*;
10 | import framework.StateMachine;
11 | import framework.messages.Message;
12 | import statemap.*;
13 | %statemachine_include_list%
14 | %parent_fsm_includes%
15 |
16 | public class %statemachine_name% extends StateMachine{
17 | protected boolean running;
18 | %parent_fsm_references%
19 | %statemachine_name%Context context;
20 |
21 | %user_definitions%
22 |
23 | public %statemachine_name%(%parent_fsm_arguments%)
24 | %sm_constuctor%
25 |
26 | /// Handle notifications on parent state changes
27 | public void setupNotifications()
28 | {
29 | %setup_notifications%
30 | }
31 |
32 | /// Access for debug purposes
33 | public String getStateName()
34 | {
35 | return context.getState().getName();
36 | }
37 |
38 | %action_method_definitions%
39 |
40 | %guard_method_definitions%
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/iop_ocu.rosinstall:
--------------------------------------------------------------------------------
1 | - git:
2 | local-name: iop_msgs
3 | uri: https://github.com/fkie/iop_msgs
4 | version: ros2
5 | - git:
6 | local-name: iop_core
7 | uri: https://github.com/fkie/iop_core
8 | version: ros2
9 | - git:
10 | local-name: iop_gui
11 | uri: https://github.com/fkie/iop_gui
12 | version: ros2
13 | - git:
14 | local-name: iop_platform
15 | uri: https://github.com/fkie/iop_platform
16 | version: ros2
17 | - git:
18 | local-name: iop_sensing_clients
19 | uri: https://github.com/fkie/iop_sensing_clients
20 | version: ros2
21 | #- git:
22 | # local-name: iop_jaus_manipulator_clients
23 | # uri: https://github.com/fkie/iop_jaus_manipulator_clients
24 | # version: ros2
25 | - git:
26 | local-name: iop_jaus_mobility_clients
27 | uri: https://github.com/fkie/iop_jaus_mobility_clients
28 | version: ros2
29 | - git:
30 | local-name: iop_jaus_sensing_clients
31 | uri: https://github.com/fkie/iop_jaus_sensing_clients
32 | version: ros2
33 | - git:
34 | local-name: iop_jaus_ugv_clients
35 | uri: https://github.com/fkie/iop_jaus_ugv_clients
36 | version: ros2
37 |
--------------------------------------------------------------------------------
/fkie_iop_builder/jsidl/urn.jaus.jss.iop/MessageSet/MessageSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/fkie_iop_builder/cmake/cpy.py:
--------------------------------------------------------------------------------
1 | # ROS/IOP Bridge
2 | # Copyright (c) 2017 Fraunhofer
3 | #
4 | # This program is dual licensed; you can redistribute it and/or
5 | # modify it under the terms of the GNU General Public License
6 | # version 2 as published by the Free Software Foundation, or
7 | # enter into a proprietary license agreement with the copyright
8 | # holder.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program; or you can read the full license at
17 | #
18 | #
19 | # :author: Alexander Tiderko
20 |
21 | from sys import argv
22 | import os
23 | from shutil import copy2
24 |
25 | destdir = argv[1]
26 | for srcfile in argv[2:]:
27 | print("JAUS: Overriding %s" % srcfile)
28 | dstfile = os.path.join(destdir, srcfile)
29 | dstdir, dstname = os.path.split(dstfile)
30 | if not os.path.isdir(dstdir): os.makedirs(dstdir)
31 | copy2 (srcfile, dstfile)
32 |
--------------------------------------------------------------------------------
/jaustoolset/templates/service/%service_name%.h.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | #ifndef %service_name_allcaps%_H
4 | #define %service_name_allcaps%_H
5 |
6 | #include "Service.h"
7 | #include "InternalEvents/InternalEventHandler.h"
8 | #include "Transport/JausTransport.h"
9 | #include "JConstants.h"
10 | #include "%service_namespace%/Messages/MessageSet.h"
11 | #include "%service_namespace%/InternalEvents/InternalEventsSet.h"
12 | #include "Transport/OS.h"
13 |
14 |
15 | %statemachine_include_list%
16 |
17 | namespace %service_namespace%
18 | {
19 |
20 | class DllExport %service_name% : public JTS::Service
21 | {
22 | public:
23 | %service_name%();
24 | virtual ~%service_name%();
25 | void init_service(std::shared_ptr cmp, JTS::JausRouter* jausRouter, JTS::Service* parentService);
26 |
27 | %parent_service_type% getParent();
28 |
29 | virtual bool processTransitions(JTS::InternalEvent* ie);
30 | virtual bool defaultTransitions(JTS::InternalEvent* ie);
31 |
32 | // FSMs are public so that children services can access them
33 | %statemachine_variable_list%
34 |
35 | protected:
36 | %parent_service_type% pParentService;
37 | virtual void run();
38 |
39 | };
40 |
41 | }
42 |
43 | #endif // %service_name_allcaps%_H
44 |
--------------------------------------------------------------------------------
/fkie_iop_builder/include/fkie_iop_builder/util.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2018 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #include
24 |
25 | #ifndef INCLUDE_FKIE_IOP_BUILDER_UTIL_H_
26 | #define INCLUDE_FKIE_IOP_BUILDER_UTIL_H_
27 |
28 | template
29 | F pround(const F& f, unsigned int decs=6)
30 | {
31 | int i1 = floor(f);
32 | F rmnd = f - i1;
33 | int i2 = static_cast (rmnd * pow(10, decs));
34 | F f1 = i2 / pow(10, decs);
35 | return i1 + f1;
36 | }
37 |
38 |
39 | #endif /* INCLUDE_FKIE_IOP_BUILDER_UTIL_H_ */
40 |
--------------------------------------------------------------------------------
/fkie_iop_transport/include/urn_jaus_jss_core_Transport/TransportService.h:
--------------------------------------------------------------------------------
1 | #ifndef TRANSPORTSERVICE_H
2 | #define TRANSPORTSERVICE_H
3 |
4 | #include "Service.h"
5 | #include "InternalEvents/InternalEventHandler.h"
6 | #include "Transport/JausTransport.h"
7 | #include "JConstants.h"
8 | #include "urn_jaus_jss_core_Transport/Messages/MessageSet.h"
9 | #include "urn_jaus_jss_core_Transport/InternalEvents/InternalEventsSet.h"
10 | #include "Transport/OS.h"
11 |
12 |
13 | #include "Transport_ReceiveFSM.h"
14 | #include "Transport_SendFSM.h"
15 |
16 |
17 | namespace urn_jaus_jss_core_Transport
18 | {
19 |
20 | class DllExport TransportService : public JTS::Service
21 | {
22 | public:
23 | TransportService();
24 | virtual ~TransportService();
25 | void init_service(std::shared_ptr cmp, JTS::JausRouter* jausRouter, JTS::Service* parentService);
26 |
27 | Service* getParent();
28 |
29 | virtual bool processTransitions(JTS::InternalEvent* ie);
30 | virtual bool defaultTransitions(JTS::InternalEvent* ie);
31 |
32 | // FSMs are public so that children services can access them
33 | Transport_ReceiveFSM* pTransport_ReceiveFSM;
34 | Transport_SendFSM* pTransport_SendFSM;
35 |
36 |
37 | protected:
38 | Service* pParentService;
39 | virtual void run();
40 |
41 | };
42 |
43 | }
44 |
45 | #endif // TRANSPORTSERVICE_H
46 |
--------------------------------------------------------------------------------
/fkie_iop_builder/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 | project(fkie_iop_builder)
3 |
4 | # Default to C99
5 | if(NOT CMAKE_C_STANDARD)
6 | set(CMAKE_C_STANDARD 99)
7 | endif()
8 |
9 | # set default c++ version
10 | if($ENV{ROS_DISTRO} MATCHES "foxy")
11 | if(NOT CMAKE_CXX_STANDARD)
12 | set(CMAKE_CXX_STANDARD 14)
13 | endif()
14 | elseif($ENV{ROS_DISTRO} MATCHES "galactic")
15 | if(NOT CMAKE_CXX_STANDARD)
16 | set(CMAKE_CXX_STANDARD 17)
17 | endif()
18 | endif()
19 |
20 | if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
21 | add_compile_options(-Wall -Wextra -Wpedantic -Wno-ignored-qualifiers)
22 | endif()
23 |
24 | find_package(ament_cmake REQUIRED)
25 | find_package(jaustoolset REQUIRED)
26 | find_package(rclcpp REQUIRED)
27 |
28 | include_directories(include
29 | ${rclcpp_INCLUDE_DIRS}
30 | )
31 |
32 | install(
33 | DIRECTORY include/${PROJECT_NAME}/
34 | DESTINATION include/${PROJECT_NAME}
35 | )
36 | install(
37 | DIRECTORY cmake
38 | DESTINATION share/${PROJECT_NAME}
39 | )
40 | install(
41 | DIRECTORY jsidl
42 | DESTINATION share/${PROJECT_NAME}
43 | )
44 |
45 | ament_export_include_directories(include)
46 | ament_export_dependencies(jaustoolset rclcpp)
47 |
48 | ament_package(
49 | CONFIG_EXTRAS cmake/iop_build_macros.cmake.in
50 | )
51 |
--------------------------------------------------------------------------------
/fkie_iop_accesscontrol/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## _fkie_iop_accesscontrol:_ AccessControl
5 |
6 | Implements the functionality for exclusive control. By default a timeout of 10 seconds is active. You have to send your requests within this time as not to lose the control.
7 |
8 | #### Parameter:
9 |
10 | _access_timeout (int_, (Default: 60)
11 |
12 | > Time period in seconds after which the exclusive control goes lost. Zero disables the timeout.
13 |
14 | _default_authority (int_, (Default: 1)
15 |
16 | > The authority level of a client requesting control must be greather than or equal to the this value.
17 |
18 | #### Publisher:
19 |
20 | _is_controlled (std_msgs::msg::Bool)_, latched
21 |
22 | > Publishes True or False if the service is controlled by someone or not
23 |
24 | _is_control_available (std_msgs::msg::Bool)_, latched
25 |
26 | > Publishes the state of control allowed from ROS side.
27 |
28 | #### Subscriber:
29 |
30 | _set_control_available (std_msgs::msg::Bool)_
31 |
32 | > If you set to False, all access control requests will be rejected.
33 |
34 | ## _fkie_iop_accesscontrol:_ AccessControlClient
35 |
36 | The client service for AccessControl. It offers the functionality to send access requests in periodic time specified by AccessControl service.
37 |
--------------------------------------------------------------------------------
/jaustoolset/templates/statemachine/%statemachine_name%.h.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | #ifndef %statemachine_name_allcaps%_H
4 | #define %statemachine_name_allcaps%_H
5 |
6 | #include "JausUtils.h"
7 | #include "InternalEvents/InternalEventHandler.h"
8 | #include "Transport/JausTransport.h"
9 | #include "JTSStateMachine.h"
10 | #include "%service_namespace%/Messages/MessageSet.h"
11 | #include "%service_namespace%/InternalEvents/InternalEventsSet.h"
12 |
13 | %transport_class_aliases%
14 | %parent_fsm_includes%
15 |
16 | #include "%statemachine_name%_sm.h"
17 | #include
18 | #include
19 |
20 |
21 | namespace %service_namespace%
22 | {
23 |
24 | class DllExport %statemachine_name% : public JTS::StateMachine
25 | {
26 | public:
27 | %statemachine_name%(%parent_fsm_arguments%);
28 | virtual ~%statemachine_name%();
29 |
30 | /// Handle notifications on parent state changes
31 | virtual void setupNotifications();
32 | %setup_iop_configuration_h%
33 |
34 | /// Action Methods
35 | %action_method_declarations%
36 |
37 | /// Guard Methods
38 | %guard_method_declarations%
39 |
40 | %statemachine_name%Context *context;
41 |
42 | protected:
43 |
44 | /// References to parent FSMs
45 | %parent_fsm_references%
46 | %parent_fsm_iop_args%
47 | };
48 |
49 | }
50 |
51 | #endif // %statemachine_name_allcaps%_H
52 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/include/fkie_iop_discovery/DiscoveryServiceList.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 |
24 | #ifndef DISCOVERY_SERVICE_LIST_H
25 | #define DISCOVERY_SERVICE_LIST_H
26 |
27 | #include "DiscoveryServiceDef.h"
28 | #include "Transport/JausTransport.h"
29 |
30 | namespace iop
31 | {
32 |
33 | class DiscoveryServiceList {
34 | public:
35 | DiscoveryServiceList();
36 |
37 | bool add_service(std::string service_uri, unsigned char major_version, unsigned char minor_version=255);
38 |
39 | std::vector get_services();
40 | bool has_service(std::string uri);
41 |
42 | protected:
43 | std::vector p_services;
44 | };
45 |
46 | }
47 |
48 |
49 | #endif // DISCOVERY_CONFIG_H
50 |
--------------------------------------------------------------------------------
/fkie_iop_component/src/main.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 |
24 | #include
25 | #include
26 | #include
27 | #include "Transport/OS.h"
28 | #include "fkie_iop_component/iop_component.hpp"
29 |
30 |
31 | int main(int argc, char* argv [] )
32 | {
33 | // Instantiate the component and start it.
34 | rclcpp::init(argc, argv);
35 | auto component = std::make_shared("iop_component_default", "");
36 | component->init(126, 0x40, 81);
37 | rclcpp::spin(component);
38 | // Shutdown the component and threads
39 | component->shutdown_component();
40 | rclcpp::shutdown();
41 | // Give a little time for proper shutdown
42 | DeVivo::Junior::JrSleep(100);
43 | }
44 |
--------------------------------------------------------------------------------
/fkie_iop_builder/cmake/cpp.py:
--------------------------------------------------------------------------------
1 | # ROS/IOP Bridge
2 | # Copyright (c) 2017 Fraunhofer
3 | #
4 | # This program is dual licensed; you can redistribute it and/or
5 | # modify it under the terms of the GNU General Public License
6 | # version 2 as published by the Free Software Foundation, or
7 | # enter into a proprietary license agreement with the copyright
8 | # holder.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program; or you can read the full license at
17 | #
18 | #
19 | # :author: Alexander Tiderko
20 |
21 | from sys import argv
22 | import os
23 |
24 | outfile = argv[1]
25 | source_dir = argv[2]
26 | ignores = set(argv[3:])
27 | outf = open(outfile, "w")
28 | for path, dirs, files in os.walk(source_dir):
29 | cppfiles = [ f for f in files if f.endswith(".cpp") ]
30 | for f in cppfiles:
31 | fpath = os.path.join(path, f)
32 | fshort = fpath[len(source_dir)+1:]
33 | if fshort in ignores:
34 | continue
35 | print("JAUS: Packaging %s" % fshort)
36 | inf = open(fpath, "r")
37 | content = inf.read()
38 | inf.close()
39 | outf.write("/* #### %s #### */" % fshort)
40 | outf.write (content)
41 | outf.close()
42 |
--------------------------------------------------------------------------------
/jaustoolset/templates/component/Main.java.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 | package src;
3 |
4 | import framework.transport.OS.JrSignal;
5 | import sun.misc.Signal;
6 | import sun.misc.SignalHandler;
7 | import java.lang.Exception;
8 | import java.util.logging.Level;
9 | import java.util.logging.Logger;
10 |
11 | public class Main {
12 | private static Logger logger = Logger.getLogger("%component_name%_log");
13 |
14 | // Create a static signal to catch interrupts
15 | private static JrSignal exit_signal = new JrSignal();
16 | private static boolean exit = false;
17 |
18 | static SignalHandler handler = new SignalHandler()
19 | {
20 | public void handle(Signal signal)
21 | {
22 | exit = true;
23 | }
24 | };
25 |
26 | public static void main(String[] args)
27 | {
28 | try
29 | {
30 | // Instantiate the component and start it.
31 | %component_name% cmpt = new %component_name%(126, (short) 1, (short) %component_id%);
32 |
33 | // Catch exit signals
34 | Signal.handle(new Signal("INT"), handler);
35 | Signal.handle(new Signal("TERM"), handler);
36 | Signal.handle(new Signal("ABRT"), handler);
37 |
38 | // Start the component and the services
39 | cmpt.startComponent();
40 |
41 | while(!exit)
42 | {
43 | // Throttle
44 | Thread.sleep(1);
45 | }
46 |
47 | // Shutdown the component and threads, then exit the program.
48 | cmpt.shutdownComponent();
49 | System.exit(0);
50 |
51 | }
52 | catch( Exception e)
53 | {
54 | logger.log(Level.SEVERE, null, e);
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/fkie_iop_events/include/fkie_iop_events/EventsConfig.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 |
24 | #ifndef EVENTSCONFIG_H
25 | #define EVENTSCONFIG_H
26 |
27 | namespace iop
28 | {
29 |
30 | class EventsConfig {
31 | public:
32 | #if __GNUC__ > 5
33 | static constexpr float MINIMUM_RATE = 0.1f;
34 | static constexpr float MAXIMUM_RATE = 25.0f;
35 | static constexpr float RATE_PRECISION = 0.1f;
36 | #else
37 | static const float MINIMUM_RATE;
38 | static const float MAXIMUM_RATE;
39 | static const float RATE_PRECISION;
40 | #endif
41 | EventsConfig(int64_t timeout=1);
42 | EventsConfig(EventsConfig const& from);
43 | const EventsConfig& operator=(const EventsConfig& from);
44 | void set_timeout(int64_t timeout);
45 | int64_t get_timeout();
46 |
47 | protected:
48 | int64_t p_default_timeout;
49 | };
50 |
51 | }
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/include/fkie_iop_discovery/DiscoveryServiceDef.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 |
24 | #ifndef DISCOVERY_SERVICE_DEF_H
25 | #define DISCOVERY_SERVICE_DEF_H
26 |
27 | #include "Transport/JausTransport.h"
28 | #include
29 |
30 | namespace iop
31 | {
32 |
33 | class DiscoveryServiceDef {
34 | public:
35 | std::string service_uri;
36 | unsigned char major_version;
37 | unsigned char minor_version;
38 |
39 | DiscoveryServiceDef();
40 | DiscoveryServiceDef(std::string service_uri, unsigned char major_version, unsigned char minor_version);
41 | // comparable for the map
42 | bool operator<( const DiscoveryServiceDef& other) const;
43 | bool operator==( const DiscoveryServiceDef& other) const;
44 | bool operator!=( const DiscoveryServiceDef& other) const;
45 | };
46 |
47 | }
48 |
49 |
50 | #endif // DISCOVERY_CONFIG_H
51 |
--------------------------------------------------------------------------------
/jaustoolset/scripts/jaus_node_manager.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | _term() {
4 | echo "Caught SIGTERM signal!"
5 | kill -TERM "$child" 2>/dev/null
6 | echo "exit $child"
7 | }
8 |
9 | JTS_RUNNING="$( ps h -C JTSNodeManager )"
10 | if [ "$1" == "start" ]; then
11 | if [ "$JTS_RUNNING" ]; then
12 | echo "already running, exit!"
13 | exit
14 | fi
15 | # go back to root of jaustoolset
16 | JTS_BIN_PATH="$( dirname "$0" )"
17 | JTS_BIN_PATH="$( dirname "$JTS_BIN_PATH" )"
18 | trap '_term' TERM INT
19 | echo "rosrun jaustoolset JTSNodeManager $JTS_BIN_PATH/cfg/nm.cfg"
20 | cd $JTS_BIN_PATH
21 | rosrun jaustoolset JTSNodeManager $JTS_BIN_PATH/cfg/nm.cfg &
22 | child=$!
23 | echo "JTSNodeManager process id: $child"
24 | wait "$child"
25 | exit
26 | fi
27 |
28 | if [ "$1" == "stop" ]; then
29 | if [ "$JTS_RUNNING" ]; then
30 | echo "kill $JTS_RUNNING"
31 | echo $JTS_RUNNING | awk '{print $1}' | xargs kill
32 | else
33 | echo "no running JAUS NodeManager detected"
34 | fi
35 | exit
36 | fi
37 |
38 | if [ "$1" == "list" ]; then
39 | if [ "$JTS_RUNNING" ]; then
40 | echo "Running JAUS NodeManager:"
41 | echo "$(ps -f -C JTSNodeManager)"
42 | else
43 | echo "no running JAUS NodeManager detected"
44 | fi
45 | exit
46 | fi
47 |
48 | if [ "$1" == "screen" ]; then
49 | if [ "$JTS_RUNNING" ]; then
50 | echo "already running, exit!"
51 | exit
52 | fi
53 | echo "run '$( readlink -f $0 ) start' in an screen"
54 | screen -L -dmS iop_nodemanager $( readlink -f $0 ) start
55 | exit
56 |
57 | fi
58 |
59 | if [ "$1" == "" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
60 | echo "Usage:"
61 | echo " $0 screen|start|stop|list"
62 | exit
63 | fi
64 |
65 |
--------------------------------------------------------------------------------
/jaustoolset/templates/service/%service_name%.java.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 | package src.%service_namespace%;
3 |
4 | import java.lang.Exception;
5 | import java.util.logging.Level;
6 | import java.util.logging.Logger;
7 | import framework.Service;
8 | import framework.JausUtils;
9 | import framework.transport.JausRouter;
10 | import framework.internalEvents.*;
11 | %statemachine_include_list%
12 |
13 | public class %service_name% extends Service{
14 |
15 | %statemachine_variable_list%
16 |
17 | public %service_name%(JausRouter jausRouter %parent_service_list%)
18 | {
19 |
20 | %statemachine_assignment_list%
21 |
22 | }
23 |
24 | public void run(){
25 |
26 | // Perform any entry actions specified by the start state.
27 | %start_state_actions%
28 |
29 |
30 | // Kick off receive loop...
31 | super.run();
32 | }
33 |
34 | // This is the function that will process an event either generated
35 | // by the service, sent to it by another service on the same component,
36 | // or as a message sent by a different component.
37 | public synchronized boolean processTransitions(InternalEvent ie)
38 | {
39 | boolean done = false;
40 |
41 | // Invoke the FSM transition for this event.
42 | %transition_calls%
43 |
44 | return done;
45 | }
46 |
47 |
48 | // This is the function that will check for default transitions if
49 | // no other transitions were satisfied.
50 | //
51 | public synchronized boolean defaultTransitions(InternalEvent ie)
52 | {
53 | boolean done = false;
54 |
55 | // Invoke the FSM transition for this event.
56 | %default_transition_calls%
57 |
58 | return done;
59 | }
60 |
61 | }
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/fkie_iop_ocu_slavelib/include/fkie_iop_ocu_slavelib/common.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #ifndef OCU_COMMON_H_
24 | #define OCU_COMMON_H_
25 |
26 | #include
27 | #include
28 |
29 | namespace iop
30 | {
31 |
32 | namespace ocu
33 | {
34 | inline fkie_iop_msgs::msg::JausAddress address_to_msg(JausAddress addr) {
35 | fkie_iop_msgs::msg::JausAddress result;
36 | result.subsystem_id = addr.getSubsystemID();
37 | result.node_id = addr.getNodeID();
38 | result.component_id = addr.getComponentID();
39 | return result;
40 | }
41 |
42 | inline JausAddress address_from_msg(fkie_iop_msgs::msg::JausAddress addr) {
43 | JausAddress result;
44 | result.setSubsystemID(addr.subsystem_id);
45 | result.setNodeID(addr.node_id);
46 | result.setComponentID(addr.component_id);
47 | return result;
48 | }
49 | }
50 |
51 | }
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/include/urn_jaus_jss_core_Discovery/DiscoveryService.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef DISCOVERYSERVICE_H
4 | #define DISCOVERYSERVICE_H
5 |
6 | #include "Service.h"
7 | #include "InternalEvents/InternalEventHandler.h"
8 | #include "Transport/JausTransport.h"
9 | #include "JConstants.h"
10 | #include "urn_jaus_jss_core_Discovery/Messages/MessageSet.h"
11 | #include "urn_jaus_jss_core_Discovery/InternalEvents/InternalEventsSet.h"
12 | #include "Transport/OS.h"
13 |
14 |
15 | #include "urn_jaus_jss_core_Events/EventsService.h"
16 | #include "urn_jaus_jss_core_Transport/TransportService.h"
17 | #include "Discovery_ReceiveFSM.h"
18 | #include "Discovery_SendFSM.h"
19 |
20 |
21 | namespace urn_jaus_jss_core_Discovery
22 | {
23 |
24 | class DllExport DiscoveryService : public JTS::Service
25 | {
26 | public:
27 | DiscoveryService();
28 | virtual ~DiscoveryService();
29 | void init_service(std::shared_ptr cmp, JTS::JausRouter* jausRouter, JTS::Service* parentService);
30 | void registerService(std::string serviceuri, unsigned char maxver, unsigned char minver, JausAddress address)
31 | {
32 | pDiscovery_ReceiveFSM->registerService(serviceuri, maxver, minver, address);
33 | }
34 |
35 | urn_jaus_jss_core_Events::EventsService* getParent();
36 |
37 | virtual bool processTransitions(JTS::InternalEvent* ie);
38 | virtual bool defaultTransitions(JTS::InternalEvent* ie);
39 |
40 | // FSMs are public so that children services can access them
41 | Discovery_ReceiveFSM* pDiscovery_ReceiveFSM;
42 | Discovery_SendFSM* pDiscovery_SendFSM;
43 |
44 |
45 | protected:
46 | urn_jaus_jss_core_Events::EventsService* pParentService;
47 | virtual void run();
48 |
49 | };
50 |
51 | }
52 |
53 | #endif // DISCOVERYSERVICE_H
54 |
--------------------------------------------------------------------------------
/iop.rosinstall:
--------------------------------------------------------------------------------
1 | - git:
2 | local-name: iop_msgs
3 | uri: https://github.com/fkie/iop_msgs
4 | version: ros2
5 | - git:
6 | local-name: iop_core
7 | uri: https://github.com/fkie/iop_core
8 | version: ros2
9 | - git:
10 | local-name: iop_gui
11 | uri: https://github.com/fkie/iop_gui
12 | version: ros2
13 | - git:
14 | local-name: iop_platform
15 | uri: https://github.com/fkie/iop_platform
16 | version: ros2
17 | - git:
18 | local-name: iop_sensing
19 | uri: https://github.com/fkie/iop_sensing
20 | version: ros2
21 | - git:
22 | local-name: iop_sensing_clients
23 | uri: https://github.com/fkie/iop_sensing_clients
24 | version: ros2
25 | #- git:
26 | # local-name: iop_jaus_manipulator
27 | # uri: https://github.com/fkie/iop_jaus_manipulator
28 | # version: ros2
29 | #- git:
30 | # local-name: iop_jaus_manipulator_clients
31 | # uri: https://github.com/fkie/iop_jaus_manipulator_clients
32 | # version: ros2
33 | - git:
34 | local-name: iop_jaus_mobility
35 | uri: https://github.com/fkie/iop_jaus_mobility
36 | version: ros2
37 | - git:
38 | local-name: iop_jaus_mobility_clients
39 | uri: https://github.com/fkie/iop_jaus_mobility_clients
40 | version: ros2
41 | - git:
42 | local-name: iop_jaus_sensing
43 | uri: https://github.com/fkie/iop_jaus_sensing
44 | version: ros2
45 | - git:
46 | local-name: iop_jaus_sensing_clients
47 | uri: https://github.com/fkie/iop_jaus_sensing_clients
48 | version: ros2
49 | - git:
50 | local-name: iop_jaus_ugv
51 | uri: https://github.com/fkie/iop_jaus_ugv
52 | version: ros2
53 | - git:
54 | local-name: iop_jaus_ugv_clients
55 | uri: https://github.com/fkie/iop_jaus_ugv_clients
56 | version: ros2
57 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/include/fkie_iop_discovery/DiscoveryComponent.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 |
24 | #ifndef DISCOVERY_COMPONENT_H
25 | #define DISCOVERY_COMPONENT_H
26 |
27 | #include "DiscoveryServiceList.h"
28 | #include "Transport/JausTransport.h"
29 |
30 | namespace iop
31 | {
32 |
33 | class DiscoveryComponent {
34 | public:
35 | JausAddress address;
36 | int64_t ts_last_ident;
37 |
38 | DiscoveryComponent();
39 | DiscoveryComponent(JausAddress address);
40 | bool add_service(std::string service_uri, unsigned char major_version, unsigned char minor_version=255);
41 | std::vector get_services();
42 | bool has_service(std::string uri);
43 | // comparable for the map
44 | bool operator<( const DiscoveryComponent& other) const;
45 | bool operator==( const DiscoveryComponent& other) const;
46 | bool operator==( const JausAddress& other) const;
47 |
48 | protected:
49 | DiscoveryServiceList p_services;
50 | };
51 |
52 | }
53 |
54 | #endif // DISCOVERY_CONFIG_H
55 |
--------------------------------------------------------------------------------
/fkie_iop_component/src/iop_config.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #include
24 | #include "fkie_iop_component/iop_component.hpp"
25 | #include "fkie_iop_component/iop_config.hpp"
26 |
27 |
28 | using namespace iop;
29 |
30 | Config::Config(std::shared_ptr cmp, std::string ns)
31 | : p_cmp(cmp), p_ns(ns)
32 | {
33 | }
34 |
35 | std::string Config::get_topic_name(const std::string& name, const std::string& prefix)
36 | {
37 | std::string result;
38 | std::string param_name = prefix;
39 | if (name[0] == '/') {
40 | param_name += name.substr(1);
41 | } else {
42 | param_name += name;
43 | }
44 | std::replace(param_name.begin(), param_name.end(), '/', '_');
45 | declare_param(param_name, name, true,
46 | rcl_interfaces::msg::ParameterType::PARAMETER_STRING,
47 | "", "");
48 | // only from private namespace
49 | param(param_name, result, name, true);
50 | return result;
51 | }
52 |
--------------------------------------------------------------------------------
/fkie_iop_events/src/EventsConfig.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | using namespace iop;
29 |
30 | #if __GNUC__ > 5
31 | #else
32 | const float EventsConfig::MINIMUM_RATE = 0.1f;
33 | const float EventsConfig::MAXIMUM_RATE = 25.0f;
34 | const float EventsConfig::RATE_PRECISION = 0.1f;
35 | #endif
36 |
37 | EventsConfig::EventsConfig(int64_t timeout)
38 | {
39 | p_default_timeout = timeout;
40 | }
41 |
42 | EventsConfig::EventsConfig(EventsConfig const& from)
43 | {
44 | p_default_timeout = from.p_default_timeout;
45 | }
46 |
47 | const EventsConfig& EventsConfig::operator=(const EventsConfig& from)
48 | {
49 | if (this != &from) {
50 | this->p_default_timeout = from.p_default_timeout;
51 | }
52 | return *this;
53 | }
54 |
55 | void EventsConfig::set_timeout(int64_t timeout)
56 | {
57 | p_default_timeout = timeout;
58 | }
59 |
60 | int64_t EventsConfig::get_timeout()
61 | {
62 | return p_default_timeout;
63 | }
64 |
--------------------------------------------------------------------------------
/fkie_iop_list_manager/include/fkie_iop_list_manager/ListManagerListenerInterface.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #ifndef IOP_LIST_MANAGER_LISTENER_INTERFACE_H_
24 | #define IOP_LIST_MANAGER_LISTENER_INTERFACE_H_
25 |
26 | #include
27 | #include "Transport/JausAddress.h"
28 | #include "urn_jaus_jss_core_ListManager/Messages/MessageSet.h"
29 | #include
30 |
31 | namespace iop
32 | {
33 | class ListManagerListenerInterface
34 | {
35 | /**
36 | * The interface is used by list manager service to inform services about changes.
37 | */
38 | public:
39 | // ____________________________
40 | // === must be overridden =====
41 | // ============================
42 | virtual void execute_list(std::vector elements, double speed = std::numeric_limits::quiet_NaN()) = 0;
43 | virtual void stop_execution() = 0;
44 |
45 | virtual ~ListManagerListenerInterface(){}
46 |
47 | protected:
48 | ListManagerListenerInterface() {}
49 | };
50 |
51 | }
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/include/urn_jaus_jss_core_DiscoveryClient/DiscoveryClientService.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef DISCOVERYCLIENTSERVICE_H
4 | #define DISCOVERYCLIENTSERVICE_H
5 |
6 | #include "Service.h"
7 | #include "InternalEvents/InternalEventHandler.h"
8 | #include "Transport/JausTransport.h"
9 | #include "JConstants.h"
10 | #include "urn_jaus_jss_core_DiscoveryClient/Messages/MessageSet.h"
11 | #include "urn_jaus_jss_core_DiscoveryClient/InternalEvents/InternalEventsSet.h"
12 | #include "Transport/OS.h"
13 |
14 |
15 | #include "urn_jaus_jss_core_EventsClient/EventsClientService.h"
16 | #include "urn_jaus_jss_core_Transport/TransportService.h"
17 | #include "DiscoveryClient_ReceiveFSM.h"
18 | #include "DiscoveryClient_SendFSM.h"
19 |
20 |
21 | namespace urn_jaus_jss_core_DiscoveryClient
22 | {
23 |
24 | class DllExport DiscoveryClientService : public JTS::Service
25 | {
26 | public:
27 | DiscoveryClientService();
28 | virtual ~DiscoveryClientService();
29 | void init_service(std::shared_ptr cmp, JTS::JausRouter* jausRouter, JTS::Service* parentService);
30 | void registerService(std::string serviceuri, unsigned char maxver, unsigned char minver, JausAddress address)
31 | {
32 | pDiscoveryClient_ReceiveFSM->registerService(serviceuri, maxver, minver, address);
33 | }
34 |
35 | urn_jaus_jss_core_EventsClient::EventsClientService* getParent();
36 |
37 | virtual bool processTransitions(JTS::InternalEvent* ie);
38 | virtual bool defaultTransitions(JTS::InternalEvent* ie);
39 |
40 | // FSMs are public so that children services can access them
41 | DiscoveryClient_ReceiveFSM* pDiscoveryClient_ReceiveFSM;
42 | DiscoveryClient_SendFSM* pDiscoveryClient_SendFSM;
43 |
44 |
45 | protected:
46 | urn_jaus_jss_core_EventsClient::EventsClientService* pParentService;
47 | virtual void run();
48 |
49 | };
50 |
51 | }
52 |
53 | #endif // DISCOVERYCLIENTSERVICE_H
54 |
--------------------------------------------------------------------------------
/jaustoolset/cmake/jts_cfg.cmake:
--------------------------------------------------------------------------------
1 | include(CMakeParseArguments)
2 |
3 | if (NOT "${jaustoolset_DIR}" STREQUAL "")
4 | # will set if build jaustoolset package
5 | get_filename_component(jaustoolset_SHARE_PATH ${jaustoolset_DIR} DIRECTORY)
6 | else ()
7 | # for all other packages
8 | set(jaustoolset_SHARE_PATH ${CMAKE_INSTALL_PREFIX}/share/jaustoolset)
9 | endif()
10 |
11 | get_cmake_property(_variableNames VARIABLES)
12 | list (SORT _variableNames)
13 | foreach (_variableName ${_variableNames})
14 | message(STATUS "${_variableName}=${${_variableName}}")
15 | endforeach()
16 |
17 | set(jaustoolset_INCLUDE_JARS_LT11
18 | ${jaustoolset_SHARE_PATH}/libs_external/jargs-1.0/jargs.jar:${jaustoolset_SHARE_PATH}/libs_external/runtime/commons-lang-2.5.jar:${jaustoolset_SHARE_PATH}/libs_external/smc/Smc.jar
19 | )
20 | set(jaustoolset_INCLUDE_JARS_S11
21 | ${jaustoolset_SHARE_PATH}/libs_external/jargs-1.0/jargs.jar:${jaustoolset_SHARE_PATH}/libs_external/runtime/commons-lang-2.5.jar:${jaustoolset_SHARE_PATH}/libs_external/smc/Smc.jar:${jaustoolset_SHARE_PATH}/libs_external/jaxb/javax.activation-api-1.2.0:${jaustoolset_SHARE_PATH}/libs_external/jaxb/jaxb-api-2.4.0-b180830.0359.jar:${jaustoolset_SHARE_PATH}/libs_external/jaxb/jaxb-core-2.3.0.1.jar:${jaustoolset_SHARE_PATH}/libs_external/jaxb/jaxb-impl-2.4.0-b180830.0438.jar
22 | )
23 |
24 | set(INCLUDE_LOCAL_JARS_LT11
25 | libs_external/jargs-1.0/jargs.jar
26 | libs_external/runtime/commons-lang-2.5.jar
27 | libs_external/smc/Smc.jar
28 | )
29 |
30 | set(INCLUDE_LOCAL_JARS_S11
31 | libs_external/jargs-1.0/jargs.jar
32 | libs_external/runtime/commons-lang-2.5.jar
33 | libs_external/smc/Smc.jar
34 | libs_external/jaxb/javax.activation-api-1.2.0.jar
35 | libs_external/jaxb/jaxb-api-2.4.0-b180830.0359.jar
36 | libs_external/jaxb/jaxb-core-2.3.0.1.jar
37 | libs_external/jaxb/jaxb-impl-2.4.0-b180830.0438.jar
38 | )
39 |
--------------------------------------------------------------------------------
/jaustoolset/templates/service/%service_name%.cs.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | using JTS;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | namespace %service_namespace%{
8 |
9 | public class %service_name% : Service{
10 | %statemachine_variable_list%
11 |
12 | public %service_name%(JausRouter jausRouter %parent_service_list%)
13 | {
14 |
15 | %statemachine_assignment_list%
16 |
17 | }
18 |
19 |
20 | public override void run()
21 | {
22 | // Perform any entry actions specified by the start state.
23 | %start_state_actions%
24 |
25 | // Kick off receive loop...
26 | base.run();
27 | }
28 |
29 | // This is the function that will process an event either generated
30 | // by the service, sent to it by another service on the same component,
31 | // or as a message sent by a different component.
32 | public override bool processTransitions(InternalEvent ie)
33 | {
34 | bool done = false;
35 |
36 | // Since this function can be called from multiple threads,
37 | // we use a mutex to ensure only one state transition is
38 | // active at a time.
39 | mutex.WaitOne();
40 |
41 | // Invoke the FSM transition for this event.
42 | %transition_calls%
43 |
44 | mutex.ReleaseMutex();
45 | return done;
46 | }
47 |
48 |
49 | // This is the function that will check for default transitions if
50 | // no other transitions were satisfied.
51 | //
52 | public override bool defaultTransitions(InternalEvent ie)
53 | {
54 | bool done = false;
55 |
56 | // Since this function can be called from multiple threads,
57 | // we use a mutex to ensure only one state transition is
58 | // active at a time.
59 | mutex.WaitOne();
60 |
61 | // Invoke the FSM transition for this event.
62 | %default_transition_calls%
63 |
64 | mutex.ReleaseMutex();
65 | return done;
66 | }
67 |
68 | }
69 |
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/doc/how_it_works.md:
--------------------------------------------------------------------------------
1 | ## How ROS/IOP-Bridge works - an overview
2 |
3 | The ROS/IOP-Bridge consists of a lot of independent components. This components represent in case one the IOP components:
4 | By **fkie_iop_component** it is now possible to configure the set of the services included into one component. All services of the ROS/IOP Bridge are implemented as a plugin. You can configure to use all services in one component or in a lot of independent components.
5 |
6 | 
7 |
8 | For the IOP-OCU it looks like IOP components, but in the background they use the ROS data.
9 | In the second case the ROS/IOP-Bridge components are used on the OCU side to process the JAUS data and make it available for ROS-GUI, like rqt:
10 |
11 | 
12 |
13 | ### Component structure
14 | As an example we look at the PrimitiveDriver service plugin. This component is located in [iop_mobility](https://github.com/fkie/iop_jaus_mobility) and implemnents the translation of `SetWrenchEffort` and `ReportWrenchEffort` to ROS messages:
15 |
16 | 
17 |
18 | To reduce the implementation effort of included JAUS services like `AccessControl`, `Discovery` and other we implemented these as libraries wich are included by the component. Look at `package.xml` and `CMakeLists.txt` of `fkie_iop_primitive_driver` package to see how they can be included.
19 |
20 | ### Components on the OCU side
21 | The ROS/IOP-Bridge components on the OCU side consume the JAUS data, e.g. of the PrimitiveDriver. This components are located in packages beginning with `iop_client_` prefix and include the client services for `AccessControl`, `Discovery` and other. Additionally, we created `fkie_iop_ocu_slavelib` and `fkie_iop_rqt_access_control` packages to control the independent client components simultaneously. This is useful to release or get access for a whole robot for example.
22 |
23 | 
24 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/src/DiscoveryServiceList.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #include
24 | #include
25 | #include
26 |
27 |
28 | using namespace iop;
29 |
30 | DiscoveryServiceList::DiscoveryServiceList() {
31 | }
32 |
33 | bool DiscoveryServiceList::add_service(std::string service_uri, unsigned char major_version, unsigned char minor_version)
34 | {
35 | bool added = false;
36 | DiscoveryServiceDef sdef(service_uri, major_version, minor_version);
37 | std::vector::iterator it = std::find(p_services.begin(), p_services.end(), sdef);
38 | if (it == p_services.end()) {
39 | p_services.push_back(sdef);
40 | added = true;
41 | }
42 | return added;
43 | }
44 |
45 | std::vector DiscoveryServiceList::get_services()
46 | {
47 | return p_services;
48 | }
49 |
50 | bool DiscoveryServiceList::has_service(std::string uri)
51 | {
52 | std::vector::iterator it;
53 | for (it = p_services.begin(); it != p_services.end(); it++) {
54 | if (it->service_uri.compare(uri) == 0) {
55 | return true;
56 | }
57 | }
58 | return false;
59 | }
60 |
--------------------------------------------------------------------------------
/doc/iop_core_packages.md:
--------------------------------------------------------------------------------
1 | ### fkie_iop_builder
2 | It contains the basic functionality and must be included in each component of the IOP/ROS bridge. The detailed overview of this package you find [here](../fkie_iop_builder/README.md).
3 |
4 | ### fkie_iop_component
5 | Contains the plugin interface for all IOP services. The services which implement this interface can be included into the component on start. The **fkie_iop_component** binary represents an IOP component. The services of this component can be configured dynamically. For further details see [how it works](../doc/how_it_works.md) or [simulation example](https://github.com/fkie/iop_examples/blob/master/fkie_iop_cfg_sim_turtle/README.md)
6 |
7 | ### fkie_iop_ocu_slavelib
8 | A helper library for ROS/IOP-Bridge OCU nodes. The detailed overview of this package you find [here](../fkie_iop_ocu_slavelib/README.md).
9 |
10 | ## JAUS Core Services
11 |
12 | [fkie_iop_accesscontrol: AccessControl](../fkie_iop_accesscontrol/README.md)
13 | [fkie_iop_accesscontrol: AccessControlClient](../fkie_iop_accesscontrol/README.md#fkie_iop_accesscontrol-accesscontrolclient)
14 | [fkie_iop_discovery: Discovery](../fkie_iop_discovery/README.md)
15 | [fkie_iop_discovery: DiscoveryClient](../fkie_iop_discovery/README.md#fkie_iop_discovery-discoveryclient)
16 | [fkie_iop_events: Events](../fkie_iop_events/README.md)
17 | [fkie_iop_events: EventsClient](../fkie_iop_events/README.md#fkie_iop_events-eventsclient)
18 | [fkie_iop_list_manager: ListManager](../fkie_iop_list_manager/README.md)
19 | [fkie_iop_list_manager: ListManagerClient](../fkie_iop_list_manager/README.md#fkie_iop_list_manager-listmanagerclient)
20 | [fkie_iop_liveness: Liveness](../fkie_iop_liveness/README.md)
21 | [fkie_iop_management: Management](../fkie_iop_management/README.md)
22 | [fkie_iop_management: ManagementClient](../fkie_iop_management/README.md#fkie_iop_management-managementclient)
23 | [fkie_iop_transport: Transport](../fkie_iop_transport/README.md)
24 |
--------------------------------------------------------------------------------
/fkie_iop_discovery/src/DiscoveryClient.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #include
24 | #include
25 | #include "Transport/OS.h"
26 | #include "Fkie_iop_discovery_client.h"
27 |
28 | #include
29 |
30 | // Create a static signal to catch interrupts
31 | static DeVivo::Junior::JrSignal exit_signal;
32 | static void handle_exit_signal( int signum )
33 | {
34 | exit_signal.signal();
35 | ros::shutdown();
36 | }
37 |
38 | int main(int argc, char *argv[])
39 | {
40 | Fkie_iop_discovery_client* cmpt = iop::ros_init(argc, argv, "iop_client_discovery", 127, 0x40, 200);
41 |
42 | // Catch exit signals
43 | signal( SIGINT, handle_exit_signal );
44 | signal( SIGTERM, handle_exit_signal );
45 | signal( SIGABRT, handle_exit_signal );
46 |
47 | // Start the component and the services
48 | cmpt->startComponent();
49 |
50 | // Wait until signaled to exit
51 | ros::spin();
52 |
53 | // Shutdown the component and threads
54 | cmpt->shutdownComponent();
55 |
56 | // Give a little time for proper shutdown
57 | DeVivo::Junior::JrSleep(100);
58 |
59 | // Free the component
60 | delete cmpt;
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/jaustoolset/templates/component/%component_name%.cs.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 |
3 | using JTS;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 |
8 | public class %component_name% : EventReceiver {
9 | protected List serviceList;
10 | JausRouter jausRouter;
11 |
12 | public %component_name%(ushort subsystem, byte node, byte component)
13 | {
14 | jausRouter = new JausRouter(new JausAddress(subsystem, node, component), ieHandler);
15 | serviceList = new List();
16 |
17 | /// Instantiate services
18 | %service_construction_list%
19 |
20 | /// Add all the Services for the Component
21 | %service_list%
22 | }
23 |
24 | ~%component_name%(){
25 | while(serviceList.Count != 0)
26 | {
27 | serviceList.RemoveAt(serviceList.Count-1);
28 | }
29 |
30 | jausRouter = null;
31 |
32 | }
33 |
34 | public void startComponent()
35 | {
36 |
37 | jausRouter.start();
38 | this.start();
39 |
40 | for(int i = 0; i 0; i--)
67 | {
68 | if (!done) done = serviceList[i-1].processTransitions(ie);
69 | }
70 | for (int i = serviceList.Count; i>0; i--)
71 | {
72 | if (!done) done = serviceList[i-1].defaultTransitions(ie);
73 | }
74 | }
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/fkie_iop_events/include/fkie_iop_events/EventHandlerInterface.h:
--------------------------------------------------------------------------------
1 | /**
2 | ROS/IOP Bridge
3 | Copyright (c) 2017 Fraunhofer
4 |
5 | This program is dual licensed; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | version 2 as published by the Free Software Foundation, or
8 | enter into a proprietary license agreement with the copyright
9 | holder.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; or you can read the full license at
18 |
19 | */
20 |
21 | /** \author Alexander Tiderko */
22 |
23 | #ifndef OCU_EVENT_HANDLER_INTERFACE_H_
24 | #define OCU_EVENT_HANDLER_INTERFACE_H_
25 |
26 | #include "Transport/JausAddress.h"
27 |
28 | namespace iop
29 | {
30 | class EventHandlerInterface
31 | {
32 | /**
33 | * The interface is used by the fkie_iop_event to forward events to clients.
34 | * To receive events IOP client components should include this interface.
35 | */
36 | public:
37 | // ============================
38 | // === must be overridden =====
39 | // ____________________________
40 | virtual void event(JausAddress reporter, unsigned short query_msg_id, unsigned int reportlen, const unsigned char* reportdata) = 0;
41 | // ____________________________
42 | // === must be overridden =====
43 | // ============================
44 | virtual void confirmed(JausAddress /* eporter */, unsigned short /* query_msg_id */) {}
45 | virtual void rejected(JausAddress /* reporter */, unsigned short /* query_msg_id */, unsigned char /* error_code */ , std::string /* error_msg */) {}
46 |
47 | virtual ~EventHandlerInterface(){}
48 |
49 | protected:
50 | EventHandlerInterface() {}
51 | };
52 |
53 | }
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/fkie_iop_management/README.md:
--------------------------------------------------------------------------------
1 | This package is part of [ROS/IOP Bridge](https://github.com/fkie/iop_core/blob/master/README.md).
2 |
3 |
4 | ## _fkie_iop_management:_ Management
5 |
6 | Implements rudimentary management functions.
7 |
8 | #### Parameter:
9 |
10 | > None
11 |
12 | #### Publisher:
13 |
14 | _is_emergency (std_msgs::msg::Bool)_, latched
15 |
16 | > Publishes __true__ if the component changes into emergency state settled by client.
17 |
18 | _is_ready (std_msgs::msg::Bool)_, latched
19 |
20 | > Publishes __true__ if the component changes in the ready state.
21 |
22 | #### Subscriber:
23 |
24 | > None
25 |
26 | ## _fkie_iop_management:_ ManagementClient
27 |
28 | Currently only "Resume" implemented. This is used by Slave library. The possibility to change into other state are not supported.
29 |
30 | #### Parameter:
31 |
32 | _hz (float_ , Default: 0.0)
33 |
34 | > Sets how often the reports are requested. If ```by_query``` is __true__ hz must be greather then 0. In this case each time a ```Query``` message is sent to get a report. If ```by_query``` is __false__ an event is created to get Reports. In this case 0 disables the rate and an event of type ```on_change``` will be created.
35 |
36 | _by_query (bool_, (Default: false)
37 |
38 | > By default the current state will be requested by creating an event. By setting this variable to __true__ the state is requested by query.
39 |
40 |
41 | #### Publisher:
42 |
43 | _mgmt_emergency (std_msgs::msg::Bool)_, latched
44 |
45 | > Publishes __true__ if the component is in the emergency state.
46 |
47 | _mgmt_status (std_msgs::String)_, latched
48 |
49 | > Publishes current state of the component. States are "INIT", "READY", "STANDBY", "SHUTDOWN", "FAILURE", "EMERGENCY" and "UNKNOWN".
50 |
51 |
52 | #### Subscriber:
53 |
54 | _cmd_mgmt_emergency (std_msgs::msg::Bool)_
55 |
56 | > Command to set the controlled component into emergency state.
57 |
58 | _cmd_mgmt_reset (std_msgs::msg::Bool)_
59 |
60 | > Command to set the controlled component into ready state.
61 |
62 |
63 |
--------------------------------------------------------------------------------
/jaustoolset/src/org/jts/codegenerator/support/EMemberVisibility.java:
--------------------------------------------------------------------------------
1 | /*********** LICENSE HEADER *******************************
2 | JAUS Tool Set
3 | Copyright (c) 2010, United States Government
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in the
14 | documentation and/or other materials provided with the distribution.
15 |
16 | Neither the name of the United States Government nor the names of
17 | its contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 | POSSIBILITY OF SUCH DAMAGE.
31 | ********************* END OF LICENSE ***********************************/
32 |
33 | package org.jts.codegenerator.support;
34 |
35 | public enum EMemberVisibility
36 | {
37 | Public,
38 | Private,
39 | Protected,
40 | }
41 |
--------------------------------------------------------------------------------
/jaustoolset/templates/component/%component_name%.java.tpl:
--------------------------------------------------------------------------------
1 | %copyright%
2 | package src;
3 |
4 | import framework.transport.JausRouter;
5 | import framework.transport.JausAddress;
6 | import java.util.ArrayList;
7 | import framework.EventReceiver;
8 | import framework.Service;
9 | import framework.internalEvents.InternalEvent;
10 | %service_include_list%
11 |
12 |
13 | class %component_name% extends EventReceiver
14 | {
15 | protected ArrayList serviceList = new ArrayList();
16 | JausRouter jausRouter;
17 |
18 | %component_name%(int subsystem, short node, short component)
19 | {
20 | jausRouter = new JausRouter(new JausAddress(subsystem, node, component), ieHandler);
21 |
22 | /// Instantiate services
23 | %service_construction_list%
24 |
25 | /// Add all the Services for the Component
26 | %service_list%
27 | }
28 |
29 | public void startComponent()
30 | {
31 | jausRouter.start();
32 | this.start();
33 |
34 | for(int i = 0; i 0; i--)
62 | {
63 | if (!done) done = serviceList.get(i-1).processTransitions(ie);
64 | }
65 | for (int i = serviceList.size(); i>0; i--)
66 | {
67 | if (!done) done = serviceList.get(i-1).defaultTransitions(ie);
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/jaustoolset/include/Transport/JUDPTransportL.h:
--------------------------------------------------------------------------------
1 | /*!
2 | ***********************************************************************
3 | * @file JUDPTransport.h
4 | * @author Dave Martin, DeVivo AST, Inc.
5 | * @date 2008/03/03
6 | *
7 | * Copyright (C) 2008. DeVivo AST, Inc
8 | *
9 | * This file is part of Jr Middleware.
10 | *
11 | * Jr Middleware is free software: you can redistribute it and/or modify
12 | * it under the terms of the GNU Lesser General Public License as published by
13 | * the Free Software Foundation, either version 3 of the License, or
14 | * (at your option) any later version.
15 | *
16 | * Jr Middleware is distributed in the hope that it will be useful,
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 | * GNU Lesser General Public License for more details.
20 | *
21 | * You should have received a copy of the GNU Lesser General Public License
22 | * along with Jr Middleware. If not, see .
23 | *
24 | ************************************************************************
25 | */
26 | #ifndef __JAUS_UDP_TRANSPORTL_H
27 | #define __JAUS_UDP_TRANSPORTL_H
28 |
29 | #include "Transport.h"
30 | #include "ConnectionList.h"
31 | #include
32 | #include