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(yabloc): add camera and vector map localization #3946

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
637 commits
Select commit Hold shift + click to select a range
8a2f1a9
adopt scane_case to undistort, segment_filter
KYabuuchi Nov 18, 2022
4191805
adopt scane_case to ground_server, ll2_decomposer
KYabuuchi Nov 18, 2022
ca2ecbb
adopt scane_case to twist_converter, twist_estimator
KYabuuchi Nov 18, 2022
04150b6
adopt scane_case to validation packages
KYabuuchi Nov 18, 2022
55de6d5
adopt scane_case tomodularized_particle_filter
KYabuuchi Nov 18, 2022
e1069a7
adopt scane_case to gnss_particle_corrector
KYabuuchi Nov 18, 2022
0aacc50
adopt scane_case to camera_particle_corrector
KYabuuchi Nov 18, 2022
61dfaa7
adopt scane_case to antishadow_corrector
KYabuuchi Nov 18, 2022
ee221b0
adopt scane_case to particle_initializer
KYabuuchi Nov 18, 2022
39788f2
organize launch files
KYabuuchi Nov 18, 2022
c46f03b
add twist_visualizer to validate odometry performance
KYabuuchi Nov 21, 2022
e90e839
use SE3::exp() to predict particles & modify linear noise model
KYabuuchi Nov 21, 2022
e1c4a40
stop to use LL2 to rectify initialpose2d
KYabuuchi Nov 24, 2022
20d8264
fix redundant computation in segment_accumulator
KYabuuchi Nov 24, 2022
e2d8311
improve gnss_particle_corrector
KYabuuchi Nov 24, 2022
ca98bf4
fix segment_accumulator's bug
KYabuuchi Nov 24, 2022
0da9215
add doppler_converter
KYabuuchi Dec 2, 2022
f9ddc17
add xx2.launch.xml
KYabuuchi Dec 2, 2022
0ce8c3f
add hsv_extractor
KYabuuchi Dec 5, 2022
d63556b
pickup other regions which have same color histogram
KYabuuchi Dec 5, 2022
277a290
use additional region to filt line-segments
KYabuuchi Dec 5, 2022
d44ee76
improve graph-segmentation
KYabuuchi Dec 6, 2022
25507cc
remove `truncate_pixel_threshold`
KYabuuchi Dec 6, 2022
ef163d3
refactor graph_segmentator & segment_filter
KYabuuchi Dec 6, 2022
792a584
add mahalanobis_distance_threshold in GNSS particle corrector
KYabuuchi Dec 8, 2022
9e990a0
add extract_line_segments.hpp
KYabuuchi Dec 8, 2022
125ef0b
use pcl::transformCloudWithNormals instead of transform_cloud
KYabuuchi Dec 8, 2022
d2dad45
filt accumulating segments by LL2
KYabuuchi Dec 8, 2022
084d632
move herarchical_cost_map to common
KYabuuchi Dec 8, 2022
f879dbe
apply positive feedback for accumulation
KYabuuchi Dec 8, 2022
3552202
move transform_linesegments() to common pkg
KYabuuchi Dec 9, 2022
6e42068
refactor
KYabuuchi Dec 12, 2022
bca5165
use all projected lines for camera corrector
KYabuuchi Dec 12, 2022
93906a3
evaluate iffy linesegments
KYabuuchi Dec 12, 2022
28add8e
complete to unify ll2-assisted lsd clasification
KYabuuchi Dec 12, 2022
07c0059
add abs_cos2() which is more strict direction constraint
KYabuuchi Dec 12, 2022
bae92ef
fix orientation initialization bug
KYabuuchi Dec 13, 2022
4325750
publish doppler direction
KYabuuchi Dec 13, 2022
3cad3e4
TMP: add disable/enable switch for camera corrector
KYabuuchi Dec 14, 2022
b512796
implement doppler orientation correction but it's disabled by default
KYabuuchi Dec 19, 2022
d083edc
speed up camera corrector
KYabuuchi Dec 19, 2022
77cc33b
update ros params
KYabuuchi Dec 20, 2022
07e9b4f
implement kalman filter for ground tilt estimation
KYabuuchi Dec 22, 2022
594f77b
continuous height estimation works well?
KYabuuchi Dec 23, 2022
173b864
estimate height cotiniously
KYabuuchi Dec 23, 2022
ec65fee
use only linesegments which are at same height
KYabuuchi Dec 23, 2022
db09e02
add static_gyro_bias parameter
KYabuuchi Dec 23, 2022
023cbd5
fix bug about overlay varidation
KYabuuchi Dec 23, 2022
a8d5d75
increse ll2 height marging in cost map generation
KYabuuchi Dec 26, 2022
df40678
add static_gyro_bias in twist.launch.xml
KYabuuchi Dec 26, 2022
a755b0a
load pcdless_init_area from ll2
KYabuuchi Jan 5, 2023
65dcb1a
add specified initialization area
KYabuuchi Jan 5, 2023
c0ce9ee
add corrector_manager node to disable/enable camera_corrector
KYabuuchi Jan 6, 2023
de03c9f
call service to disable camer_corrector from manager
KYabuuchi Jan 6, 2023
1e282df
load corrector disable area
KYabuuchi Jan 10, 2023
5797dc6
overlay even if pose is not estiamted
KYabuuchi Jan 10, 2023
d636080
publish camera corrector's status as string
KYabuuchi Jan 10, 2023
9007825
add set_booL_panel for camera_corrector enable/disable
KYabuuchi Jan 10, 2023
6b4b521
load bounding box from lanelet2
KYabuuchi Jan 12, 2023
a152cea
draw bounding box on cost map
KYabuuchi Jan 13, 2023
8363910
remove at2,at1 from cost map
KYabuuchi Jan 14, 2023
b52f6f3
use cost_map::at() instread pf at2()
KYabuuchi Jan 15, 2023
f36098f
move cost map library from common to camera corrector
KYabuuchi Jan 15, 2023
71b7602
use logit for particle weighting but it does not work well
KYabuuchi Jan 16, 2023
5c6caca
prob_to_logit() requires non-intuitive parameters
KYabuuchi Jan 16, 2023
770b971
goodbye stupid parameters (max_raw_score & score_offset)
KYabuuchi Jan 16, 2023
0f1dff0
publish two scored pointclouds as debug
KYabuuchi Jan 16, 2023
16fec15
can handle unmapped areas
KYabuuchi Jan 16, 2023
d41bbd4
remove obsolete packages
KYabuuchi Feb 10, 2023
512654c
update README.md
KYabuuchi Feb 10, 2023
e8a704c
Update README.md
KYabuuchi Feb 10, 2023
ac20d58
add image of how_to_launch
KYabuuchi Feb 12, 2023
b6d617b
add node diagram in readme
KYabuuchi Feb 12, 2023
08a09cc
add rviz_description.png in README
KYabuuchi Feb 12, 2023
d328fcc
subscribe pose_with_cov & disconnect base_link <-> particle_pose
KYabuuchi Feb 16, 2023
da9775b
remove segment_accumulator & launch ekf_localizer from this project
KYabuuchi Jan 21, 2023
bc1645d
add gnss_ekf_corrector
KYabuuchi Jan 21, 2023
0cc174f
add camera_ekf_corrector package
KYabuuchi Jan 22, 2023
326adb4
subscribe ekf prediction & synch pose data
KYabuuchi Jan 22, 2023
6ab2482
WIP: ready to implement UKF?
KYabuuchi Jan 22, 2023
4bfb4ac
estimate weighted averaging as pose_estimator
KYabuuchi Jan 22, 2023
85392c0
basic algorithm is implemented but it does not work proparly
KYabuuchi Jan 23, 2023
e9480e7
apply after_cov_gain_
KYabuuchi Jan 23, 2023
69549ed
ekf corrector works a little bit appropriately
KYabuuchi Jan 23, 2023
7c067fd
increase twist covariance for ekf
KYabuuchi Jan 24, 2023
bbf783b
test probability theory
KYabuuchi Jan 25, 2023
02d6825
updat prob.py
KYabuuchi Jan 26, 2023
8c99141
implement de-bayesing but it loooks ugly
KYabuuchi Jan 29, 2023
ecdd650
remove obsolete parameters
KYabuuchi Jan 29, 2023
72896ff
skip measurement publishing if travel distance is so short
KYabuuchi Jan 29, 2023
67ab8b0
use constant covariance because i dont understand what is correct
KYabuuchi Feb 18, 2023
3f10618
add submodule sample_vehicle_launch
KYabuuchi Feb 18, 2023
b551580
TMP but it works
KYabuuchi Feb 18, 2023
8d862a8
add ekf_trigger in particle_initializer.hpp
KYabuuchi Feb 19, 2023
8c4ed08
publish gnss markers & camera_est pubishes constant cov
KYabuuchi Feb 22, 2023
0b0faf5
back to pcd-less only launcher
KYabuuchi Feb 22, 2023
def3b4a
add bayes_util package
KYabuuchi Feb 22, 2023
0312103
apply de-bayesing for camera_ekf
KYabuuchi Feb 25, 2023
b280595
some launch file update
KYabuuchi Feb 25, 2023
e467d50
organize launch files. we can choice mode from ekf/pekf/pf
KYabuuchi Feb 25, 2023
61a1b30
organize particle_initializer
KYabuuchi Feb 25, 2023
f093d7f
add swap_mode_adaptor WIP
KYabuuchi Feb 25, 2023
8f6eec6
use latest ekf in autoware & sample_vehicle
KYabuuchi Feb 26, 2023
7fd2d7b
fix bug of swap_adalptor
KYabuuchi Feb 26, 2023
39ef8ab
fix FIX & FLOAT converter
KYabuuchi Feb 5, 2023
359f406
fix septentrio doppler converter
KYabuuchi Mar 6, 2023
5ea86a0
move ekf packages to ekf directory
KYabuuchi Mar 6, 2023
bb58c3a
ignore corrector_manager
KYabuuchi Mar 6, 2023
561d5d8
add standalone arg in launch files
KYabuuchi Mar 20, 2023
8c49974
update semseg_node
KYabuuchi Mar 20, 2023
8615b1c
add camera_pose_initializer pkg
KYabuuchi Mar 21, 2023
b39eb9c
subscribe camera_info&tf and prepare semantic projection
KYabuuchi Mar 21, 2023
e93ac98
project semantic image
KYabuuchi Mar 21, 2023
838ba9d
create vector map image from ll2
KYabuuchi Mar 22, 2023
f8fa9f7
create lane image from vector map
KYabuuchi Mar 22, 2023
ab54ae3
search the most match angle by non-zero pixels
KYabuuchi Mar 22, 2023
b074115
camera based pose_initializer
KYabuuchi Mar 23, 2023
bfb8d65
move ekf packages into unstable
KYabuuchi Apr 1, 2023
56b0693
move ekf theory debugger
KYabuuchi Apr 1, 2023
4fccd11
add tier4_autoware_msgs as submodule
KYabuuchi Apr 1, 2023
a4bde50
move pose_initializer into initializer dir
KYabuuchi Apr 1, 2023
b99252d
add semse_msgs pkg
KYabuuchi Apr 2, 2023
cef16fc
separate marker pub function
KYabuuchi Apr 2, 2023
d72441a
separate projection functions
KYabuuchi Apr 2, 2023
daa3f51
add semseg_srv client
KYabuuchi Apr 2, 2023
9f268ea
move sem-seg directory
KYabuuchi Apr 2, 2023
ea46df7
camera pose initilizer works successfully
KYabuuchi Apr 2, 2023
eff1ec9
rectify covariance along the orientation
KYabuuchi Apr 2, 2023
ea57bb9
improve initialization parameters
KYabuuchi Apr 3, 2023
8e63708
take into account covariance of request
KYabuuchi Apr 4, 2023
ac62ee7
use lanelet direciton to compute init pose scores
KYabuuchi Apr 6, 2023
dc8ba5a
semseg download model automatically
KYabuuchi Apr 7, 2023
a8f2473
remove sample_vehicle_launch
KYabuuchi Apr 8, 2023
36d5212
add autoware_msgs
KYabuuchi Apr 8, 2023
7bc38d7
remove obsolete launch files
KYabuuchi Apr 8, 2023
57f322f
add standalone mode for direct initialization
KYabuuchi Apr 8, 2023
efe049c
fix fix_to_pose
KYabuuchi Apr 10, 2023
300a138
update launch files
KYabuuchi Apr 10, 2023
8bd77e9
update rviz config
KYabuuchi Apr 10, 2023
1d07a83
remove lidar_particle_corrector
KYabuuchi Apr 10, 2023
e7df667
remove Sophus from sunbmodule
KYabuuchi Apr 10, 2023
0fca805
rename submodule directory
KYabuuchi Apr 10, 2023
5d83ae4
update README and some sample images
KYabuuchi Apr 10, 2023
a1b8603
update README.md
KYabuuchi Apr 11, 2023
72ebb8e
fix override_camera_frame_id bahaviors
KYabuuchi Apr 11, 2023
e6c9be1
fix some bugs (#4)
kminoda Apr 11, 2023
1ea8dfb
fix: use initialpose from Rviz (#6)
KYabuuchi Apr 12, 2023
6bbfbbd
misc: add license (#7)
KYabuuchi Apr 13, 2023
fbd6d0e
add quick start demo (#8)
KYabuuchi Apr 16, 2023
bb90abf
refactor(launch) remove & update obsolete launch files (#9)
KYabuuchi Apr 20, 2023
a64c371
docs(readme): update architecture image (#10)
KYabuuchi Apr 20, 2023
02e091d
refactor(pcdless_launc/scripts): remove unnecessary scripts (#11)
KYabuuchi Apr 20, 2023
870cc89
fix(pcdless_launch): fix a build bug
kminoda Apr 20, 2023
0a57459
fix(twist_estimator): use velocity_report by default
kminoda Apr 20, 2023
ec4046c
fix bug
kminoda Apr 20, 2023
22532ea
debugged, now works
kminoda Apr 20, 2023
65f7094
update sample rosbag link (#14)
KYabuuchi Apr 24, 2023
46856b6
feature(graph_segment, gnss_particle_corrector): make some features s…
KYabuuchi Apr 25, 2023
ebf0a41
fix: minor fix for multi camera support (#18)
kminoda Apr 25, 2023
1e9e071
refactor(retroactive_resampler): more readable (#19)
KYabuuchi Apr 26, 2023
c908385
refactor(mpf::predictor) resampling interval control in out of resamp…
KYabuuchi Apr 26, 2023
f4482eb
refactor(mpf::predictor): just refactoring (#21)
KYabuuchi Apr 26, 2023
1a2d096
fix(twist_estimator): remove stop filter for velocity (#23)
kminoda Apr 27, 2023
b41bd2d
feat(pcdless_launch): add multi camera launcher (#22)
kminoda Apr 27, 2023
9189ec4
refactor(CMakeListx.txt): just refactoring (#24)
KYabuuchi Apr 27, 2023
dc7557c
fix: rename lsd variables and files (#26)
kminoda Apr 27, 2023
789471a
misc: reame pcdless to yabloc (#25)
KYabuuchi Apr 27, 2023
0e10230
visualize path (#28)
KYabuuchi Apr 28, 2023
6051642
docs: update readme about particle filter (#30)
KYabuuchi Apr 28, 2023
ae49b1f
feat(segment_filter): publish images with lines and refactor (#29)
kminoda Apr 28, 2023
54e98d2
catch runtime_error when particle id is invalid (#31)
KYabuuchi May 5, 2023
b1a28bc
return if info is nullopt (#32)
KYabuuchi May 6, 2023
2b195db
pose_buffer is sometimes empty (#33)
KYabuuchi May 7, 2023
fc5d953
use_yaw_of_initialpose (#34)
KYabuuchi May 7, 2023
84325b4
feat(interface): remove incompatible interface (#35)
KYabuuchi May 8, 2023
2774c2e
fix: suppress info/warn_stream (#37)
KYabuuchi May 9, 2023
37c80cb
/switch must not be nice name (#39)
KYabuuchi May 9, 2023
9b4b641
misc(readme): update readme (#41)
KYabuuchi May 9, 2023
7b6dcd8
docs(rosdep): fix package.xml to ensure build success (#44)
KYabuuchi May 11, 2023
4c69ad8
add geographiclib in package.xml (#46)
KYabuuchi May 15, 2023
89c3344
fix path search error in build stage (#45)
comoc May 15, 2023
d9764d9
Feature/remove submodule (#47)
KYabuuchi May 15, 2023
205374b
feature: change node namespace to /localization/yabloc/** from /local…
KYabuuchi May 15, 2023
a0ad3d5
removed unstable packages (#49)
KYabuuchi May 15, 2023
2738eaa
feature: add *.param.yaml to manage parameters (#50)
KYabuuchi May 17, 2023
7a1c294
does not estimate twist (#51)
KYabuuchi May 18, 2023
28f7fbd
feat(particle_initializer): merge particle_initializer into mpf (#52)
kminoda May 26, 2023
3fe7bba
fix: remove ll2_transition_area (#54)
kminoda May 26, 2023
0eb2f00
feature(initializer): combine some initializer packages (#56)
KYabuuchi May 29, 2023
334b853
feature(imgproc): reudce imgproc packages (#57)
KYabuuchi May 29, 2023
8ff1778
feature(validation): remove validation packages (#58)
KYabuuchi May 29, 2023
8da4017
feature(pf): combine some packages related to particle filter (#59)
KYabuuchi May 29, 2023
3db21e3
feature: combine map and twist packages (#60)
KYabuuchi May 30, 2023
ea9fd3d
removed obsolete packages
KYabuuchi May 31, 2023
f3b75da
remove obsolete dot files
KYabuuchi Jun 1, 2023
8d7f64b
use tier4_loc_launch instead of yabloc_loc_launch
KYabuuchi Jun 6, 2023
3713b46
move launch files to each packages
KYabuuchi Jun 6, 2023
2cdabb1
remove yabloc_localization_launch
KYabuuchi Jun 6, 2023
9f29199
remove yabloc_launch
KYabuuchi Jun 6, 2023
5c5d766
modify yabloc/README.md
KYabuuchi Jun 8, 2023
fea405e
update yabloc_common/README.md
KYabuuchi Jun 8, 2023
6fbf88a
update yabloc_imgproc README
KYabuuchi Jun 8, 2023
de3a70c
update yabloc_particle_filter/README
KYabuuchi Jun 9, 2023
75f6142
update yabloc_pose_initializer/README
KYabuuchi Jun 9, 2023
415789d
update README
KYabuuchi Jun 9, 2023
845e9b3
use native from_bin_msg
KYabuuchi Jun 9, 2023
3a0c3d8
use ifndef instead of pragma once in yabloc_common
KYabuuchi Jun 12, 2023
3b8809a
use ifndef instead of pragma once in yabloc_imgproc & yabloc_pf
KYabuuchi Jun 12, 2023
219125f
use ifndef instead of pragma once in yabloc_pose_initializer
KYabuuchi Jun 12, 2023
c45ba9d
style(pre-commit): autofix
pre-commit-ci[bot] Jun 12, 2023
31367c5
use autoware_cmake & suppress build warning
KYabuuchi Jun 13, 2023
c744ff0
repalce yabloc::Timer with tier4_autoware_utils::StopWatch
KYabuuchi Jun 13, 2023
632890e
replace 1.414 with std::sqrt(2)
KYabuuchi Jun 13, 2023
ff95129
style(pre-commit): autofix
pre-commit-ci[bot] Jun 13, 2023
eb6c03c
removed redundant ament_cmake_auto
KYabuuchi Jun 13, 2023
da88235
removed yabloc_common/timer.hpp
KYabuuchi Jun 13, 2023
5475827
replaced low_pass_filter with autoware's lowpass_filter_1d
KYabuuchi Jun 13, 2023
6139be6
style(pre-commit): autofix
pre-commit-ci[bot] Jun 13, 2023
e7a0dc4
Squashed commit of the following:
KYabuuchi Jun 13, 2023
e147b80
style(pre-commit): autofix
pre-commit-ci[bot] Jun 13, 2023
0b15a74
removed fix2mgrs & ublox_stamp
KYabuuchi Jun 13, 2023
d6c0f9a
added ~/ at the top of topic name
KYabuuchi Jun 13, 2023
a467e95
removed use_sim_time in yabloc launch files
KYabuuchi Jun 13, 2023
eb70a60
add architecture diagram in README
KYabuuchi Jun 14, 2023
0eb5d5a
rename lsd_node to line_segment_detector
KYabuuchi Jun 14, 2023
0c519db
style(pre-commit): autofix
pre-commit-ci[bot] Jun 14, 2023
f29c690
Update localization/yabloc/README.md
KYabuuchi Jun 14, 2023
511055f
removed obsolete debug code in similar_area_searcher
KYabuuchi Jun 14, 2023
14804b8
removed suspension_adaptor which manages lifecycle of particle predictor
KYabuuchi Jun 14, 2023
4165493
style(pre-commit): autofix
pre-commit-ci[bot] Jun 14, 2023
743bfff
renamed semseg to SemanticSegmentation
KYabuuchi Jun 16, 2023
18f2637
style(pre-commit): autofix
pre-commit-ci[bot] Jun 16, 2023
6c48086
fixed README.md to solve markdownlint
KYabuuchi Jun 16, 2023
e4015d7
WIP: reflected cpplint's suggestion
KYabuuchi Jun 16, 2023
57a3d0a
reflected cpplint's suggestion
KYabuuchi Jun 16, 2023
7b4104e
rename AbstParaticleFilter in config files
KYabuuchi Jun 16, 2023
f8c2613
fixed typo
KYabuuchi Jun 16, 2023
4990b1e
used autoware_lint_common
KYabuuchi Jun 16, 2023
184af93
fixed miss git add
KYabuuchi Jun 16, 2023
9cd3aa7
style(pre-commit): autofix
pre-commit-ci[bot] Jun 16, 2023
a12a493
replaced lanelet_util by lanelet2_extension
KYabuuchi Jun 19, 2023
f5aa78c
replaced fast_math by tie4_autoware_utils
KYabuuchi Jun 19, 2023
87272bf
sort package.xml
KYabuuchi Jun 19, 2023
cabc688
renamed yabloc_imgproc with yabloc_image_processing
KYabuuchi Jun 19, 2023
d9617f3
reflected some review comments
KYabuuchi Jun 19, 2023
56fcbb4
resolved some TODO
KYabuuchi Jun 19, 2023
b6af5dc
Merge branch 'main' into feature/direct_yabloc_integration
KYabuuchi Jun 20, 2023
e71db0e
prioritize NDT if both NDT and YabLoc initializer enabled
KYabuuchi Jun 21, 2023
bb5f933
Merge branch 'main' into feature/direct_yabloc_integration
KYabuuchi Jun 21, 2023
6e3977f
changed localization_mode option names
KYabuuchi Jun 22, 2023
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,6 +1,7 @@
<?xml version="1.0"?>
<launch>
<!-- Parameter files -->
<arg name="mode"/>
<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 All @@ -27,10 +28,14 @@
</include>
</group>
<!-- pose_estimator module -->
<group>
<group if="$(eval '&quot;$(var mode)&quot;==&quot;lidar&quot;')">
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_estimator/pose_estimator.launch.xml"/>
</group>
<group if="$(eval '&quot;$(var mode)&quot;==&quot;camera&quot;')">
<push-ros-namespace namespace="yabloc"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_estimator/yabloc.launch.xml"/>
</group>
<!-- twist_estimator module -->
<group>
<push-ros-namespace namespace="twist_estimator"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0"?>
kminoda marked this conversation as resolved.
Show resolved Hide resolved
<launch>
<!-- source camera image topics -->
<arg name="src_image" default="/sensing/camera/traffic_light/image_raw/compressed"/>
<arg name="src_info" default="/sensing/camera/traffic_light/camera_info"/>

<!-- default parameter path -->
<!-- initializer -->
<arg name="camera_pose_initializer_param_path" default="$(find-pkg-share yabloc_pose_initializer)/config/camera_pose_initializer.param.yaml"/>
<!-- particle filter-->
<arg name="camera_particle_corrector_param_path" default="$(find-pkg-share yabloc_particle_filter)/config/camera_particle_corrector.param.yaml"/>
<arg name="gnss_particle_corrector_param_path" default="$(find-pkg-share yabloc_particle_filter)/config/gnss_particle_corrector.param.yaml"/>
<arg name="predictor_param_path" default="$(find-pkg-share yabloc_particle_filter)/config/predictor.param.yaml"/>
<!-- image processing -->
<arg name="graph_segment_param_path" default="$(find-pkg-share yabloc_image_processing)/config/graph_segment.param.yaml"/>
<arg name="segment_filter_param_path" default="$(find-pkg-share yabloc_image_processing)/config/segment_filter.param.yaml"/>
<arg name="undistort_param_path" default="$(find-pkg-share yabloc_image_processing)/config/undistort.param.yaml"/>
<!-- map -->
<arg name="ground_server_param_path" default="$(find-pkg-share yabloc_common)/config/ground_server.param.yaml"/>
<arg name="ll2_decomposer_param_path" default="$(find-pkg-share yabloc_common)/config/ll2_decomposer.param.yaml"/>

<let name="input_pose" value="/localization/pose_twist_fusion_filter/pose"/>

<!-- initializer -->
<group>
<push-ros-namespace namespace="initializer"/>
<include file="$(find-pkg-share yabloc_pose_initializer)/launch/yabloc_pose_initializer.launch.xml"/>
</group>

<!-- particle filter -->
<group>
<push-ros-namespace namespace="pf"/>
<include file="$(find-pkg-share yabloc_particle_filter)/launch/yabloc_particle_filter.launch.xml"/>
</group>

<!-- image processing -->
<group>
<push-ros-namespace namespace="image_processing"/>
<include file="$(find-pkg-share yabloc_image_processing)/launch/yabloc_image_processing.launch.xml">
<arg name="src_image" value="$(var src_image)"/>
<arg name="src_info" value="$(var src_info)"/>
<arg name="input_pose" value="$(var input_pose)"/>
</include>
</group>

<!-- map -->
<group>
<push-ros-namespace namespace="map"/>
<include file="$(find-pkg-share yabloc_common)/launch/yabloc_common.launch.xml">
<arg name="input_particle_pose" value="$(var input_pose)"/>
</include>
</group>
</launch>
4 changes: 4 additions & 0 deletions launch/tier4_localization_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<exec_depend>pointcloud_preprocessor</exec_depend>
<exec_depend>pose_initializer</exec_depend>
<exec_depend>topic_tools</exec_depend>
<exec_depend>yabloc_common</exec_depend>
<exec_depend>yabloc_image_processing</exec_depend>
<exec_depend>yabloc_particle_filter</exec_depend>
<exec_depend>yabloc_pose_initializer</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
1 change: 1 addition & 0 deletions localization/pose_initializer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ament_auto_add_executable(pose_initializer_node
src/pose_initializer/pose_initializer_core.cpp
src/pose_initializer/gnss_module.cpp
src/pose_initializer/ndt_module.cpp
src/pose_initializer/yabloc_module.cpp
src/pose_initializer/stop_check_module.cpp
src/pose_initializer/ekf_localization_trigger_module.cpp
src/pose_initializer/ndt_localization_trigger_module.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
gnss_enabled: true
ndt_enabled: true
ekf_enabled: true
yabloc_enabled: false
stop_check_enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<node pkg="pose_initializer" exec="pose_initializer_node" name="pose_initializer_node">
<param from="$(var common_config_file)"/>
<param from="$(var config_file)"/>
<remap from="yabloc_align" to="/localization/yabloc/initializer/yabloc_align_srv"/>
<remap from="ndt_align" to="/localization/pose_estimator/ndt_align_srv"/>
<remap from="stop_check_twist" to="/sensing/vehicle_velocity_converter/twist_with_covariance"/>
<remap from="gnss_pose_cov" to="$(var sub_gnss_pose_cov)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "ndt_localization_trigger_module.hpp"
#include "ndt_module.hpp"
#include "stop_check_module.hpp"
#include "yabloc_module.hpp"

#include <memory>
#include <vector>
Expand All @@ -41,6 +42,9 @@
if (declare_parameter<bool>("gnss_enabled")) {
gnss_ = std::make_unique<GnssModule>(this);
}
if (declare_parameter<bool>("yabloc_enabled")) {
yabloc_ = std::make_unique<YabLocModule>(this);

Check warning on line 46 in localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp#L45-L46

Added lines #L45 - L46 were not covered by tests
}
if (declare_parameter<bool>("ndt_enabled")) {
ndt_ = std::make_unique<NdtModule>(this);
ndt_localization_trigger_ = std::make_unique<NdtLocalizationTriggerModule>(this);
Expand Down Expand Up @@ -86,6 +90,10 @@
auto pose = req->pose.empty() ? get_gnss_pose() : req->pose.front();
if (ndt_) {
pose = ndt_->align_pose(pose);
} else if (yabloc_) {

Check warning on line 93 in localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp#L93

Added line #L93 was not covered by tests
// If both the NDT and YabLoc initializer are enabled, prioritize NDT as it offers more
// accuracy pose.
pose = yabloc_->align_pose(pose);

Check warning on line 96 in localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

PoseInitializer::on_initialize increases in cyclomatic complexity from 11 to 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 96 in localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp#L96

Added line #L96 was not covered by tests
}
pose.pose.covariance = output_pose_covariance_;
pub_reset_->publish(pose);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
class StopCheckModule;
class NdtModule;
class GnssModule;
class YabLocModule;
class EkfLocalizationTriggerModule;
class NdtLocalizationTriggerModule;

Expand All @@ -50,6 +51,7 @@ class PoseInitializer : public rclcpp::Node
std::array<double, 36> gnss_particle_covariance_;
std::unique_ptr<GnssModule> gnss_;
std::unique_ptr<NdtModule> ndt_;
std::unique_ptr<YabLocModule> yabloc_;
std::unique_ptr<StopCheckModule> stop_check_;
std::unique_ptr<EkfLocalizationTriggerModule> ekf_localization_trigger_;
std::unique_ptr<NdtLocalizationTriggerModule> ndt_localization_trigger_;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright 2022 The Autoware Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "yabloc_module.hpp"

#include <component_interface_specs/localization.hpp>
#include <component_interface_utils/rclcpp/exceptions.hpp>

#include <memory>

using ServiceException = component_interface_utils::ServiceException;
using Initialize = localization_interface::Initialize;
using PoseWithCovarianceStamped = geometry_msgs::msg::PoseWithCovarianceStamped;

YabLocModule::YabLocModule(rclcpp::Node * node) : logger_(node->get_logger())

Check warning on line 26 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L26

Added line #L26 was not covered by tests
{
cli_align_ = node->create_client<RequestPoseAlignment>("yabloc_align");
}

Check warning on line 29 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L28-L29

Added lines #L28 - L29 were not covered by tests

PoseWithCovarianceStamped YabLocModule::align_pose(const PoseWithCovarianceStamped & pose)

Check warning on line 31 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L31

Added line #L31 was not covered by tests
{
const auto req = std::make_shared<RequestPoseAlignment::Request>();
req->pose_with_covariance = pose;

if (!cli_align_->service_is_ready()) {
throw component_interface_utils::ServiceUnready("YabLoc align server is not ready.");

Check warning on line 37 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L36-L37

Added lines #L36 - L37 were not covered by tests
}

RCLCPP_INFO(logger_, "Call YabLoc align server.");
const auto res = cli_align_->async_send_request(req).get();
if (!res->success) {
RCLCPP_INFO(logger_, "YabLoc align server failed.");
throw ServiceException(
Initialize::Service::Response::ERROR_ESTIMATION, "YabLoc align server failed.");

Check warning on line 45 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L40-L45

Added lines #L40 - L45 were not covered by tests
}
RCLCPP_INFO(logger_, "YabLoc align server succeeded.");

Check warning on line 47 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L47

Added line #L47 was not covered by tests

// Overwrite the covariance.
return res->pose_with_covariance;

Check warning on line 50 in localization/pose_initializer/src/pose_initializer/yabloc_module.cpp

View check run for this annotation

Codecov / codecov/patch

localization/pose_initializer/src/pose_initializer/yabloc_module.cpp#L50

Added line #L50 was not covered by tests
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2022 The Autoware Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef POSE_INITIALIZER__YABLOC_MODULE_HPP_
#define POSE_INITIALIZER__YABLOC_MODULE_HPP_

#include <rclcpp/rclcpp.hpp>

#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>
#include <tier4_localization_msgs/srv/pose_with_covariance_stamped.hpp>

class YabLocModule
{
private:
using PoseWithCovarianceStamped = geometry_msgs::msg::PoseWithCovarianceStamped;
using RequestPoseAlignment = tier4_localization_msgs::srv::PoseWithCovarianceStamped;

public:
explicit YabLocModule(rclcpp::Node * node);
PoseWithCovarianceStamped align_pose(const PoseWithCovarianceStamped & pose);

private:
rclcpp::Logger logger_;
rclcpp::Client<RequestPoseAlignment>::SharedPtr cli_align_;
};

#endif // POSE_INITIALIZER__YABLOC_MODULE_HPP_
31 changes: 31 additions & 0 deletions localization/yabloc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# YabLoc

**YabLoc** is vision-based localization with vector map. [https://youtu.be/Eaf6r_BNFfk](https://youtu.be/Eaf6r_BNFfk)

[![thumbnail](docs/yabloc_thumbnail.jpg)](https://youtu.be/Eaf6r_BNFfk)

KYabuuchi marked this conversation as resolved.
Show resolved Hide resolved
## Packages

- [yabloc_common](yabloc_common/README.md)
- [yabloc_image_processing](yabloc_image_processing/README.md)
- [yabloc_particle_filter](yabloc_particle_filter/README.md)
- [yabloc_pose_initializer](yabloc_pose_initializer/README.md)

## How to launch YabLoc instead of NDT

When launching autoware, if you set `localization_mode:=yabloc` as an argument, YabLoc will be launched instead of NDT.
By default, `localization_mode` is `ndt`.

A sample command to run YabLoc is as follows

```shell
ros2 launch autoware_launch logging_simulator.launch.xml \
map_path:=$HOME/autoware_map/sample-map-rosbag\
vehicle_model:=sample_vehicle \
sensor_model:=sample_sensor_kit \
localization_mode:=yabloc
```

## Architecture

![node_diagram](docs/yabloc_architecture.drawio.svg)
Loading
Loading