diff --git a/.github/workflows/flexbe_ci.yml b/.github/workflows/flexbe_ci.yml new file mode 100644 index 0000000..67070c0 --- /dev/null +++ b/.github/workflows/flexbe_ci.yml @@ -0,0 +1,41 @@ +# This is a basic workflow to help you get started with Actions +name: FlexBE CI +# Controls when the action will run. +on: [push, pull_request, workflow_dispatch] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + test: + strategy: + matrix: + ros: [noetic] + include: + - os: ubuntu-20.04 + ros: noetic + python: python3 + + runs-on: ${{ matrix.os }} + env: + ROS_DISTRO: ${{ matrix.ros }} + PYTHON: ${{ matrix.python }} + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - name: Prepare CI + run: | + git clone https://github.com/FlexBE/flexbe_ci.git ~/flexbe_ci + source ~/flexbe_ci/setup.bash $ROS_DISTRO + - name: Install ROS + run: ~/flexbe_ci/ci_scripts/install_ros.bash + - name: Setup Workspace + run: ~/flexbe_ci/ci_scripts/setup_workspace.bash + - name: Clone FlexBE Repos + run: ~/flexbe_ci/ci_scripts/run_rosinstall.bash + - name: Test Create Repo + run: ~/flexbe_ci/ci_scripts/test_create_repo.bash + - name: Test Devel Workspace + run: ~/flexbe_ci/ci_scripts/run_devel_tests.bash + - name: Test Install Workspace + run: ~/flexbe_ci/ci_scripts/run_install_tests.bash diff --git a/.gitignore b/.gitignore index 2981c36..aa6b4a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ nwjs/ -.*/** +.vscode/** diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 52fd8cf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: required -dist: xenial -language: generic - -before_install: - - git clone https://github.com/FlexBE/flexbe_ci.git ~/flexbe_ci - - source ~/flexbe_ci/setup.bash - - ~/flexbe_ci/ci_scripts/before_install.bash - -install: - - ~/flexbe_ci/ci_scripts/install.bash - -before_script: - - ~/flexbe_ci/ci_scripts/before_script.bash - -script: - - ~/flexbe_ci/ci_scripts/script.bash diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 979c29c..175acc4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,18 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package flexbe_app ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.4.1 (2023-05-22) +------------------ +* merge PR `#74 `_, 76, 77; tweak CI workflow +* Merge pull request `#60 `_ from fmessmer/fix/catkin_lint + some catkin_lint fixes +* some catkin_lint fixes +* Contributors: David Conner, dcconner, fmessmer + +2.4.0 (2023-05-18) +------------------ +* Merge develop branch +* Updates for Melodic and Noetic releases on github.com/FlexBE 2.3.0 (2020-11-19) ------------------ diff --git a/CMakeLists.txt b/CMakeLists.txt index 575d37d..5049425 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,25 +1,9 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.0) project(flexbe_app) find_package(catkin REQUIRED) -## Uncomment this if the package has a setup.py. This macro ensures -## modules and global scripts declared therein get installed -## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html -#catkin_python_setup() - -# specify catkin-specific information -# INCLUDE_DIRS - The exported include paths (i.e. cflags) for the package -# LIBRARIES - The exported libraries from the project -# CATKIN_DEPENDS - Other catkin projects that this project depends on -# DEPENDS - Non-catkin CMake projects that this project depends on -# CFG_EXTRAS - Additional configuration options -catkin_package( - INCLUDE_DIRS src - LIBRARIES ${PROJECT_NAME}) - -# use add_library() or add_executable() as required -#add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS}) +catkin_package() #add_custom_target(nwjs_inst) #add_custom_command(TARGET nwjs_inst POST_BUILD COMMAND bin/nwjs_install) @@ -40,20 +24,22 @@ endif() ## Install ## ############# -INSTALL(PROGRAMS +install(PROGRAMS + bin/nwjs_install bin/run_app bin/shortcut + bin/test_report DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) -INSTALL(FILES +install(FILES package.json DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) -INSTALL(DIRECTORY +install(DIRECTORY src DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) -INSTALL(DIRECTORY +install(DIRECTORY nwjs DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS diff --git a/LICENSE b/LICENSE index 09d493b..7759e1b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2017, +Copyright (c) 2017-2023, All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 6bf0208..f832aa6 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ User interface (editor + runtime control) for the FlexBE behavior engine. +![FlexBE CI](https://github.com/FlexBE/flexbe_app/workflows/FlexBE%20CI/badge.svg?branch=noetic) + ## Installation Clone the following repos into your ROS workspace: - git clone https://github.com/team-vigir/flexbe_behavior_engine.git # if not already present + git clone https://github.com/FlexBE/flexbe_behavior_engine.git # if not already present git clone https://github.com/FlexBE/flexbe_app.git Build you workspace: @@ -49,15 +51,7 @@ Use the following launch file to run both of the above for local behavior execut ## Backwards Compatibility -The FlexBE App in this repository replaces the previous *flexbe_chrome_app*. Please refer to the following announcement for an overview of the most important changes: [Future of the FlexBE Chrome App](https://github.com/pschillinger/flexbe_chrome_app/issues/11) - -If you have been using FlexBE already with the old Chrome app, you can convert the content of your repository according to the structure defined below. Besides adding the export statement to your state packages, you can automate this conversion by running the FlexBE App. If no behavior package is detected, it will suggest you to initialize one. - ---- - -Deprecated Chrome App branch: **deprecated/chrome_app** - -*Please checkout the above branch on all repos if available for a best-effort support of the deprecated Chrome app. However, please consider to update as soon as possible according to the instructions below to ensure that the system will remain working in the future and to receive all updates.* +The FlexBE App in this repository replaces the previous *flexbe_chrome_app*. --- @@ -77,7 +71,7 @@ A package is a state package for FlexBE if its `package.xml` declares the export ... -It is then expected to provide Python class definitions as described in [Developing Basic States](http://wiki.ros.org/flexbe/Tutorials/Developing%20Basic%20States). Example: [flexbe_states](https://github.com/team-vigir/flexbe_behavior_engine/tree/feature/flexbe_app/flexbe_states). Adding the above export statement is the only change to previous versions. +It is then expected to provide Python class definitions as described in [Developing Basic States](http://wiki.ros.org/flexbe/Tutorials/Developing%20Basic%20States). Example: [flexbe_states](https://github.com/FlexBE/flexbe_behavior_engine/tree/feature/flexbe_app/flexbe_states). Adding the above export statement is the only change to previous versions. ### Behavior packages diff --git a/package.xml b/package.xml index 221d466..29708db 100644 --- a/package.xml +++ b/package.xml @@ -1,21 +1,23 @@ flexbe_app - 2.3.0 + 2.4.1 flexbe_app provides a user interface (editor + runtime control) for the FlexBE behavior engine. - Philipp Schillinger + Philipp Schillinger + Philipp Schillinger + David Conner BSD http://ros.org/wiki/flexbe_app - Philipp Schillinger catkin curl - rostest + libasound2-dev libnss3-dev + libxss1 rospy genpy @@ -30,5 +32,6 @@ flexbe_msgs rosunit + rostest diff --git a/src/io/io_codegenerator.js b/src/io/io_codegenerator.js index 67fbe1c..92f5a9b 100644 --- a/src/io/io_codegenerator.js +++ b/src/io/io_codegenerator.js @@ -220,11 +220,11 @@ IO.CodeGenerator = new (function() { } code += ws+ws+"# " + pos.join(", ") + "\n"; if (sm.isConcurrent()) { - code += ws+ws+ sm_name + " = ConcurrencyContainer(outcomes=['" + sm.getOutcomes().join("', '") + "']"; + code += ws+ws+ sm_name + " = ConcurrencyContainer(outcomes=[" + sm.getOutcomes().map(x => "'" + x + "'").join(", ") + "]"; } else if (sm.isPriority()) { - code += ws+ws+ sm_name + " = PriorityContainer(outcomes=['" + sm.getOutcomes().join("', '") + "']"; + code += ws+ws+ sm_name + " = PriorityContainer(outcomes=[" + sm.getOutcomes().map(x => "'" + x + "'").join(", ") + "]"; } else { - code += ws+ws+ sm_name + " = OperatableStateMachine(outcomes=['" + sm.getOutcomes().join("', '") + "']"; + code += ws+ws+ sm_name + " = OperatableStateMachine(outcomes=[" + sm.getOutcomes().map(x => "'" + x + "'").join(", ") + "]"; } if (sm.getInputKeys().length > 0) { code += ", input_keys=['" + sm.getInputKeys().join("', '") + "']"; diff --git a/src/io/io_codeparser.js b/src/io/io_codeparser.js index 3618686..0a13ed4 100644 --- a/src/io/io_codeparser.js +++ b/src/io/io_codeparser.js @@ -264,7 +264,7 @@ IO.CodeParser = new (function() { } - var parseCreateSection = function(code, only_interface) { + var parseCreateSection = function(code, only_interface, state_type_imports) { // get root sm var name var root_sm_name_result = code.match(return_sm_pattern); if (root_sm_name_result == null) throw "could not identify root state machine"; @@ -344,7 +344,7 @@ IO.CodeParser = new (function() { var idx = i * 2 + 1; sm_states.push({ sm_name: sm_parts[idx], - sm_states: parseStates(sm_parts[idx+1]) + sm_states: parseStates(sm_parts[idx+1], state_type_imports) }); } @@ -434,14 +434,14 @@ IO.CodeParser = new (function() { } - var parseStates = function(code) { + var parseStates = function(code, state_type_imports) { var code_splitted = code.split(state_begin_pattern); if (code_splitted.length == 1) throw "a container does not contain any states" var state_list = []; for (var i=4; i { for (var i=0; i { path_data += data; @@ -143,4 +145,4 @@ rospy.spin() // }); // } -}) (); \ No newline at end of file +}) ();