Skip to content

Commit

Permalink
changes related to discussion in #116
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanCaldararu committed Nov 20, 2023
1 parent d4280cc commit 0756bd9
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 103 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(art_shared_launch)
project(art_dev_launch)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,45 +47,47 @@
def generate_launch_description():
ld = LaunchDescription()

# -------------
# Composability
# -------------
AddLaunchArgument(ld, "container", "")
container_name = AddLaunchArgument(ld, "container_name", "art_container")
# If composability is desired, all included launch descriptions should attach to this container and use intraprocess communication
# ----------------
# Launch Arguments
# ----------------

use_composability = IfCondition(AddLaunchArgument(ld, "use_composability", "False"))

# If a container name is not provided,
# set the name of the container launched above for image_proc nodes
set_container_name = SetLaunchConfiguration(
condition=use_composability, name="container", value=container_name
AddLaunchArgument(ld, "use_sim", "False")
AddLaunchArgument(ld, "use_sim_time", "False")
SetLaunchArgument(
ld, "use_sim_time", "True", condition=IfCondition(GetLaunchArgument("use_sim"))
)
ld.add_action(set_container_name)

container = ComposableNodeContainer(
name=container_name,
namespace="",
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[],
condition=use_composability,
output="screen",
SetLaunchArgument(
ld,
"disable_art_sensing",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
)
ld.add_action(container)

# ---------------
# Launch Includes
# ---------------

IncludeLaunchDescriptionWithCondition(ld, "art_perception_launch", "art_perception")
IncludeLaunchDescriptionWithCondition(
ld, "art_localization_launch", "art_localization"
SetLaunchArgument(
ld,
"disable_art_vehicle",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
)
SetLaunchArgument(
ld,
"disable_art_simulation",
"True",
condition=UnlessCondition(GetLaunchArgument("use_sim")),
)
IncludeLaunchDescriptionWithCondition(ld, "art_planning_launch", "art_planning")
IncludeLaunchDescriptionWithCondition(ld, "art_control_launch", "art_control")
IncludeLaunchDescriptionWithCondition(ld, "art_sensing_launch", "art_sensing")
IncludeLaunchDescriptionWithCondition(ld, "art_vehicle_launch", "art_vehicle")
IncludeLaunchDescriptionWithCondition(ld, "art_simulation_launch", "art_simulation")
SetLaunchArgument(
ld,
"disable_ekf_estimation",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
)
SetLaunchArgument(
ld,
"disable_particle_filter_estimation",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
)

IncludeLaunchDescriptionWithCondition(ld, "art_launch", "art")

return ld
20 changes: 20 additions & 0 deletions workspace/src/common/launch/art_dev_launch/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package format="3">
<name>art_launch</name>
<version>0.1.0</version>
<description>The art_dev_launch package</description>

<maintainer email="[email protected]">TODO</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<exec_depend>art_launch</exec_depend>
<exec_depend>launch_utils</exec_depend>

<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
72 changes: 35 additions & 37 deletions workspace/src/common/launch/art_launch/launch/art.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,47 +47,45 @@
def generate_launch_description():
ld = LaunchDescription()

# ----------------
# Launch Arguments
# ----------------
# -------------
# Composability
# -------------
AddLaunchArgument(ld, "container", "")
container_name = AddLaunchArgument(ld, "container_name", "art_container")
# If composability is desired, all included launch descriptions should attach to this container and use intraprocess communication

AddLaunchArgument(ld, "use_sim", "False")
AddLaunchArgument(ld, "use_sim_time", "False")
SetLaunchArgument(
ld, "use_sim_time", "True", condition=IfCondition(GetLaunchArgument("use_sim"))
)
use_composability = IfCondition(AddLaunchArgument(ld, "use_composability", "False"))

SetLaunchArgument(
ld,
"disable_art_sensing",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
)
SetLaunchArgument(
ld,
"disable_art_vehicle",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
)
SetLaunchArgument(
ld,
"disable_art_simulation",
"True",
condition=UnlessCondition(GetLaunchArgument("use_sim")),
)
SetLaunchArgument(
ld,
"disable_ekf_estimation",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
# If a container name is not provided,
# set the name of the container launched above for image_proc nodes
set_container_name = SetLaunchConfiguration(
condition=use_composability, name="container", value=container_name
)
SetLaunchArgument(
ld,
"disable_particle_filter_estimation",
"True",
condition=IfCondition(GetLaunchArgument("use_sim")),
ld.add_action(set_container_name)

container = ComposableNodeContainer(
name=container_name,
namespace="",
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[],
condition=use_composability,
output="screen",
)
ld.add_action(container)

# ---------------
# Launch Includes
# ---------------

IncludeLaunchDescriptionWithCondition(ld, "art_shared_launch", "art_shared")
IncludeLaunchDescriptionWithCondition(ld, "art_perception_launch", "art_perception")
IncludeLaunchDescriptionWithCondition(
ld, "art_localization_launch", "art_localization"
)
IncludeLaunchDescriptionWithCondition(ld, "art_planning_launch", "art_planning")
IncludeLaunchDescriptionWithCondition(ld, "art_control_launch", "art_control")
IncludeLaunchDescriptionWithCondition(ld, "art_sensing_launch", "art_sensing")
IncludeLaunchDescriptionWithCondition(ld, "art_vehicle_launch", "art_vehicle")
IncludeLaunchDescriptionWithCondition(ld, "art_simulation_launch", "art_simulation")

return ld
10 changes: 8 additions & 2 deletions workspace/src/common/launch/art_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
<package format="3">
<name>art_launch</name>
<version>0.1.0</version>
<description>The art_launch package</description>
<description>The art packages that always get launched.</description>

<maintainer email="[email protected]">TODO</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<exec_depend>art_shared_launch</exec_depend>
<exec_depend>art_perception_launch</exec_depend>
<exec_depend>art_localization_launch</exec_depend>
<exec_depend>art_control_launch</exec_depend>
<exec_depend>art_planning_launch</exec_depend>
<exec_depend>art_sensing_launch</exec_depend>
<exec_depend>art_vehicle_launch</exec_depend>
<exec_depend>art_simulation_launch</exec_depend>
<exec_depend>launch_utils</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ def generate_launch_description():
condition=IfCondition(GetLaunchArgument("use_sim")),
)

IncludeLaunchDescriptionWithCondition(ld, "art_shared_launch", "art_shared")
IncludeLaunchDescriptionWithCondition(ld, "art_launch", "art")

return ld
2 changes: 1 addition & 1 deletion workspace/src/common/launch/art_oak_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<exec_depend>art_shared_launch</exec_depend>
<exec_depend>art_launch</exec_depend>
<exec_depend>launch_utils</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
26 changes: 0 additions & 26 deletions workspace/src/common/launch/art_shared_launch/package.xml

This file was deleted.

0 comments on commit 0756bd9

Please sign in to comment.