Skip to content
Snippets Groups Projects
Unverified Commit e09cabde authored by Carl Delsey's avatar Carl Delsey Committed by GitHub
Browse files

Install Behavior Trees in correct location (#1231)

* Install behavior trees in correct location

* Fix up bt paths in launch files.
parent 4a92d7b4
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
import os
from ament_index_python.packages import get_package_prefix, get_package_share_directory
from ament_index_python.packages import get_package_share_directory
from nav2_common.launch import Node
......@@ -74,7 +74,7 @@ def generate_launch_description():
declare_bt_xml_cmd = DeclareLaunchArgument(
'bt_xml_file',
default_value=os.path.join(
get_package_prefix('nav2_bt_navigator'),
get_package_share_directory('nav2_bt_navigator'),
'behavior_trees', 'navigate_w_replanning_and_recovery.xml'),
description='Full path to the behavior tree xml file to use')
......
......@@ -18,7 +18,6 @@
import os
from ament_index_python.packages import get_package_prefix
from ament_index_python.packages import get_package_share_directory
from nav2_common.launch import ReplaceString
......@@ -76,7 +75,7 @@ def generate_launch_description():
declare_bt_xml_cmd = DeclareLaunchArgument(
'bt_xml_file',
default_value=os.path.join(
get_package_prefix('nav2_bt_navigator'),
get_package_share_directory('nav2_bt_navigator'),
'behavior_trees', 'navigate_w_replanning_and_recovery.xml'),
description='Full path to the behavior tree xml file to use')
......
......@@ -14,7 +14,7 @@
import os
from ament_index_python.packages import get_package_prefix, get_package_share_directory
from ament_index_python.packages import get_package_share_directory
from nav2_common.launch import RewrittenYaml
from nav2_common.launch import Node
......@@ -85,7 +85,7 @@ def generate_launch_description():
DeclareLaunchArgument(
'bt_xml_file',
default_value=os.path.join(get_package_prefix('nav2_bt_navigator'),
default_value=os.path.join(get_package_share_directory('nav2_bt_navigator'),
'behavior_trees', 'navigate_w_replanning_and_recovery.xml'),
description='Full path to the behavior tree xml file to use'),
......
......@@ -84,7 +84,7 @@ def generate_launch_description():
declare_bt_xml_cmd = DeclareLaunchArgument(
'bt_xml_file',
default_value=os.path.join(
get_package_prefix('nav2_bt_navigator'),
get_package_share_directory('nav2_bt_navigator'),
'behavior_trees', 'navigate_w_replanning_and_recovery.xml'),
description='Full path to the behavior tree xml file to use')
......
......@@ -69,9 +69,7 @@ install(DIRECTORY include/
DESTINATION include/
)
install(DIRECTORY behavior_trees/
DESTINATION behavior_trees/
)
install(DIRECTORY behavior_trees DESTINATION share/${PROJECT_NAME})
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
......
......@@ -18,7 +18,6 @@ import os
import sys
from ament_index_python.packages import get_package_prefix
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch import LaunchService
......@@ -34,7 +33,7 @@ def generate_launch_description():
bringup_package = get_package_share_directory('nav2_bringup')
params_file = os.path.join(bringup_package, 'params/nav2_params.yaml')
astar = (os.getenv('ASTAR').lower() == 'true')
bt_navigator_install_path = get_package_prefix('nav2_bt_navigator')
bt_navigator_install_path = get_package_share_directory('nav2_bt_navigator')
bt_navigator_xml = os.path.join(bt_navigator_install_path,
'behavior_trees',
os.getenv('BT_NAVIGATOR_XML'))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment