{"id":15144512,"url":"https://github.com/andreaszachariae/iras_coordinator","last_synced_at":"2026-01-19T04:01:10.591Z","repository":{"id":215458386,"uuid":"728178018","full_name":"AndreasZachariae/iras_coordinator","owner":"AndreasZachariae","description":"The ROS2 Humble package offers a starting point for high-level task control of your robotic application. It is based on the BehaviorTree.CPP framework.","archived":false,"fork":false,"pushed_at":"2024-04-30T11:44:31.000Z","size":426,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"humble","last_synced_at":"2025-04-04T05:42:00.824Z","etag":null,"topics":["behavior-tree","humble","robot-framework","ros2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreasZachariae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-06T11:51:40.000Z","updated_at":"2024-04-30T11:44:35.000Z","dependencies_parsed_at":"2024-01-04T15:31:24.847Z","dependency_job_id":"de4be595-2eb0-4d88-87be-15826521183d","html_url":"https://github.com/AndreasZachariae/iras_coordinator","commit_stats":null,"previous_names":["andreaszachariae/iras_coordinator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndreasZachariae/iras_coordinator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasZachariae%2Firas_coordinator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasZachariae%2Firas_coordinator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasZachariae%2Firas_coordinator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasZachariae%2Firas_coordinator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreasZachariae","download_url":"https://codeload.github.com/AndreasZachariae/iras_coordinator/tar.gz/refs/heads/humble","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasZachariae%2Firas_coordinator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28561602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behavior-tree","humble","robot-framework","ros2"],"created_at":"2024-09-26T10:41:54.662Z","updated_at":"2026-01-19T04:01:10.574Z","avatar_url":"https://github.com/AndreasZachariae.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IRAS Coordinator\nThis package uses the [BehaviorTree.IRAS](https://github.com/AndreasZachariae/BehaviorTree.IRAS) framework which is a wrapper around the [BehaviorTree.cpp v3.8](https://www.behaviortree.dev/) library and extends it for the combined use of behavior trees with ROS 2 Humble.\n\nThe IRAS Coordinator offers a starting point for high-level task control of your robotic application. Just clone this package and change the git remote and develop behaviors for your own custom project.\n```bash\ngit clone -b humble https://github.com/AndreasZachariae/iras_coordinator.git\ncd iras_coordinator\ngit remote remove origin\ngit remote add origin \u003cyour_repo_adress\u003e\n```\n\nThe library of actions can be arranged freely with the graphical user interface [Groot](https://github.com/BehaviorTree/Groot).\n\n![groot](https://github.com/BehaviorTree/Groot/raw/master/groot-screenshot.png)\n\n## How to start\n\nBuild and start the docker container\n```bash\nsource build_docker.sh\nsource start_docker.sh\n```\n\nInside the container launch the Coordinator node with parameters\n```bash\nros2 launch iras_coordinator test.launch.py\n```\n    \nTo view or modify the behavior trees, attach a new shell and start Groot\n```bash\ndocker exec -it coordinator bash\nros2 run groot Groot\n```\n## How to start with C++ debugging\n\nInstall VSCode extension:\n- Remote Development\n- ROS\n- C/C++\n\nMount settings folder .vscode to target directory for development\n```bash\n# Add parameter to docker run command\n-v $PWD/.vscode:/home/docker/ros2_ws/src/.vscode\n```\n\n```bash\nsource start_docker.sh\n```\n\n1. Attach to running docker container with VSCode remote extension\n2. Open remote folder where .vscode is mounted to\n3. Install `ROS` and `C/C++` extension in container\n4. Use command palette (strg + shift + p) and `Tasks: Run Task` and `Build`\n5. Use VSCode debugger and stop points for debugging\n\n## How to design a new Behavior Tree\n\n1. Start the docker container as normal\n    ```bash\n    source start_docker.sh\n    ```\n\n2. If new BT nodes were added or ports changed regenerate the GrootPalette by starting a test BT.\n   ```bash\n   # in ~/ros2_ws/\n   colcon build\n   ros2 launch iras_coordinator test.launch.py\n   ```\n\n3. Start Groot in Editor mode\n    ```bash\n    ros2 run groot Groot\n    # Click \"Editor\" and \"START\"\n    ```\n4. Load GrootPalette with all custom nodes.  \n   Click on -\u003e  \u003cimg src=\"https://raw.githubusercontent.com/BehaviorTree/Groot/master/bt_editor/resources/svg/download.svg\" alt=\"load\" width=\"18\"/\u003e to load palette from file.  \n   Choose the file from: `/home/docker/ros2_ws/src/iras_coordinator/behaviors/GrootPalette.xml`\n5. Build BT via drag and drop\n6. Save tree to file.  \n   Click on -\u003e  \u003cimg src=\"https://raw.githubusercontent.com/BehaviorTree/Groot/master/bt_editor/resources/svg/save_dark.svg\" alt=\"load\" width=\"18\"/\u003e to save.  \n   Choose location as: `/home/docker/ros2_ws/src/iras_coordinator/behaviors/\u003cyour_folder_name\u003e/`\n7. Modify config parameter\n    ```yaml\n    # in /home/docker/ros2_ws/src/iras_coordinator/config/params.yaml\n    main_tree_path: \"/home/docker/ros2_ws/src/iras_coordinator/behaviors/\u003cyour_folder_name\u003e/\u003cyour_tree_name\u003e.xml\"\n    ```\n    OR create a new launch file with this parameter\n    ```python\n    # in /home/docker/ros2_ws/src/iras_coordinator/launch/\u003cyour_launch_file\u003e.launch.py\u003e\n    parameters=[{'main_tree_path': \"/home/docker/ros2_ws/src/iras_coordinator/behaviors/\u003cyour_folder_name\u003e/\u003cyour_tree_name\u003e.xml\",\n                 'groot_palette_path': \"/home/docker/ros2_ws/src/iras_coordinator/behaviors/GrootPalette.xml\"}],\n    ```\n8. Launch your node \n   \n\n## How to create a new custom node\n\nThere are currently 4 different types of nodes supported:\n- **actions** Use for ROS2 action client\n- **services** Use for ROS2 service client\n- **conditions** Use for classic BT condition with ROS2 node handle access\n- **nodes** Use for classic BT action with ROS2 node handle access\n\nThis instructions gives an example for a ROS2 action client\n\n1. Add a new header file in the corresponding folder at `iras_coordinator/include/iras_coordinator/actions`. For this, copy an existing file from that folder and rename. Use this structure as template. Copy `MoveBase.h` and rename to `MyCustomActionNode.h`.\n2. Add a new source file in `iras_coordinator/src/actions`. Copy `MoveBase.cpp` and rename to `MyCustomActionNode.cpp`.\n3. In this source file change the first line to include your newly added header.  \n   Replace: ~~`#include \u003ciras_coordinator/actions/MoveBase.h\u003e`~~\n    ```cpp\n    // in MyCustomActionNode.cpp\n    #include \u003ciras_coordinator/actions/MyCustomActionNode.h\u003e\n    ```\n4. In your header file `MyCustomActionNode.h` include the header files of your ROS2 interface you want to use. In this example it is located in the `iras_interfaces` package.  \nReplace: ~~`#include \u003cnav2_msgs/action/navigate_to_pose.hpp\u003e`~~  \n**Important**: Interface header files are generated automatically. If your Interface file is called `MyCustomAction.action` (PascalCase) the generated header will be `my_custom_action.hpp` (snake_case).\n    ```cpp\n    // in MyCustomActionNode.h\n    #include \u003ciras_interfaces/action/my_custom_action.hpp\u003e\n    ```\n5. Give an alias as shorter name.  \nReplace: ~~`using NavigateToPoseAction = nav2_msgs::action::NavigateToPose;`~~\n    ```cpp\n    // in MyCustomActionNode.h\n    using MyCustomAction = iras_interfaces::action::MyCustomAction;\n    ```\n6. Replace all occurences where old alias is used with new one in `.ccp` and `.h` file. Use VSCode find and replace (strg + f) or rename symbol (F2) shortcut.\n7. Change the class name to the same name as the file.  \n   Replace: ~~`class MoveArm : public RosAction\u003cMoveArmMoveIt\u003e`~~  \n   **Important**: The class name must be different from the given alias.\n    ```cpp\n    // in MyCustomActionNode.h\n    class MyCustomActionNode : public RosAction\u003cMyCustomAction\u003e\n    ```\n8. Replace all occurences of the old class name in the source file `.ccp` with new one. Use VSCode find and replace (strg + f) or rename symbol (F2) shortcut.  \n   Replace: For every function: ~~`std::string MoveBase::ros2_action_name()`~~\n    ```cpp\n    // in MyCustomActionNode.cpp\n    // for every function\n    std::string MyCustomActionNode::ros2_action_name()\n    /* ... */\n    ```\n9. Set the topic name of the ROS2 action server to connect with as string.\n    ```cpp\n    // in MyCustomActionNode.cpp\n    std::string MyCustomActionNode::ros2_action_name()\n    {\n        return \"my_custom_action_topic\";\n    }\n    ```\n10. Set the list of ports provided by the BT node.\n    ```cpp\n    // in MyCustomActionNode.cpp\n\n    /* New port:\n    *      direction = [BT::InputPort, BT::OutputPort, BT::BidirectionalPort]\n    *      data_type = \u003c[float, int, std::string]\u003e\n    *      name = (\"name\") */\n    BT::PortsList MyCustomActionNode::providedPorts()\n    {\n        return {BT::InputPort\u003cstd::string\u003e(\"string_input\"),\n                BT::OutputPort\u003cfloat\u003e(\"float_output\"),\n                BT::BidirectionalPort\u003cint\u003e(\"int_bidirectional\")\n                /* ... */};\n    }\n    ```\n11. Set the content of the goal message which is sent to the ROS2 action server.\n    ```cpp\n    // in MyCustomActionNode.cpp\n    void MyCustomActionNode::on_send(MyCustomAction::Goal \u0026goal)\n    {\n        goal.header.frame_id = \"custom_frame\";\n        goal.header.stamp = get_node_handle()-\u003enow();\n        /* ... */\n        log(\"Custom goal sent\");\n    }\n    ```\n12. Define what happens when recieving feedback from the ROS2 action server.\n    ```cpp\n    // in MyCustomActionNode.cpp\n    void MyCustomActionNode::on_feedback(const std::shared_ptr\u003cconst NavigateToPoseAction::Feedback\u003e feedback)\n    {\n        /* ... */\n        log(\"Feedback no. \" + std::to_string(feedback.counter) + \" recieved\");\n    }\n    ```\n13. Define what happens when recieving the result from the ROS2 action server.\n    ```cpp\n    // in MyCustomActionNode.cpp\n    void MyCustomActionNode::on_result(const rclcpp_action::ClientGoalHandle\u003cMyCustomAction\u003e::WrappedResult \u0026result, const MyCustomAction::Goal \u0026goal)\n    {\n        /* ... */\n        log(\"Action finished\");\n    }\n    ```\n14. Include your header file in the Coordinator node at `iras_coordinator/src/node.cpp`\n    ```cpp\n    // in node.cpp\n    #include \u003ciras_coordinator/actions/MyCustomActionNode.h\u003e\n    ```\n15. Register your node in the BehaviorTreeFactory.  \n    **Important**: The string given here defines the name of the node in BT XML representation and Groot.\n    ```cpp\n    // in node.cpp\n    factory.registerNodeType\u003cMyCustomActionNode\u003e(\"MyCustomActionNode\");\n    ```\n16. Rebuild and start the container as described above. This will generate an updated GrootPalette to use in the graphical editor Groot as described in \"How to design a new Behavior Tree\"\n\n\n## License\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis work is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/4.0/\"\u003eCreative Commons Attribution-NonCommercial 4.0 International License\u003c/a\u003e.\n\n\n## TODO\n- [x] Groot Palette for new navigation actions clear costmap initialpose\n- [ ] (Integrate LifecycleManager to Coordinator)\n- [x] (Integrate cpp_core)\n- [x] Better name ros_name() Make function for each type action, service, etc\n- [x] Add Groot publisher integration\n- [ ] Add RosPublisher and RosSubscriber\n- [x] finish PortHandler and rename XMLDefinition\n- [x] Add general doc with purpose of this repo\n- [x] Add instructions how to add new nodes\n- [x] Add instructions how to edit BT with Groot\n- [x] Finish refactoring of lagacy nodes with new style\n- [x] Add cpp debugger for ros nodes and launch files (ROS extension has to be installed)\n- [x] Restructure repo folders. Move cpp_core and bt.iras to separate repo\n- [ ] Add iras_dummies package for faster development of behaviors and offer templates for ROS2 dummy server\n\n## Port from FOXY to HUMBLE:\n- declare_parameter needs a type argument `this-\u003edeclare_parameter(\"my_str\", rclcpp::PARAMETER_STRING);`\n- `what():  std::future_error: No associated state` https://github.com/ros2/rclcpp/issues/1968\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaszachariae%2Firas_coordinator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaszachariae%2Firas_coordinator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaszachariae%2Firas_coordinator/lists"}