Migration to BT.cpp v4 & new BT executor

This commit is contained in:
Ilya Uraev 2024-07-04 12:11:07 +00:00 committed by Igor Brylyov
parent b58307dea1
commit 2de37b027b
69 changed files with 843 additions and 2065 deletions

View file

@ -6,38 +6,18 @@ from launch_ros.substitutions import FindPackageShare
def generate_launch_description():
declared_arguments = []
declared_arguments.append(
DeclareLaunchArgument(
"bt_file",
default_value="test_tree.xml",
description="BehaviorTree file for run.",
)
)
bt_file = LaunchConfiguration("bt_file")
btfile_description = PathJoinSubstitution(
[FindPackageShare("rbs_bt_executor"), "bt_trees", bt_file]
)
btfile_param = {"bt_file_path": btfile_description}
bt_skills_param = PathJoinSubstitution([FindPackageShare("rbs_bt_executor"), "config", "params.yaml"])
executor_params = PathJoinSubstitution([FindPackageShare("rbs_bt_executor"), "config", "bt_executor.yaml"])
nodes_to_start = [
Node(
package='behavior_tree',
executable='bt_engine',
package='rbs_bt_executor',
executable='rbs_bt_executor',
# prefix=['gdbserver localhost:1234'],
parameters=[
btfile_param,
bt_skills_param,
executor_params,
{'use_sim_time': True}
],
# arguments=[
# "--ros-args",
# "--log-level", "debug",
# ],
)
]
return LaunchDescription(declared_arguments + nodes_to_start)
return LaunchDescription(nodes_to_start)