{"id":49204587,"url":"https://github.com/qualcomm/bt-rviz","last_synced_at":"2026-04-23T17:04:41.520Z","repository":{"id":343507815,"uuid":"1005671636","full_name":"qualcomm/bt-rviz","owner":"qualcomm","description":"Behavior Tree visualisation and monitoring plugin for RVIZ","archived":false,"fork":false,"pushed_at":"2026-02-16T17:32:35.000Z","size":26,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T22:11:56.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qualcomm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-20T15:56:56.000Z","updated_at":"2025-09-29T00:30:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/qualcomm/bt-rviz","commit_stats":null,"previous_names":["qualcomm/bt-rviz"],"tags_count":null,"template":false,"template_full_name":"qualcomm/qualcomm-repository-template","purl":"pkg:github/qualcomm/bt-rviz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fbt-rviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fbt-rviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fbt-rviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fbt-rviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qualcomm","download_url":"https://codeload.github.com/qualcomm/bt-rviz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fbt-rviz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32189670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T15:28:30.493Z","status":"ssl_error","status_checked_at":"2026-04-23T15:28:29.972Z","response_time":53,"last_error":"SSL_read: 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":[],"created_at":"2026-04-23T17:04:41.452Z","updated_at":"2026-04-23T17:04:41.512Z","avatar_url":"https://github.com/qualcomm.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BT-RVIZ: plugin for behavior tree monitoring\n\nThis project allows users to visualise their behavior tree (including subtrees!) using ROS2 messages and RVIZ. \nIt is a helpful tool for debugging the tree structure and identify any flows in the execution itself.\n\n## Branches\n\n**main**: Primary development branch.\n\n## Requirements\n\nThe following must be installed:\n- ROS2 Humble\n- BehaviorTree.CPP\n- RVIZ\n\n## Installation Instructions\n\nClone the repository to your ROS2 workspace.\n\nTo install dependencies, run rosdep from the workspace root.\n\n```\nrosdep install --from-paths src --ignore-src\n```\n\nBuild the packages.\n\n```\ncolcon build\n```\n\n## Usage\n\n1. Create a parser\nInclude the tree parser in your file:\n```cpp\n#include \u003ctree_parser.hpp\u003e\n```\nThen, create a Tree Parser object with the name `parser`:\n```\nTreeParser parser;\n```\n\n2. Generate Tree Nodes Model\nThis functionality is already provided in a BehaviorTree.CPP package. To use it:\n```cpp\nstd::string xml_models = BT::writeTreeNodesModelXML(factory_);\nstd::ofstream file(\"tree_nodes_model.xml\");\nif (file.is_open()) {\n    file \u003c\u003c xml_models; \n    file.close();\n} else {\n    std::cerr \u003c\u003c \"Error: Unable to open file for writing!\" \u003c\u003c std::endl;\n}\n```\n\n3. Create node map with all types\nUse the `parser` created earlier to get node types from the Tree Nodes Model string `xml_models`:\n```cpp\nauto nodes = parser.parseNodeTypes(xml_models);\n```\n\n4. Parse the tree from XMLs\nSince now all the types are known, we can create a tree using the XML files where the hierarchy is defined.\nThe function accepts the `std::vector\u003cstd::string\u003e`, a list of paths to XML files, which allows to parse the subtrees too.\nThe first element in the array must be the main tree.\n```cpp\nstd::vector\u003cstd::string\u003e xml_paths = {\n        \"main_tree.xml\",\n        \"subtree1.xml\",\n        \"subtree2.xml\",\n        \"subtree3.xml\",\n    };\nparser.parseTreeHierarchy(xml_paths, nodes);\n```\n\n5. Construct BT message\n\u003e Make sure to build bt_msgs provided in this repository, as the type is custom.\nFirst, include the header:\n```cpp\n#include \"bt_msgs/msg/bt.hpp\"\n```\nThen, use parser along with the updated node map to generate a message and store it:\n```cpp\nbt_msgs::msg::BT bt_message = parser.constructBTMessage(nodes);\n```\nThis message doesn't have to be published often, should be published at least once in the beginning and, if needed, be updated infrequently.\n\n6. Monitor the tree\nInclude the BTMonitor in your file:\n```cpp\n#include \u003cbt_monitor.hpp\u003e\n```\nTo create a monitor object, you will need tyo create a node in your main file, which will be passed to the constructor with the tree and nodes map.\nThe tree refers to the normal BehaviorTree.CPP setup tree: \n```cpp\nauto tree = factory_.createTree(\"MainTree\");\n```\nThen, create a monitor and attach it:\n```cpp\nrclcpp::Node::SharedPtr node = rclcpp::Node::make_shared(\"bt_monitor_node\");\nBTMonitor monitor(tree, node, nodes);\n```\n\nAfter all this is done, you can start the executor.\n\n## Debugging\n\n- Make sure to have a name for all nodes in XML\nAll tags, including sequences and fallbacks should hjave a `name=\"\"` field. The tags that do not have this property should have an `ID=\"\"`.\nOther nodes will be considered custom types and may cause issues.\n\n- Verify the paths to your XMLs are correct\n\n- Print available nodes\nTreeParser allows you to print all the nodes in the map, for this, use:\n```cpp\nvoid TreeParser::printNodes(const std::unordered_map\u003cstd::string, NodeData\u003e\u0026 node_map);\n```\nTo make sure you do not have any unconnected nodes, you can print only connected ones:\n```cpp\nvoid TreeParser::printConnectedNodes(const std::unordered_map\u003cstd::string, NodeData\u003e\u0026 node_map);\n```\n\n- Print the constructed message\nThe parser alsdo provides a way to print a BT message from bt_msgs, allowing you to see the:\nname, type, status, parent, children of all nodes in the tree and the root of the tree.\n```cpp\nvoid TreeParser::printBTMessage(const bt_msgs::msg::BT\u0026 bt_message);\n```\n\n## Development\n\nIf you wish to contribute, check:\n[CONTRIBUTING.md file](CONTRIBUTING.md).\n\n## Getting in Contact\n\n* [Report an Issue on GitHub](../../issues)\n* [E-mail us](mailto:ssarana@qti.qualcomm.com) for general questions\n\n## License\n\n*bt-rviz* is licensed under the [BSD-3-clause License](https://spdx.org/licenses/BSD-3-Clause.html). See [LICENSE.txt](LICENSE.txt) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualcomm%2Fbt-rviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqualcomm%2Fbt-rviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualcomm%2Fbt-rviz/lists"}