Skip to content
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

add launch for oak #113

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions workspace/src/common/launch/art_dev_launch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Original file line number Diff line number Diff line change
@@ -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
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>
49 changes: 3 additions & 46 deletions workspace/src/common/launch/art_launch/launch/art.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only comment is adding spaces above and below this haha

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"))
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion workspace/src/common/launch/art_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<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>
Expand Down
15 changes: 15 additions & 0 deletions workspace/src/common/launch/art_oak_launch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions workspace/src/common/launch/art_oak_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_oak_launch</name>
<version>0.1.0</version>
<description>The art_oak_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>
9 changes: 5 additions & 4 deletions workspace/src/common/meta/art_oak_meta/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

<exec_depend>art_common_meta</exec_depend>

<exec_depend>art_launch</exec_depend>
<exec_depend>localization_py</exec_depend>
<exec_depend>path_planning</exec_depend>
<exec_depend>control</exec_depend>
<exec_depend>art_oak_launch</exec_depend>
<exec_depend>cone_detector</exec_depend>
<exec_depend>ground_truth</exec_depend>
<exec_depend>centerline_objects_path_planner</exec_depend>
<exec_depend>pid_lateral_controller</exec_depend>
<exec_depend>chrono_ros_interfaces</exec_depend>
<!-- add sensing -->
</package>