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

update localization launch #2131

Merged
merged 8 commits into from
Aug 2, 2023
Merged
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
12 changes: 0 additions & 12 deletions carma/launch/carma_src.launch
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,6 @@
</include>
</group>

<!-- Localization Stack -->
<group ns="$(env CARMA_LOCZ_NS)">
<include file="$(find carma)/launch/localization.launch">
<arg name="arealist_path" value="$(arg arealist_path)"/>
<arg name="area" value="$(arg area)"/>
<arg name="load_type" value="$(arg load_type)"/>
<arg name="single_pcd_path" value="$(arg single_pcd_path)"/>
<arg name="vehicle_calibration_dir" value="$(arg vehicle_calibration_dir)"/>
<arg name="vector_map_file" value="$(arg vector_map_file)" />
<arg name="simulation_mode" value="$(arg simulation_mode)" />
</include>
</group>

<!-- Environment Perception Stack -->
<group ns="$(env CARMA_ENV_NS)">
Expand Down
7 changes: 6 additions & 1 deletion carma/launch/carma_src.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ def generate_launch_description():
vector_map_file = LaunchConfiguration('vector_map_file')
declare_vector_map_file = DeclareLaunchArgument(name='vector_map_file', default_value='/opt/carma/maps/vector_map.osm')

simulation_mode = LaunchConfiguration('simulation_mode')
declare_simulation_mode = DeclareLaunchArgument(name='simulation_mode', default_value = 'False', description = 'True if CARMA Platform is launched with CARLA Simulator')

# Nodes

transform_group = GroupAction(
Expand Down Expand Up @@ -178,7 +181,8 @@ def generate_launch_description():
'area' : area,
'arealist_path' : arealist_path,
'vector_map_file' : vector_map_file,
'vehicle_calibration_dir': vehicle_calibration_dir
'vehicle_calibration_dir': vehicle_calibration_dir,
'simulation_mode': simulation_mode,
}.items()
)
]
Expand Down Expand Up @@ -271,6 +275,7 @@ def generate_launch_description():
declare_area,
declare_arealist_path,
declare_vector_map_file,
declare_simulation_mode,
drivers_group,
transform_group,
environment_group,
Expand Down
63 changes: 0 additions & 63 deletions carma/launch/localization.launch

This file was deleted.

7 changes: 6 additions & 1 deletion carma/launch/localization.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.actions import GroupAction
from launch_ros.actions import set_remap
from launch.conditions import IfCondition
from launch.substitutions import LaunchConfiguration, PythonExpression


def generate_launch_description():
Expand Down Expand Up @@ -77,6 +79,8 @@ def generate_launch_description():
vector_map_file = LaunchConfiguration('vector_map_file')
declare_map_file = DeclareLaunchArgument(name='vector_map_file', default_value='vector_map.osm', description='Path to the map osm file if using the noupdate load type')

simulation_mode = LaunchConfiguration('simulation_mode')

gnss_to_map_convertor_container = ComposableNodeContainer(
package='carma_ros2_utils',
name='gnss_to_map_convertor_container',
Expand Down Expand Up @@ -235,6 +239,7 @@ def generate_launch_description():
# EKF Localizer
# Comment out to remove and change marked line in waypoint following.launch
ekf_localizer_container = ComposableNodeContainer(
condition=IfCondition(PythonExpression(['not ', simulation_mode])),
package='carma_ros2_utils',
name='ekf_localizer_container',
namespace=GetCurrentNamespace(),
Expand Down Expand Up @@ -373,4 +378,4 @@ def generate_launch_description():
ndt_matching_container,
ekf_localizer_container,
subsystem_controller
])
])