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

feat(pose_estimator_arbiter): add pose_estimator_arbiter with simple switching rule #6144

Merged
Show file tree
Hide file tree
Changes from 125 commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
4c978aa
implement pose_estimator_manager pkg
KYabuuchi Jun 28, 2023
11e37c6
tmp
KYabuuchi Jun 29, 2023
efc9474
swap ndt & yabloc
KYabuuchi Jun 29, 2023
1d39684
add suspension service in yabloc particle filter
KYabuuchi Jun 30, 2023
c41f702
add pluginlib for switching rule
KYabuuchi Jul 3, 2023
4b6c6fe
implement switch rule using pluginlib
KYabuuchi Jul 3, 2023
a2f0c23
WIP: implement simple_switch_rule
KYabuuchi Jul 3, 2023
f42d9de
implement pcd_occupancy_rule based switcher
KYabuuchi Jul 4, 2023
d9d5705
resolve conflicts occured by rebase
KYabuuchi Jul 20, 2023
8ed08c2
sub_manager_node is not necessary
KYabuuchi Jul 24, 2023
77c4298
add ndt_yabloc_eagleye
KYabuuchi Jul 24, 2023
3935cde
fix bug
KYabuuchi Jul 24, 2023
48a6472
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Jul 26, 2023
c66bee5
intuitive_multi_pose_estimator_launch
KYabuuchi Jul 26, 2023
b25f736
yabloc_pf shoulbe be activated at the first
KYabuuchi Jul 26, 2023
b8b0328
merge swith_rule_plugin as inheritance
KYabuuchi Jul 27, 2023
12852a0
fix launch bug
KYabuuchi Jul 27, 2023
76897fc
add eagleye_area rule
KYabuuchi Jul 28, 2023
0606dfc
implement strict switching rule
KYabuuchi Jul 31, 2023
4b45247
refine message
KYabuuchi Jul 31, 2023
d08f6d1
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Jul 31, 2023
8bcc525
fix merge conflict
KYabuuchi Jul 31, 2023
37f4ba0
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Aug 24, 2023
d4b86af
use hysteresis threshold for pcd occupancy criteria
KYabuuchi Aug 31, 2023
1d20a57
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Sep 19, 2023
794cd27
fix merge conflict
KYabuuchi Sep 19, 2023
0e34c00
add gtest
KYabuuchi Sep 20, 2023
281e4be
add component test
KYabuuchi Sep 21, 2023
211ff95
add artag submanager
KYabuuchi Sep 29, 2023
3a03dd8
add ar_tag_position to get ar-tag position
KYabuuchi Sep 29, 2023
ff7abe5
check distance to nearest ar marker
KYabuuchi Oct 1, 2023
0c013bf
switch ARTAG localizer if ar marker locates around ego
KYabuuchi Oct 1, 2023
669fd85
improve ar_tag_position.[hc]pp
KYabuuchi Oct 4, 2023
c956192
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Oct 4, 2023
b3c93ca
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Oct 19, 2023
f0ac153
split update() from map_base_rule.cpp
KYabuuchi Oct 19, 2023
06fd9fd
apply pre-commit
KYabuuchi Oct 19, 2023
ea6941f
add license description
KYabuuchi Oct 19, 2023
61b5188
update include guard
KYabuuchi Oct 19, 2023
5c004ce
reflected all pre-commit's points
KYabuuchi Oct 19, 2023
cf5559c
use magic_enum
KYabuuchi Oct 19, 2023
ee58c97
add pcd_occupancy helper
KYabuuchi Oct 23, 2023
2ec7aeb
change directory structure
KYabuuchi Oct 23, 2023
474289e
change namespace
KYabuuchi Oct 23, 2023
285435d
remap some topics
KYabuuchi Oct 23, 2023
7648540
update test
KYabuuchi Oct 23, 2023
df56886
add shared_data to share data
KYabuuchi Oct 24, 2023
f4aee41
remove obsolete comments
KYabuuchi Oct 24, 2023
e215e3b
share subscribed data by SharedData
KYabuuchi Oct 24, 2023
b7d2a98
remove obsolete comments and fix to pass test.py
KYabuuchi Oct 24, 2023
f486d72
rename SharedData
KYabuuchi Oct 24, 2023
9599b3f
stream debug_msg as is
KYabuuchi Oct 24, 2023
e80ebaf
add README.md
KYabuuchi Oct 25, 2023
7d6ff14
Update README.md
KYabuuchi Oct 25, 2023
1cd7829
fix eagleye bug
KYabuuchi Oct 26, 2023
a7195c3
update README
KYabuuchi Oct 31, 2023
9a09653
wip
KYabuuchi Nov 6, 2023
5804fc2
update README.md
KYabuuchi Nov 7, 2023
6ea7fac
update README
KYabuuchi Nov 7, 2023
c822bdc
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Nov 15, 2023
279eaf4
use landmark_manager
KYabuuchi Nov 15, 2023
e9806a9
add glog & fix rule_helper bug
KYabuuchi Nov 15, 2023
d10d5ef
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Nov 27, 2023
46332fb
publish empty diagnostics
KYabuuchi Nov 29, 2023
22536af
fix artag arbitorator
KYabuuchi Dec 1, 2023
b1a223b
implement callback_involving_variable
KYabuuchi Dec 1, 2023
9d92d78
rename invokingVariable
KYabuuchi Dec 1, 2023
e3610ad
clarify log level
KYabuuchi Dec 7, 2023
8a4e58b
update diagnostics
KYabuuchi Dec 7, 2023
161369f
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Dec 7, 2023
87e3863
adope new landmark_manager
KYabuuchi Dec 7, 2023
a8f92fa
rename manager arbiter
KYabuuchi Dec 12, 2023
698740c
style(pre-commit): autofix
pre-commit-ci[bot] Dec 12, 2023
0badabe
fix obsolete change
KYabuuchi Dec 12, 2023
439a37c
change yabloc relayed input topic
KYabuuchi Dec 12, 2023
dbf771b
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Jan 9, 2024
e69a2f5
Merge remote-tracking branch 'awf/main' into feat/multi_localizer
KYabuuchi Jan 9, 2024
a63e0bf
resolve merge conflict
KYabuuchi Jan 9, 2024
0fde6fa
adopt ar_tag_position for new ar tag map specification
KYabuuchi Jan 10, 2024
82c8ef5
rename sub_arbitr to stopper
KYabuuchi Jan 10, 2024
2760fc8
apply pre-commit
KYabuuchi Jan 10, 2024
66a6396
add timeout for async parameter client
KYabuuchi Jan 10, 2024
c0e476b
style(pre-commit): autofix
pre-commit-ci[bot] Jan 10, 2024
a628d80
fix typo
KYabuuchi Jan 10, 2024
53be012
refactor shared_data
KYabuuchi Jan 10, 2024
9da45d0
rename yabloc_suspend_service
KYabuuchi Jan 11, 2024
4d00a76
improve debug log
KYabuuchi Jan 11, 2024
3ee6e1c
fix integration test
KYabuuchi Jan 11, 2024
9ca2919
style(pre-commit): autofix
pre-commit-ci[bot] Jan 11, 2024
693ca9a
remove obsolete notation
KYabuuchi Jan 12, 2024
1573f42
fix ar_tag_based_localizer.launch.xml
KYabuuchi Jan 12, 2024
86cd6c7
again fix ar_tag_based_localizer.launch.xml
KYabuuchi Jan 12, 2024
91e13ac
style(pre-commit): autofix
pre-commit-ci[bot] Jan 12, 2024
ff3e3c7
add sample data url
KYabuuchi Jan 12, 2024
e27e700
Merge branch 'main' into feat/multi_localizer
KYabuuchi Jan 12, 2024
2d66593
(review reflect) refactor launch
KYabuuchi Jan 15, 2024
f094380
(review reflect) refactor launch about gnss_enabled
KYabuuchi Jan 15, 2024
1a0a257
(review reflect) organize type alias accessibility
KYabuuchi Jan 15, 2024
1bd74f7
(review reflect) rename PoseEstimatorName to PoseEstimatorType
KYabuuchi Jan 15, 2024
aae8e8e
(review reflect) fix typo
KYabuuchi Jan 15, 2024
06db5db
style(pre-commit): autofix
pre-commit-ci[bot] Jan 15, 2024
7823a00
fix pedantic warning of PCL
KYabuuchi Jan 15, 2024
80b6c20
(review reflect) improve diag & suppress warning
KYabuuchi Jan 15, 2024
f358d0d
(review reflect) create sub only when the corresponding estimator is …
KYabuuchi Jan 16, 2024
337dbe0
rename eagleye_area to pose_estimator_area
KYabuuchi Jan 16, 2024
d601841
vectormap based rule works well
KYabuuchi Jan 16, 2024
54f18cb
move old rules to example_rule/
KYabuuchi Jan 16, 2024
fe99950
update README
KYabuuchi Jan 16, 2024
3fde211
improve some features
KYabuuchi Jan 16, 2024
d8d28e1
style(pre-commit): autofix
pre-commit-ci[bot] Jan 16, 2024
60351b0
Merge remote-tracking branch 'awf/main' into feat/vector_map_rule
KYabuuchi Jan 17, 2024
d051a1c
style(pre-commit): autofix
pre-commit-ci[bot] Jan 17, 2024
694f75a
move some rules into example_rule & add new simple rule
KYabuuchi Jan 22, 2024
f578f50
apply pre-commit & update README
KYabuuchi Jan 22, 2024
2253be8
split CMake for example_rule
KYabuuchi Jan 22, 2024
49babb7
remove ar_tag_position & simplify example switching rule
KYabuuchi Jan 22, 2024
c5b601c
add vector_map_based_rule test
KYabuuchi Jan 22, 2024
9b04d8f
add pcd_map_based_rule test
KYabuuchi Jan 22, 2024
a33fc66
improve README
KYabuuchi Jan 22, 2024
2a9c415
fix integration test.py
KYabuuchi Jan 22, 2024
8a6444d
add test
KYabuuchi Jan 23, 2024
c5bc4af
refactor & update README
KYabuuchi Jan 23, 2024
45c4de9
replace obsolete video
KYabuuchi Jan 23, 2024
758d110
Merge remote-tracking branch 'awf/main' into feat/pose_estimator_arbi…
KYabuuchi Jan 23, 2024
ee67716
fix typo
KYabuuchi Jan 23, 2024
79ccf70
Update README.md
KYabuuchi Jan 24, 2024
c97b13b
use structures bindings
KYabuuchi Jan 24, 2024
3f5e108
add many comments
KYabuuchi Jan 24, 2024
ebdb7b6
remove obsolete include & alias
KYabuuchi Jan 24, 2024
722689a
Merge branch 'main' into feat/pose_estimator_arbiter_with_only_simple…
KYabuuchi Jan 31, 2024
87722df
fix miss of eagleye output relay
KYabuuchi Feb 1, 2024
9eeb807
fix 404 URL
KYabuuchi Feb 1, 2024
f377086
Merge branch 'main' into feat/pose_estimator_arbiter_with_only_simple…
KYabuuchi Feb 5, 2024
17cc07b
remove obsolete args
KYabuuchi Feb 5, 2024
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<launch>
<!-- Parameter files -->
<arg name="pose_source"/>
<arg name="pose_source" description="A string consisting of ndt, yabloc, artag and eagleye joined by underscores no matter the order. e.g. ndt_yabloc"/>
<arg name="twist_source"/>
<arg name="system_run_mode"/>

<!-- Parameter files -->
<arg name="crop_box_filter_measurement_range_param_path"/>
<arg name="voxel_grid_downsample_filter_param_path"/>
<arg name="random_downsample_filter_param_path"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0"?>
<launch>
<group>
<arg name="input_image"/>

<include file="$(find-pkg-share ar_tag_based_localizer)/launch/ar_tag_based_localizer.launch.xml">
<arg name="input_lanelet2_map" value="/map/vector_map"/>
<arg name="input_image" value="/sensing/camera/traffic_light/image_raw"/>
<arg name="input_image" value="$(var input_image)"/>
<arg name="input_camera_info" value="/sensing/camera/traffic_light/camera_info"/>
<arg name="input_ekf_pose" value="/localization/pose_twist_fusion_filter/biased_pose_with_covariance"/>
<arg name="output_pose_with_covariance" value="/localization/pose_estimator/pose_with_covariance"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,152 +1,116 @@
<?xml version="1.0"?>
<launch>
<!-- only when running with a real vehicle, the pose_initializer judges the stop -->
<let name="stop_check_enabled" if="$(eval &quot;'$(var system_run_mode)'=='online'&quot;)" value="true"/>
<let name="stop_check_enabled" if="$(eval &quot;'$(var system_run_mode)'=='logging_simulation'&quot;)" value="false"/>

<!-- When gnss_enabled is false, automatic_pose_initializer will not run, only manual initial position estimation is available. -->
<arg name="gnss_enabled" default="true" description="gnss availability for initial position estimation"/>

<!-- split string with underscores -->
<let name="available_args" value="[\'ndt\',\'yabloc\',\'eagleye\',\'artag\']"/>
<let name="split_function" value="list(set('$(var pose_source)'.split('_')).intersection($(var available_args)))"/>
<let name="pose_sources" value="$(eval $(var split_function))"/>
<let name="multi_localizer_mode" value="$(eval &quot;len($(var pose_sources))> 1&quot;)"/>

<!-- organizes flags for which nodes to activate -->
<let name="use_ndt_pose" value="$(eval &quot;'ndt' in $(var pose_sources)&quot;)"/>
<let name="use_yabloc_pose" value="$(eval &quot;'yabloc' in $(var pose_sources)&quot;)"/>
<let name="use_artag_pose" value="$(eval &quot;'artag' in $(var pose_sources)&quot;)"/>
<let name="use_eagleye_pose" value="$(eval &quot;'eagleye' in $(var pose_sources)&quot;)"/>
<let name="use_eagleye_twist" value="$(eval &quot;'eagleye' == '$(var twist_source)'&quot;)"/>
<let name="use_gyro_odom_twist" value="$(eval &quot;'gyro_odom' == '$(var twist_source)'&quot;)"/>

<!-- NDT Scan Matcher Launch (as pose estimator) -->
<group if="$(eval &quot;'$(var pose_source)'=='ndt'&quot;)">
<group>
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/ndt_scan_matcher.launch.xml"/>
</group>
<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="ndt_enabled" value="true"/>
<arg name="gnss_enabled" value="true"/>
<arg name="ekf_enabled" value="true"/>
<arg name="yabloc_enabled" value="false"/>
<arg name="stop_check_enabled" value="$(var stop_check_enabled)"/>
<arg name="config_file" value="$(var pose_initializer_param_path)"/>
<arg name="sub_gnss_pose_cov" value="/sensing/gnss/pose_with_covariance"/>
</include>
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py">
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>
</include>
</group>
<group if="$(var use_ndt_pose)">
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/ndt_scan_matcher.launch.xml"/>
</group>

<!-- YabLoc Launch (as pose estimator) -->
<group if="$(eval &quot;'$(var pose_source)'=='yabloc'&quot;)">
<group>
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/yabloc.launch.xml"/>
</group>
<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="ndt_enabled" value="false"/>
<arg name="gnss_enabled" value="true"/>
<arg name="ekf_enabled" value="true"/>
<arg name="yabloc_enabled" value="true"/>
<arg name="stop_check_enabled" value="$(var stop_check_enabled)"/>
<arg name="config_file" value="$(var pose_initializer_param_path)"/>
<arg name="sub_gnss_pose_cov" value="/sensing/gnss/pose_with_covariance"/>
</include>
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
</group>
<group if="$(var use_yabloc_pose)">
<push-ros-namespace namespace="pose_estimator"/>
<let name="yabloc_src_image" value="/sensing/camera/traffic_light/image_raw" unless="$(var multi_localizer_mode)"/>
<let name="yabloc_src_image" value="/sensing/camera/traffic_light/image_raw/yabloc_relay" if="$(var multi_localizer_mode)"/>

<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/yabloc.launch.xml">
<arg name="src_image" value="$(var yabloc_src_image)"/>
</include>
</group>

<!-- Gyro Odometer Launch (as pose estimator) -->
<group if="$(eval &quot;'$(var twist_source)'=='gyro_odom'&quot;)">
<!-- Gyro Odometer Launch (as twist estimator) -->
<group if="$(var use_gyro_odom_twist)">
<push-ros-namespace namespace="twist_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/gyro_odometer.launch.xml"/>
</group>

<!-- Eagleye Launch (as pose & twist estimator) -->
<group if="$(eval &quot;'$(var pose_source)'=='eagleye' and '$(var twist_source)'=='eagleye'&quot;)">
<group>
<push-ros-namespace namespace="pose_twist_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/eagleye/eagleye_rt.launch.xml">
<arg name="output_twist_with_cov_name" value="/localization/twist_estimator/twist_with_covariance"/>
<arg name="output_pose_with_cov_name" value="/localization/pose_estimator/pose_with_covariance"/>
<arg name="use_eagleye_pose" value="true"/>
<arg name="use_eagleye_twist" value="true"/>
</include>
</group>
<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="ndt_enabled" value="false"/>
<arg name="gnss_enabled" value="true"/>
<arg name="ekf_enabled" value="true"/>
<arg name="yabloc_enabled" value="false"/>
<arg name="stop_check_enabled" value="$(var stop_check_enabled)"/>
<arg name="config_file" value="$(var pose_initializer_param_path)"/>
<arg name="sub_gnss_pose_cov" value="/localization/pose_estimator/pose_with_covariance"/>
</include>
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
</group>
</group>
<!-- Eagleye Launch -->
<group if="$(eval &quot;$(var use_eagleye_pose) or $(var use_eagleye_twist)&quot;)">
<let name="eagleye_name_space" value="pose_twist_estimator"/>
<let name="eagleye_name_space" value="twist_estimator" unless="$(var use_eagleye_pose)"/>
<let name="eagleye_name_space" value="pose_estimator" unless="$(var use_eagleye_twist)"/>
<let name="output_pose_with_cov_name" value="/localization/pose_estimator/pose_with_covariance" unless="$(var multi_localizer_mode)"/>
<let name="output_pose_with_cov_name" value="/localization/eagleye/pose_with_covariance/to_relay" if="$(var multi_localizer_mode)"/>

<!-- Eagleye Launch (as pose estimator) -->
<group if="$(eval &quot;'$(var pose_source)'=='eagleye' and '$(var twist_source)'!='eagleye'&quot;)">
<group>
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/eagleye/eagleye_rt.launch.xml">
<arg name="output_pose_with_cov_name" value="/localization/pose_estimator/pose_with_covariance"/>
<arg name="use_eagleye_pose" value="true"/>
<arg name="use_eagleye_twist" value="false"/>
</include>
</group>
<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="ndt_enabled" value="false"/>
<arg name="gnss_enabled" value="true"/>
<arg name="ekf_enabled" value="true"/>
<arg name="yabloc_enabled" value="false"/>
<arg name="stop_check_enabled" value="$(var stop_check_enabled)"/>
<arg name="config_file" value="$(var pose_initializer_param_path)"/>
<arg name="sub_gnss_pose_cov" value="/localization/pose_estimator/pose_with_covariance"/>
</include>
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
</group>
</group>

<!-- Eagleye Launch (as twist estimator) -->
<group if="$(eval &quot;'$(var pose_source)'!='eagleye' and '$(var twist_source)'=='eagleye'&quot;)">
<push-ros-namespace namespace="twist_estimator"/>
<push-ros-namespace namespace="$(var eagleye_name_space)"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/eagleye/eagleye_rt.launch.xml">
<arg name="output_twist_with_cov_name" value="/localization/twist_estimator/twist_with_covariance"/>
<arg name="use_eagleye_pose" value="false"/>
<arg name="use_eagleye_twist" value="true"/>
<arg name="output_pose_with_cov_name" value="$(var output_pose_with_cov_name)"/>
<arg name="use_eagleye_pose" value="$(var use_eagleye_pose)"/>
<arg name="use_eagleye_twist" value="$(var use_eagleye_twist)"/>
</include>
</group>

<!-- AR Tag Based Localizer (as pose estimator) -->
<group if="$(eval &quot;'$(var pose_source)'=='artag'&quot;)">
<group>
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/ar_tag_based_localizer.launch.xml"/>
<group if="$(var use_artag_pose)">
<push-ros-namespace namespace="pose_estimator"/>
<let name="artag_input_image" value="/sensing/camera/traffic_light/image_raw" unless="$(var multi_localizer_mode)"/>
<let name="artag_input_image" value="/sensing/camera/traffic_light/image_raw/artag_relay" if="$(var multi_localizer_mode)"/>

<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/ar_tag_based_localizer.launch.xml">
<arg name="input_image" value="$(var artag_input_image)"/>
</include>
</group>

<!-- Pose Estimator Arbiter Launch -->
<group if="$(var multi_localizer_mode)">
<include file="$(find-pkg-share pose_estimator_arbiter)/launch/pose_estimator_arbiter.launch.xml">
<arg name="pose_sources" value="$(var pose_sources)"/>
<arg name="input_pointcloud" value="$(var input_pointcloud)"/>
</include>
</group>

<!-- Util Launch -->
<group>
<push-ros-namespace namespace="util"/>

<!-- pose_initializer -->
<let name="sub_gnss_pose_cov" value="/sensing/gnss/pose_with_covariance"/>
<group if="$(var use_eagleye_pose)" scoped="false">
<let name="sub_gnss_pose_cov" value="/localization/pose_estimator/pose_with_covariance" unless="$(var multi_localizer_mode)"/>
</group>

<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="ndt_enabled" value="false"/>
<arg name="gnss_enabled" value="false"/>
<arg name="ekf_enabled" value="true"/>
<arg name="yabloc_enabled" value="false"/>
<arg name="stop_check_enabled" value="$(var stop_check_enabled)"/>
<arg name="config_file" value="$(var pose_initializer_param_path)"/>
<arg name="sub_gnss_pose_cov" value="/sensing/gnss/pose_with_covariance"/>
</include>
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py">
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>
</include>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="ndt_enabled" value="$(var use_ndt_pose)"/>
<arg name="yabloc_enabled" value="$(var use_yabloc_pose)"/>
<arg name="gnss_enabled" value="$(var gnss_enabled)"/>
<arg name="ekf_enabled" value="true"/>
<arg name="stop_check_enabled" value="$(var stop_check_enabled)"/>
<arg name="config_file" value="$(var pose_initializer_param_path)"/>
<arg name="sub_gnss_pose_cov" value="$(var sub_gnss_pose_cov)"/>
</include>

<!-- automatic_pose_initializer -->
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>

<!-- pointcloud_downsampling -->
<let name="override_input_pointcloud" value="$(var input_pointcloud)"/>
<let name="override_input_pointcloud" value="$(var input_pointcloud)/relay" if="$(var multi_localizer_mode)"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py" if="$(var use_ndt_pose)">
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>
<arg name="input_pointcloud" value="$(var override_input_pointcloud)"/>
</include>
</group>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<arg name="src_image" value="$(var src_image)"/>
<arg name="src_info" value="$(var src_info)"/>
<arg name="input_pose" value="$(var input_pose)"/>
<arg name="multi_localizer_mode" value="$(var multi_localizer_mode)"/>
</include>
</group>

Expand Down
1 change: 1 addition & 0 deletions launch/tier4_localization_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<exec_depend>gyro_odometer</exec_depend>
<exec_depend>ndt_scan_matcher</exec_depend>
<exec_depend>pointcloud_preprocessor</exec_depend>
<exec_depend>pose_estimator_arbiter</exec_depend>
<exec_depend>pose_initializer</exec_depend>
<exec_depend>pose_instability_detector</exec_depend>
<exec_depend>topic_tools</exec_depend>
Expand Down
58 changes: 58 additions & 0 deletions localization/pose_estimator_arbiter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
cmake_minimum_required(VERSION 3.14)
project(pose_estimator_arbiter)

find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(glog REQUIRED)

find_package(PCL REQUIRED COMPONENTS common)
include_directories(SYSTEM ${PCL_INCLUDE_DIRS})

# ==============================
# switch rule library
ament_auto_add_library(switch_rule
SHARED
src/pose_estimator_arbiter/switch_rule/enable_all_rule.cpp
)
target_include_directories(switch_rule PUBLIC src)

# ==============================
# pose estimator arbiter node
ament_auto_add_executable(${PROJECT_NAME}
src/pose_estimator_arbiter/pose_estimator_arbiter_core.cpp
src/pose_estimator_arbiter/pose_estimator_arbiter_node.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC src)
target_link_libraries(${PROJECT_NAME} switch_rule glog::glog)

# ==============================
if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)

# define test definition macro
function(add_testcase filepath)
get_filename_component(filename ${filepath} NAME)
string(REGEX REPLACE ".cpp" "" test_name ${filename})
ament_add_gmock(${test_name} ${filepath})
target_include_directories(${test_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(${test_name} fmt)
ament_target_dependencies(${test_name} ${${PROJECT_NAME}_FOUND_BUILD_DEPENDS})
endfunction()

add_testcase(test/test_shared_data.cpp)
add_ros_test(
test/test_pose_estimator_arbiter.py
TIMEOUT "30"
)
endif()

# ==============================
# In practice, the example rule is not used as autoware code.
# It exists only for user reference and is tested only.
add_subdirectory(example_rule)

# ==============================
ament_auto_package(INSTALL_TO_SHARE
launch
)
Loading
Loading