-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
392 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription | ||
from launch.substitutions import LaunchConfiguration | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
|
||
flexbe_app_dir = get_package_share_directory('flexbe_app') | ||
flexbe_onboard_dir = get_package_share_directory('flexbe_onboard') | ||
|
||
|
||
def generate_launch_description(): | ||
return LaunchDescription([ | ||
DeclareLaunchArgument( | ||
"no_app", | ||
default_value="false"), | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource(flexbe_app_dir + "/launch/flexbe_ocs.launch.py"), | ||
launch_arguments={ | ||
"offline": "false", | ||
"no_app": LaunchConfiguration("no_app") | ||
}.items() | ||
), | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource(flexbe_onboard_dir + "/behavior_onboard.launch.py") | ||
) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription | ||
from launch.substitutions import LaunchConfiguration | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
|
||
|
||
offline = DeclareLaunchArgument("offline", default_value="false") | ||
|
||
offline_arg = None | ||
|
||
if LaunchConfiguration("offline_arg"): | ||
offline_arg = DeclareLaunchArgument("offline_arg", default_value="--offline") | ||
else: | ||
offline_arg = DeclareLaunchArgument("offline_arg", default_value="") | ||
|
||
no_app = DeclareLaunchArgument("no_app", default_value="false") | ||
|
||
behavior_mirror = Node(name="behavior_mirror", package="flexbe_mirror", executable="behavior_mirror_sm") | ||
|
||
flexbe_app = Node(name="flexbe_app", package="flexbe_app", executable="run_app", output="screen", | ||
arguments=[{LaunchConfiguration("offline_arg")}]) | ||
|
||
behavior_launcher = Node(name="behavior_launcher", package="flexbe_widget", executable="be_launcher", output="screen") | ||
|
||
def generate_launch_description(): | ||
return LaunchDescription([ | ||
offline, | ||
offline_arg, | ||
no_app, | ||
behavior_mirror, | ||
flexbe_app, | ||
behavior_launcher | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os | ||
import sys | ||
import ament_index_python | ||
import launch | ||
import launch_ros | ||
import launch_ros.actions | ||
import launch_testing.actions | ||
import launch_testing_ros | ||
import pytest | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
@pytest.mark.rostest | ||
def generate_launch_description(): | ||
flexbe_app_dir = get_package_share_directory('flexbe_app') | ||
TEST_PROC_PATH = os.path.join(flexbe_app_dir, 'test_report') | ||
|
||
# This is necessary to get unbuffered output from the process under test | ||
proc_env = os.environ.copy() | ||
proc_env['PYTHONUNBUFFERED'] = '1' | ||
|
||
test_report = launch.actions.ExecuteProcess( | ||
cmd=[sys.executable, TEST_PROC_PATH], | ||
env=proc_env, | ||
output='screen', | ||
sigterm_timeout=launch.substitutions.LaunchConfiguration('sigterm_timeout', default=90), | ||
sigkill_timeout=launch.substitutions.LaunchConfiguration('sigkill_timeout', default=90) | ||
) | ||
|
||
return ( | ||
launch.LaunchDescription([ | ||
test_report, | ||
launch_testing.actions.ReadyToTest() | ||
]), | ||
{ | ||
'test_report': test_report, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.