-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"carma" shell script update to support dual compute system #2189
Draft
willjohnsonk
wants to merge
32
commits into
develop
Choose a base branch
from
test/dual-compute
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
31dde3a
Initial support for swarm commands in carma bash script
willjohnsonk 66a8100
Updated dual compute deploy commands and volume config based on testing
willjohnsonk 2b9c1b6
Minor fixes to token command, added fi
willjohnsonk a97e5ce
Double quotes and spaces, my enemy
willjohnsonk 01a60e9
Added commands for log attachment, help, and initial registry setup
willjohnsonk 09f343b
Changed swarm update-config to support config set arguments, fixed ar…
willjohnsonk 93e637f
Added edit arg and minor updates to config management
willjohnsonk 4564bc6
Minor fixes following dual compute test
willjohnsonk 89ea7b4
Migrated swarm code to extensions and changed from ifs to functions. …
willjohnsonk 99d1ff4
Swarm install/config status added. Minor improvments to image-based a…
willjohnsonk 712d7af
Updated to support env variables
willjohnsonk 0872174
Naming fixes and added clarity
willjohnsonk b71efdf
Registry updates for testing, minor fixes
willjohnsonk 42c3a46
Test fix for env variable subshell usage
willjohnsonk 6092f73
Added read only vars, PR changes, fixed stop and register
willjohnsonk 35f7a27
Added dual compute params and updated LaunchDescription
willjohnsonk b2c0b40
Changed carma_src launch decription to better reflect conditionals
willjohnsonk 36283b8
Fixes to configuration params and string syntax following testing on …
willjohnsonk 0af1659
Fixed an issue that prevented setting a full image name in set config
willjohnsonk b001822
Removed unnecessary echo
willjohnsonk d15d4c8
Addressing PR comments related to variable naming and other issues in…
willjohnsonk 0453dc8
Removed commented-out items, minor registry fix
willjohnsonk fc90a39
Fixed EOF on registry
willjohnsonk 1bcfa09
Corrected EOF issue on register from tab, added domain environment va…
willjohnsonk 70502e4
Added a check for carma-config-data volume existence on worker
willjohnsonk ec78263
Improved IP/USER fetching by removing carma-base dependency
willjohnsonk d6c3db2
Updated settings to reflect working config on the dual compute test s…
willjohnsonk 37e56ae
Added rsync files to engineering_tools for tracking, may need to be m…
willjohnsonk e801637
Cleared shell check warnings
willjohnsonk ff69d8b
Merged develop into branch, resolved conflicts
willjohnsonk 6a29f4c
Fixed swapped Manager/Worker variables
willjohnsonk 623f636
Minor directory access change
willjohnsonk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,22 @@ def generate_launch_description(): | |
default_value= 'False', | ||
description='Flag to enable opening http tunnesl to CARMA Cloud' | ||
) | ||
|
||
# Declare system_architecture | ||
system_architecture = LaunchConfiguration('system_architecture') | ||
declare_system_architecture = DeclareLaunchArgument( | ||
name = 'system_architecture', | ||
default_value = 'single', | ||
description = 'Flag to define whether a single compute system or a dual compute system is being used' | ||
) | ||
|
||
# Declare host_placement | ||
host_placement = LaunchConfiguration('host_placement') | ||
declare_host_placement = DeclareLaunchArgument( | ||
name = 'host_placement', | ||
default_value = 'manager', | ||
description = 'Flag to define whether the current active host is a manager or worker for ROS node allocation' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, can you define the accepted values for the config in the description? |
||
) | ||
|
||
# Declare port | ||
port = LaunchConfiguration('port') | ||
|
@@ -144,8 +160,10 @@ def generate_launch_description(): | |
simulation_mode = LaunchConfiguration('simulation_mode') | ||
declare_simulation_mode = DeclareLaunchArgument(name='simulation_mode', default_value = 'False', description = 'True if CARMA Platform is launched with CARLA Simulator') | ||
|
||
|
||
# Launch ROS2 rosbag logging | ||
ros2_rosbag_launch = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
adev4a marked this conversation as resolved.
Show resolved
Hide resolved
|
||
actions=[ | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/ros2_rosbag.launch.py']), | ||
|
@@ -158,8 +176,8 @@ def generate_launch_description(): | |
) | ||
|
||
# Nodes | ||
|
||
transform_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_TF_NS', default_value='/')), | ||
IncludeLaunchDescription( | ||
|
@@ -168,7 +186,9 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
environment_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_ENV_NS', default_value='environment')), | ||
IncludeLaunchDescription( | ||
|
@@ -183,7 +203,9 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
localization_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_LOCZ_NS', default_value='localization')), | ||
IncludeLaunchDescription( | ||
|
@@ -202,7 +224,9 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
v2x_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_MSG_NS', default_value='message')), | ||
IncludeLaunchDescription( | ||
|
@@ -217,10 +241,11 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
guidance_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'worker'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_GUIDE_NS', default_value='guidance')), | ||
|
||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/guidance.launch.py']), | ||
launch_arguments={ | ||
|
@@ -237,7 +262,9 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
drivers_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_INTR_NS', default_value='hardware_interface')), | ||
IncludeLaunchDescription( | ||
|
@@ -250,7 +277,9 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
system_controller = Node( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
package='system_controller', | ||
name='system_controller', | ||
executable='system_controller', | ||
|
@@ -259,10 +288,11 @@ def generate_launch_description(): | |
arguments=['--ros-args', '--log-level', GetLogLevel('system_controller', env_log_levels)] | ||
) | ||
|
||
|
||
ui_group = GroupAction( | ||
condition=IfCondition(PythonExpression(["'", host_placement, "' == 'manager'"])), | ||
actions=[ | ||
PushRosNamespace(EnvironmentVariable('CARMA_UI_NS', default_value='ui')), | ||
|
||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/ui.launch.py']), | ||
launch_arguments={ | ||
|
@@ -272,6 +302,7 @@ def generate_launch_description(): | |
] | ||
) | ||
|
||
|
||
return LaunchDescription([ | ||
declare_vehicle_calibration_dir_arg, | ||
declare_vehicle_config_dir_arg, | ||
|
@@ -290,13 +321,15 @@ def generate_launch_description(): | |
declare_arealist_path, | ||
declare_vector_map_file, | ||
declare_simulation_mode, | ||
declare_system_architecture, | ||
declare_host_placement, | ||
drivers_group, | ||
transform_group, | ||
environment_group, | ||
localization_group, | ||
v2x_group, | ||
guidance_group, | ||
guidance_group, | ||
ros2_rosbag_launch, | ||
ui_group, | ||
system_controller | ||
]) | ||
]) |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also specify the accepted values for this config in the description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically the accepted values are shown in both of these but I can see how it's not clear. It'd be better to be bolded but can't have that, do you think putting it as 'single' 'dual' / 'manager' 'worker' with single quotes in the text be clear enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i think having them in single quotes would make it clear that those are the values we can use here