improve parrameters passing to bt_engine
This commit is contained in:
parent
c44bc1a654
commit
4dbf722c73
2 changed files with 7 additions and 23 deletions
|
@ -1,10 +1,8 @@
|
|||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch_ros.actions import Node
|
||||
from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
# from ament_index_python.packages import get_package_share_directory
|
||||
# import os
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
|
@ -12,41 +10,28 @@ def generate_launch_description():
|
|||
declared_arguments.append(
|
||||
DeclareLaunchArgument(
|
||||
"bt_file",
|
||||
default_value="test_tree_env_manager.xml",
|
||||
default_value="test_tree.xml",
|
||||
description="BehaviorTree file for run.",
|
||||
)
|
||||
)
|
||||
bt_file = LaunchConfiguration("bt_file")
|
||||
|
||||
robot_description_semantic_content = Command(
|
||||
[
|
||||
PathJoinSubstitution([FindExecutable(name="xacro")]),
|
||||
" ",
|
||||
PathJoinSubstitution(
|
||||
[FindPackageShare("ur_moveit_config"), "srdf", "ur.srdf.xacro"]
|
||||
),
|
||||
" ",
|
||||
"name:=",
|
||||
"ur",
|
||||
" ",
|
||||
"prefix:=",
|
||||
"",
|
||||
" ",
|
||||
]
|
||||
)
|
||||
robot_description_semantic = {"robot_description_semantic": robot_description_semantic_content}
|
||||
|
||||
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"])
|
||||
|
||||
nodes_to_start = [
|
||||
Node(
|
||||
package='behavior_tree',
|
||||
executable='bt_engine',
|
||||
# prefix=['gdbserver localhost:3000'],
|
||||
parameters=["/home/bill-finger/rbs_ws/src/robossembler-ros2/rbs_bt_executor/config/params.yaml"]
|
||||
parameters=[
|
||||
btfile_param,
|
||||
bt_skills_param
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue