-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create module orchestrator files (#117)
- Loading branch information
1 parent
50dca0f
commit bedccad
Showing
4 changed files
with
179 additions
and
141 deletions.
There are no files selected for viewing
82 changes: 6 additions & 76 deletions
82
workspace/src/common/launch/art_control_launch/launch/art_control.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 |
---|---|---|
@@ -1,89 +1,19 @@ | ||
# | ||
# 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_ros.actions import Node | ||
|
||
# internal imports | ||
from launch_utils import AddLaunchArgument, GetLaunchArgument | ||
from launch_utils import IncludeLaunchDescriptionWithCondition | ||
|
||
|
||
def generate_launch_description(): | ||
ld = LaunchDescription() | ||
|
||
# ---------------- | ||
# Launch Arguments | ||
# ---------------- | ||
|
||
AddLaunchArgument(ld, "art_control/input/path", "/path_planning/path") | ||
AddLaunchArgument(ld, "art_control/input/vehicle_state", "/vehicle/state") | ||
AddLaunchArgument( | ||
ld, "art_control/output/vehicle_inputs", "/control/vehicle_inputs" | ||
) | ||
|
||
AddLaunchArgument(ld, "control_mode", "PID") | ||
AddLaunchArgument(ld, "control_file", "data/smallest_radius_right.csv") | ||
AddLaunchArgument(ld, "steering_gain", "1.6") | ||
AddLaunchArgument(ld, "throttle_gain", "0.08") | ||
AddLaunchArgument(ld, "use_sim_time", "False") | ||
|
||
# ----- | ||
# Nodes | ||
# ----- | ||
# --------------- | ||
# Launch Includes | ||
# --------------- | ||
|
||
node = Node( | ||
package="pid_lateral_controller", | ||
executable="pid", | ||
name="pid", | ||
remappings=[ | ||
("~/input/path", GetLaunchArgument("art_control/input/path")), | ||
( | ||
"~/input/vehicle_state", | ||
GetLaunchArgument("art_control/input/vehicle_state"), | ||
), | ||
( | ||
"~/output/vehicle_inputs", | ||
GetLaunchArgument("art_control/output/vehicle_inputs"), | ||
), | ||
], | ||
parameters=[ | ||
{"input": GetLaunchArgument("art_control/input/path")}, | ||
{"control_mode": GetLaunchArgument("control_mode")}, | ||
{"control_file": GetLaunchArgument("control_file")}, | ||
{"steering_gain": GetLaunchArgument("steering_gain")}, | ||
{"throttle_gain": GetLaunchArgument("throttle_gain")}, | ||
{"use_sim_time": GetLaunchArgument("use_sim_time")}, | ||
], | ||
IncludeLaunchDescriptionWithCondition( | ||
ld, "art_control_launch", "pid_lateral_controller" | ||
) | ||
ld.add_action(node) | ||
|
||
return ld |
89 changes: 89 additions & 0 deletions
89
workspace/src/common/launch/art_control_launch/launch/pid_lateral_controller.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,89 @@ | ||
# | ||
# 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_ros.actions import Node | ||
|
||
# internal imports | ||
from launch_utils import AddLaunchArgument, GetLaunchArgument | ||
|
||
|
||
def generate_launch_description(): | ||
ld = LaunchDescription() | ||
|
||
# ---------------- | ||
# Launch Arguments | ||
# ---------------- | ||
|
||
AddLaunchArgument(ld, "art_control/input/path", "/path_planning/path") | ||
AddLaunchArgument(ld, "art_control/input/vehicle_state", "/vehicle/state") | ||
AddLaunchArgument( | ||
ld, "art_control/output/vehicle_inputs", "/control/vehicle_inputs" | ||
) | ||
|
||
AddLaunchArgument(ld, "control_mode", "PID") | ||
AddLaunchArgument(ld, "control_file", "data/smallest_radius_right.csv") | ||
AddLaunchArgument(ld, "steering_gain", "1.6") | ||
AddLaunchArgument(ld, "throttle_gain", "0.08") | ||
AddLaunchArgument(ld, "use_sim_time", "False") | ||
|
||
# ----- | ||
# Nodes | ||
# ----- | ||
|
||
node = Node( | ||
package="pid_lateral_controller", | ||
executable="pid", | ||
name="pid", | ||
remappings=[ | ||
("~/input/path", GetLaunchArgument("art_control/input/path")), | ||
( | ||
"~/input/vehicle_state", | ||
GetLaunchArgument("art_control/input/vehicle_state"), | ||
), | ||
( | ||
"~/output/vehicle_inputs", | ||
GetLaunchArgument("art_control/output/vehicle_inputs"), | ||
), | ||
], | ||
parameters=[ | ||
{"input": GetLaunchArgument("art_control/input/path")}, | ||
{"control_mode": GetLaunchArgument("control_mode")}, | ||
{"control_file": GetLaunchArgument("control_file")}, | ||
{"steering_gain": GetLaunchArgument("steering_gain")}, | ||
{"throttle_gain": GetLaunchArgument("throttle_gain")}, | ||
{"use_sim_time": GetLaunchArgument("use_sim_time")}, | ||
], | ||
) | ||
ld.add_action(node) | ||
|
||
return ld |
71 changes: 6 additions & 65 deletions
71
workspace/src/common/launch/art_planning_launch/launch/art_planning.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 |
---|---|---|
@@ -1,78 +1,19 @@ | ||
# | ||
# 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_ros.actions import Node | ||
|
||
# internal imports | ||
from launch_utils import AddLaunchArgument, GetLaunchArgument | ||
from launch_utils import IncludeLaunchDescriptionWithCondition | ||
|
||
|
||
def generate_launch_description(): | ||
ld = LaunchDescription() | ||
|
||
# ---------------- | ||
# Launch Arguments | ||
# ---------------- | ||
|
||
AddLaunchArgument(ld, "art_planning/input/vehicle_state", "/vehicle/state") | ||
AddLaunchArgument(ld, "art_planning/input/objects", "/perception/objects") | ||
AddLaunchArgument(ld, "art_planning/output/path", "/path_planning/path") | ||
|
||
AddLaunchArgument(ld, "vis", "False") | ||
AddLaunchArgument(ld, "lookahead", ".75") | ||
|
||
# ----- | ||
# Nodes | ||
# ----- | ||
# --------------- | ||
# Launch Includes | ||
# --------------- | ||
|
||
node = Node( | ||
package="centerline_objects_path_planner", | ||
executable="centerline_objects_path_planner", | ||
name="centerline_objects_path_planner", | ||
remappings=[ | ||
("~/input/objects", GetLaunchArgument("art_planning/input/objects")), | ||
( | ||
"~/input/vehicle_state", | ||
GetLaunchArgument("art_planning/input/vehicle_state"), | ||
), | ||
("~/output/path", GetLaunchArgument("art_planning/output/path")), | ||
], | ||
parameters=[ | ||
{"vis": GetLaunchArgument("vis")}, | ||
{"lookahead": GetLaunchArgument("lookahead")}, | ||
{"use_sim_time": GetLaunchArgument("use_sim_time")}, | ||
], | ||
IncludeLaunchDescriptionWithCondition( | ||
ld, "art_planning_launch", "centerline_path_planner" | ||
) | ||
ld.add_action(node) | ||
|
||
return ld |
78 changes: 78 additions & 0 deletions
78
workspace/src/common/launch/art_planning_launch/launch/centerline_path_planner.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,78 @@ | ||
# | ||
# 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_ros.actions import Node | ||
|
||
# internal imports | ||
from launch_utils import AddLaunchArgument, GetLaunchArgument | ||
|
||
|
||
def generate_launch_description(): | ||
ld = LaunchDescription() | ||
|
||
# ---------------- | ||
# Launch Arguments | ||
# ---------------- | ||
|
||
AddLaunchArgument(ld, "art_planning/input/vehicle_state", "/vehicle/state") | ||
AddLaunchArgument(ld, "art_planning/input/objects", "/perception/objects") | ||
AddLaunchArgument(ld, "art_planning/output/path", "/path_planning/path") | ||
|
||
AddLaunchArgument(ld, "vis", "False") | ||
AddLaunchArgument(ld, "lookahead", ".75") | ||
|
||
# ----- | ||
# Nodes | ||
# ----- | ||
|
||
node = Node( | ||
package="centerline_objects_path_planner", | ||
executable="centerline_objects_path_planner", | ||
name="centerline_objects_path_planner", | ||
remappings=[ | ||
("~/input/objects", GetLaunchArgument("art_planning/input/objects")), | ||
( | ||
"~/input/vehicle_state", | ||
GetLaunchArgument("art_planning/input/vehicle_state"), | ||
), | ||
("~/output/path", GetLaunchArgument("art_planning/output/path")), | ||
], | ||
parameters=[ | ||
{"vis": GetLaunchArgument("vis")}, | ||
{"lookahead": GetLaunchArgument("lookahead")}, | ||
{"use_sim_time": GetLaunchArgument("use_sim_time")}, | ||
], | ||
) | ||
ld.add_action(node) | ||
|
||
return ld |