Cartesian Move_to_pose Skill for BT Interface Node
This commit is contained in:
parent
bf965bb750
commit
b4b452297d
18 changed files with 743 additions and 64 deletions
|
@ -3,6 +3,7 @@
|
|||
ROS 2 launch program for Robossembler
|
||||
|
||||
@shalenikol release 0.1
|
||||
@shalenikol release 0.2 BT v.4
|
||||
"""
|
||||
import os
|
||||
# import json
|
||||
|
@ -13,35 +14,50 @@ from launch.actions import DeclareLaunchArgument, OpaqueFunction, RegisterEventH
|
|||
from launch.substitutions import LaunchConfiguration
|
||||
from launch.event_handlers import OnExecutionComplete
|
||||
|
||||
FILE_BT = "bt.xml"
|
||||
# FILE_BT = "bt.xml"
|
||||
|
||||
def launch_setup(context, *args, **kwargs):
|
||||
# Initialize Arguments
|
||||
bt_path = LaunchConfiguration("bt_path")
|
||||
bt_path = bt_path.perform(context)
|
||||
|
||||
# rbs_bt = Node(
|
||||
# package = "behavior_tree",
|
||||
# executable = "bt_engine",
|
||||
# parameters = [
|
||||
# {"bt_file_path": os.path.join(bt_path, FILE_BT)},
|
||||
# {"plugins": ["rbs_interface"]}
|
||||
# ]
|
||||
# )
|
||||
rbs_bt = Node(
|
||||
package = "behavior_tree",
|
||||
executable = "bt_engine",
|
||||
package = "rbs_bt_executor",
|
||||
executable = "rbs_bt_executor",
|
||||
parameters = [
|
||||
{"bt_file_path": os.path.join(bt_path, FILE_BT)},
|
||||
{"plugins": ["rbs_interface"]}
|
||||
{
|
||||
"plugins": ["rbs_bt_executor/bt_plugins"]
|
||||
# "behavior_trees": [bt_path]
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
bt_exec = Node(
|
||||
package="rbs_interface",
|
||||
executable="bt_exec",
|
||||
arguments=[bt_path]
|
||||
# prefix=['gdbserver localhost:3000'],
|
||||
)
|
||||
|
||||
bt_param = Node(
|
||||
package="rbs_interface",
|
||||
executable="bt_param.py",
|
||||
parameters = [{"bt_path": bt_path}]
|
||||
parameters=[{"bt_path": bt_path}]
|
||||
)
|
||||
# nodes_to_start = [rbs_bt]
|
||||
# return nodes_to_start
|
||||
# return [bt_param]
|
||||
return [
|
||||
RegisterEventHandler(
|
||||
event_handler=OnExecutionComplete(
|
||||
target_action=bt_param,
|
||||
on_completion=[rbs_bt],
|
||||
on_completion=[bt_exec],
|
||||
# on_completion=[rbs_bt, bt_exec],
|
||||
)
|
||||
),
|
||||
bt_param
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue