Skip to content

Commit

Permalink
Created core launch; buld_all uses build_core
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymDavid committed Nov 7, 2024
1 parent ef17a5f commit 52acf81
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 5 deletions.
118 changes: 118 additions & 0 deletions launch/crp_launcher/launch/core.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.conditions import LaunchConfigurationEquals
from launch.launch_description_sources import PythonLaunchDescriptionSource, AnyLaunchDescriptionSource
from ament_index_python.packages import get_package_share_directory
from os.path import join


def generate_launch_description():

# ARGS

# sensor abstraction
vehicle_tire_angle_topic_arg = DeclareLaunchArgument(
'vehicle_tire_angle_topic',
default_value='/sensing/vehicle/tire_angle',
description='Length of the scenario in meters')
local_path_length_arg = DeclareLaunchArgument(
'local_path_length',
default_value='70.0',
description='Length of the scenario in meters')

# NODES

sensor_abstraction = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('prcp_sensor_abstraction'),
'launch',
'sensor_abstraction.launch.py')
)
)

environmental_fusion = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('prcp_situation_analysis'),
'launch',
'environmental_fusion.launch.py')
)
)

behavior_planning = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_behavior_planning'),
'launch',
'behavior_planning.launch.py'
)
)
)

motion_planning = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_motion_planning'),
'launch',
'motion_planning.launch.py'
)
)
)

planner_lat_lane_follow_ldm = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_lat_lane_follow_ldm'),
'launch',
'plan_lat_lane_follow_ldm.launch.py'
)
)
)

vehicle_control = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control'),
'launch',
'ctrl_vehicle_control.launch.py')
)
)

vehicle_control_lat = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control_lat_compensatory'),
'launch',
'ctrl_vehicle_control_lat_compensatory.launch.py')
)
)

vehicle_control_long = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control_long'),
'launch',
'ctrl_vehicle_control_long.launch.py')
)
)

return LaunchDescription([
# args
vehicle_tire_angle_topic_arg,
vehicle_tire_angle_topic_arg,
local_path_length_arg,

# nodes
sensor_abstraction,
environmental_fusion,
behavior_planning,
motion_planning,
vehicle_control,
vehicle_control_lat,
vehicle_control_long,

planner_lat_lane_follow_ldm
])
35 changes: 32 additions & 3 deletions scripts/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,36 @@ cd $script_dir
while [ ! -e "src/" ]; do
cd ../
done
echo $(pwd)
echo "Build location: "$(pwd)

rosdep install --from-paths src --ignore-src -r -y
colcon build
# build core
trap 'exit' INT # trap ctrl-c
$script_dir/build_core.sh
trap - INT

# build lexus packages
packages=(
duro_gps_driver
duro_gps_launcher
kvaser_interface
lanelet_handler
lexus_bringup
mcap_rec
mpc_camera_driver
novatel_gps_msgs
novatel_gps_driver
novatel_gps_launcher
pacmod_extender
pacmod_interface
)

packages_string=""
for package in "${packages[@]}"; do
packages_string+="$package "
done

packages_paths=$(colcon list --packages-up-to $packages_string -p)

rosdep install --from-paths $packages_paths --ignore-src -r -y

colcon build --packages-select $packages_string
6 changes: 4 additions & 2 deletions scripts/build_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cd $script_dir
while [ ! -e "src/" ]; do
cd ../
done
echo $(pwd)
echo "Build location: "$(pwd)

rosdep install --from-paths src --ignore-src -r -y
rosdep install --from-paths $script_dir/../crp_APL $script_dir/../crp_CIL --ignore-src -r -y
colcon build --packages-select \
tier4_planning_msgs \
autoware_common_msgs \
Expand All @@ -26,4 +26,6 @@ plan_lon_intelligent_speed_adjust \
plan_motion_planning \
crp_launcher \
ctrl_vehicle_control \
ctrl_vehicle_control_lat_compensatory \
ctrl_vehicle_control_long \
test_node

0 comments on commit 52acf81

Please sign in to comment.