diff --git a/workspace/src/common/launch/art_dev_launch/CMakeLists.txt b/workspace/src/common/launch/art_dev_launch/CMakeLists.txt new file mode 100644 index 00000000..cd93457b --- /dev/null +++ b/workspace/src/common/launch/art_dev_launch/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.5) +project(art_dev_launch) + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package( + INSTALL_TO_SHARE + launch +) diff --git a/workspace/src/common/launch/art_dev_launch/launch/art_dev.launch.py b/workspace/src/common/launch/art_dev_launch/launch/art_dev.launch.py new file mode 100644 index 00000000..4292b39b --- /dev/null +++ b/workspace/src/common/launch/art_dev_launch/launch/art_dev.launch.py @@ -0,0 +1,93 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2022 University of Wisconsin - Madison +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.# + +# ros imports +from launch import LaunchDescription +from launch.actions import SetLaunchConfiguration +from launch.conditions import IfCondition, UnlessCondition +from launch_ros.actions import ComposableNodeContainer + +# internal imports +from launch_utils import ( + IncludeLaunchDescriptionWithCondition, + GetLaunchArgument, + AddLaunchArgument, + SetLaunchArgument, +) + + +def generate_launch_description(): + ld = LaunchDescription() + + # ---------------- + # Launch Arguments + # ---------------- + + AddLaunchArgument(ld, "use_sim", "False") + AddLaunchArgument(ld, "use_sim_time", "False") + SetLaunchArgument( + ld, "use_sim_time", "True", condition=IfCondition(GetLaunchArgument("use_sim")) + ) + + 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")), + ) + SetLaunchArgument( + ld, + "disable_particle_filter_estimation", + "True", + condition=IfCondition(GetLaunchArgument("use_sim")), + ) + + IncludeLaunchDescriptionWithCondition(ld, "art_launch", "art") + + return ld diff --git a/workspace/src/common/launch/art_dev_launch/package.xml b/workspace/src/common/launch/art_dev_launch/package.xml new file mode 100644 index 00000000..37d2891e --- /dev/null +++ b/workspace/src/common/launch/art_dev_launch/package.xml @@ -0,0 +1,20 @@ + + + art_launch + 0.1.0 + The art_dev_launch package + + TODO + Apache License 2.0 + + ament_cmake_auto + + art_launch + launch_utils + + ament_lint_auto + + + ament_cmake + + diff --git a/workspace/src/common/launch/art_launch/launch/art.launch.py b/workspace/src/common/launch/art_launch/launch/art.launch.py index 609b5ec4..9c03125f 100644 --- a/workspace/src/common/launch/art_launch/launch/art.launch.py +++ b/workspace/src/common/launch/art_launch/launch/art.launch.py @@ -47,54 +47,11 @@ def generate_launch_description(): ld = LaunchDescription() - # ---------------- - # Launch Arguments - # ---------------- - - AddLaunchArgument(ld, "use_sim", "False") - AddLaunchArgument(ld, "use_sim_time", "False") - SetLaunchArgument( - ld, "use_sim_time", "True", condition=IfCondition(GetLaunchArgument("use_sim")) - ) - - AddLaunchArgument(ld, "container", "") - container_name = AddLaunchArgument(ld, "container_name", "art_container") - - 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")), - ) - SetLaunchArgument( - ld, - "disable_particle_filter_estimation", - "True", - condition=IfCondition(GetLaunchArgument("use_sim")), - ) - # ------------- # 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 use_composability = IfCondition(AddLaunchArgument(ld, "use_composability", "False")) @@ -129,6 +86,6 @@ def generate_launch_description(): 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") + IncludeLaunchDescriptionWithCondition(ld, "art_simulation_launch", "art_simulation") return ld diff --git a/workspace/src/common/launch/art_launch/package.xml b/workspace/src/common/launch/art_launch/package.xml index 2daa4f2b..02157fe1 100644 --- a/workspace/src/common/launch/art_launch/package.xml +++ b/workspace/src/common/launch/art_launch/package.xml @@ -2,7 +2,7 @@ art_launch 0.1.0 - The art_launch package + The art packages that always get launched. TODO Apache License 2.0 diff --git a/workspace/src/common/launch/art_oak_launch/CMakeLists.txt b/workspace/src/common/launch/art_oak_launch/CMakeLists.txt new file mode 100644 index 00000000..d792b5a5 --- /dev/null +++ b/workspace/src/common/launch/art_oak_launch/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.5) +project(art_oak_launch) + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package( + INSTALL_TO_SHARE + launch +) diff --git a/workspace/src/common/launch/art_oak_launch/launch/art_oak.launch.py b/workspace/src/common/launch/art_oak_launch/launch/art_oak.launch.py new file mode 100644 index 00000000..02e25201 --- /dev/null +++ b/workspace/src/common/launch/art_oak_launch/launch/art_oak.launch.py @@ -0,0 +1,94 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2022 University of Wisconsin - Madison +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.# + +# ros imports +from launch import LaunchDescription +from launch.actions import SetLaunchConfiguration +from launch.conditions import IfCondition, UnlessCondition +from launch_ros.actions import ComposableNodeContainer + +# internal imports +from launch_utils import ( + IncludeLaunchDescriptionWithCondition, + GetLaunchArgument, + AddLaunchArgument, + SetLaunchArgument, +) + + +def generate_launch_description(): + ld = LaunchDescription() + + # ---------------- + # Launch Arguments + # ---------------- + + AddLaunchArgument(ld, "use_sim", "False") + AddLaunchArgument(ld, "use_sim_time", "False") + AddLaunchArgument(ld, "art_oak", "True") + SetLaunchArgument( + ld, "use_sim_time", "True", condition=IfCondition(GetLaunchArgument("use_sim")) + ) + + 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")), + ) + SetLaunchArgument( + ld, + "disable_particle_filter_estimation", + "True", + condition=IfCondition(GetLaunchArgument("use_sim")), + ) + + IncludeLaunchDescriptionWithCondition(ld, "art_launch", "art") + + return ld diff --git a/workspace/src/common/launch/art_oak_launch/package.xml b/workspace/src/common/launch/art_oak_launch/package.xml new file mode 100644 index 00000000..54488a2a --- /dev/null +++ b/workspace/src/common/launch/art_oak_launch/package.xml @@ -0,0 +1,20 @@ + + + art_oak_launch + 0.1.0 + The art_oak_launch package + + TODO + Apache License 2.0 + + ament_cmake_auto + + art_launch + launch_utils + + ament_lint_auto + + + ament_cmake + + diff --git a/workspace/src/common/meta/art_oak_meta/package.xml b/workspace/src/common/meta/art_oak_meta/package.xml index d8306c51..8fb2898e 100644 --- a/workspace/src/common/meta/art_oak_meta/package.xml +++ b/workspace/src/common/meta/art_oak_meta/package.xml @@ -9,10 +9,11 @@ art_common_meta - art_launch - localization_py - path_planning - control + art_oak_launch + cone_detector + ground_truth + centerline_objects_path_planner + pid_lateral_controller chrono_ros_interfaces