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: add gnss/imu localizer #3063

Merged
merged 39 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6ab8192
Add gnss_imu_localizar
rsasaki0109 Feb 7, 2023
a40664a
Fix twist switching bug
rsasaki0109 Feb 8, 2023
010818d
Fix spell and reformat
rsasaki0109 Feb 9, 2023
35a1aa0
Parameterize directories with related launches
rsasaki0109 Feb 9, 2023
792cfd6
Fix mis-spell
rsasaki0109 Feb 9, 2023
ee3f2fd
Correction of characters not registered in the dictionary
rsasaki0109 Feb 9, 2023
18d2e17
Make ealeye_twist false
rsasaki0109 Feb 9, 2023
048ef6b
Delete unnecessary parts
rsasaki0109 Feb 9, 2023
b3694b0
Rename localization switching parameters
rsasaki0109 Feb 10, 2023
10df471
Rename twist_estimator_mode parameter pattern
rsasaki0109 Feb 10, 2023
9f007da
Simplify conditional branching
rsasaki0109 Feb 10, 2023
4275625
Resolve conflicts
rsasaki0109 Mar 2, 2023
0e0162f
Support for changes in pose_initializer
rsasaki0109 Mar 6, 2023
509778b
Merge branch 'main' into feat/add_gnss_imu_localizar
rsasaki0109 Mar 6, 2023
1df2f25
Fix problem of double eagleye activation
rsasaki0109 Mar 13, 2023
026cb3f
Fix unnecessary changes
rsasaki0109 Mar 13, 2023
859caed
Remove conditional branching by pose_estimatar_mode in system_error_m…
rsasaki0109 Mar 26, 2023
6c1bb30
Resolve conflict
rsasaki0109 Mar 27, 2023
ef242e1
Merge branch 'main' into feat/add_gnss_imu_localizar
rsasaki0109 Mar 27, 2023
78e8e6b
Change launch directory structure
rsasaki0109 Apr 4, 2023
b1e53a8
Remove unnecessary parameters and files
rsasaki0109 Apr 4, 2023
3105fbf
Fix indentations
rsasaki0109 Apr 4, 2023
06bf346
Coding modifications based on conventions
rsasaki0109 Apr 4, 2023
76dd6d4
Change the structure diagram in the package
rsasaki0109 Apr 4, 2023
73e9ca9
Integrate map4_localization_component1,2
rsasaki0109 Apr 7, 2023
c161532
Add drawio.svg
rsasaki0109 Apr 7, 2023
86e1447
Delete duplicate files
rsasaki0109 Apr 10, 2023
b7d5889
Change auther and add maintainer
rsasaki0109 Apr 11, 2023
f4e68d1
Delete unnecessary modules in drawio
rsasaki0109 Apr 11, 2023
514eb35
Fixing confusing sentences
rsasaki0109 Apr 11, 2023
b822dad
Fine-tuning of drawio
rsasaki0109 Apr 11, 2023
b6b6923
Fix authomaintainerr
rsasaki0109 Apr 12, 2023
0a06c56
Rename ndt to ndt_scan_matcher
rsasaki0109 Apr 17, 2023
294167c
follow the naming convention
rsasaki0109 Apr 17, 2023
335cba7
Add newlines to the end of files to fix end-of-file-fixer hook errors
rsasaki0109 Apr 17, 2023
7d3095f
Merge branch 'main' into feat/add_gnss_imu_localizar
rsasaki0109 Apr 17, 2023
006e353
List the packages that depend on map4_localization_launch correctly
rsasaki0109 Apr 24, 2023
8536ab1
Ran precommit locally
rsasaki0109 Apr 24, 2023
895456e
Merge branch 'main' into feat/add_gnss_imu_localizar
rsasaki0109 Apr 24, 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
10 changes: 10 additions & 0 deletions launch/map4_localization_launch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.14)
project(map4_localization_launch)

find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_package(INSTALL_TO_SHARE
eagleye_pose_twist_localization_launch
eagleye_twist_localization_launch
)
44 changes: 44 additions & 0 deletions launch/map4_localization_launch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# map4_localization_launch

This localization launch package is a sample package to introduce eagleye into autoware.

Eagleye provides a cost-effective alternative to LiDAR and point cloud-based localization by using low-cost GNSS and IMU sensors to provide vehicle position and orientation.

Autoware users will be able to choose between their existing LiDAR and point cloud-based localization stacks or GNSS/IMU-based eagleye localizer, depending on their specific needs and operating environment.

In addition to the LiDAR-based solution provided by `tier4_localization_launch` (shown in the first row of the following table), there are two ways to utilize eagleye in `map4_localization_launch` with the autoware localization stack.

localization launch  | twist estimator | pose estimator
-- | -- | --
tier4_localization_launch| gyro_odometry | ndt_scan_matcher
map4_localization_launch/eagleye_twist_localization_launch| eagleye_rt(gyro/odom/gnss fusion) | ndt_scan_matcher
map4_localization_launch/eagleye_pose_twist_localization_launch| eagleye_rt(gyro/odom/gnss fusion) | eagleye_rt(gyro/odom/gnss fusion)

## Structure

- eagleye_twist_localization_launch

![map4_localization_launch/eagleye_twist_localization_launch](./eagleye_twist_localization_launch/localization_launch.drawio.svg)

- eagleye_pose_twist_localization_launch

![map4_localization_launch/eagleye_pose_twist_localization_launch](./eagleye_pose_twist_localization_launch/localization_launch.drawio.svg)

## Package Dependencies

Please see `<exec_depend>` in `package.xml`.

## Usage

Include `localization.launch.xml` in other launch files as follows.

Note that you should provide parameter paths as `PACKAGE_param_path`. The list of parameter paths you should provide is written at the top of `localization.launch.xml`.

```xml
<include file="$(find-pkg-share map4_localization_launch)/eagleye_twist_localization_launch/localization.launch.xml">
<!-- Parameter files -->
<arg name="FOO_param_path" value="..."/>
<arg name="BAR_param_path" value="..."/>
...
</include>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<launch>
<!-- Parameter files -->
<arg name="localization_error_monitor_param_path"/>
<arg name="ekf_localizer_param_path"/>
<arg name="pose_initializer_param_path"/>
<arg name="pose_initializer_common_param_path"/>
<arg name="eagleye_param_path"/>

<!-- localization module -->
<group>
<push-ros-namespace namespace="localization"/>
<!-- util module -->
<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share map4_localization_launch)/eagleye_pose_twist_localization_launch/util/util.launch.xml"/>
</group>
<!-- pose_twist_estimator module -->
<group>
<push-ros-namespace namespace="pose_twist_estimator"/>
<include file="$(find-pkg-share map4_localization_launch)/eagleye_pose_twist_localization_launch/pose_twist_estimator/pose_twist_estimator.launch.xml"/>
</group>
<!-- pose_twist_fusion_filter module -->
<group>
<push-ros-namespace namespace="pose_twist_fusion_filter"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml"/>
</group>
<!-- localization_error_monitor_module -->
<group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/localization_error_monitor/localization_error_monitor.launch.xml"/>
</group>
</group>
</launch>
KYabuuchi marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>

<arg name="config_yaml" default="eagleye_config.param.yaml"/>
<arg name="config_path" default="$(find-pkg-share autoware_launch)/config/localization/$(var config_yaml)"/>
<arg name="output_pose_with_cov_name" default="/localization/pose_estimator/pose_with_covariance"/>
<arg name="output_twist_with_cov_name" default="/localization/twist_estimator/twist_with_covariance"/>
<arg name="directory_with_related_launches" default="$(find-pkg-share map4_localization_launch)/eagleye_pose_twist_localization_launch/pose_twist_estimator/eagleye"/>
<arg name="use_eagleye_pose" default="true"/>

<arg name="enable_additional_rolling" default="false"/>
<arg name="use_multi_antenna_mode" default="false"/>

<group>
<push-ros-namespace namespace="eagleye"/>

<node pkg="topic_tools" exec="relay" name="eagleye_output_twist_relay" args="twist_with_covariance $(var output_twist_with_cov_name)"/>

<arg name="use_rtk_dead_reckoning" default="false"/>
<arg name="use_rtk_heading" default="false"/>

<node pkg="eagleye_rt" name="twist_relay" exec="twist_relay">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>

<node pkg="eagleye_rt" name="tf_converted_imu" exec="tf_converted_imu">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="velocity_scale_factor_node" exec="velocity_scale_factor">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
<param name="velocity_scale_factor_save_str" value="$(find-pkg-share eagleye_rt)/config/velocity_scale_factor.txt"/>
</node>
<node pkg="eagleye_rt" name="yaw_rate_offset_stop_node" exec="yaw_rate_offset_stop">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="yaw_rate_offset_node_1st" exec="yaw_rate_offset" args="1st">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="yaw_rate_offset_node_2nd" exec="yaw_rate_offset" args="2nd">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="heading_node_1st" exec="heading" args="1st" if="$(eval &quot;'$(var use_rtk_heading)'=='false'&quot;)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
<param name="use_multi_antenna_mode" value="$(var use_multi_antenna_mode)"/>
</node>
<node pkg="eagleye_rt" name="heading_node_2nd" exec="heading" args="2nd" if="$(eval &quot;'$(var use_rtk_heading)'=='false'&quot;)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
<param name="use_multi_antenna_mode" value="$(var use_multi_antenna_mode)"/>
</node>
<node pkg="eagleye_rt" name="heading_node_3rd" exec="heading" args="3rd" if="$(eval &quot;'$(var use_rtk_heading)'=='false'&quot;)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
<param name="use_multi_antenna_mode" value="$(var use_multi_antenna_mode)"/>
</node>
<node pkg="eagleye_rt" name="heading_interpolate_node_1st" exec="heading_interpolate" args="1st">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="heading_interpolate_node_2nd" exec="heading_interpolate" args="2nd">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="heading_interpolate_node_3rd" exec="heading_interpolate" args="3rd">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="slip_angle_node" exec="slip_angle">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="distance_node" exec="distance">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="trajectory_node" exec="trajectory">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="rtk_dead_reckoning" exec="rtk_dead_reckoning" if="$(var use_rtk_dead_reckoning)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="rtk_heading_node_1st" exec="rtk_heading" args="1st" if="$(var use_rtk_heading)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="rtk_heading_node_2nd" exec="rtk_heading" args="2nd" if="$(var use_rtk_heading)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<group if="$(var use_eagleye_pose)">
<node pkg="eagleye_rt" name="position_node" exec="position" if="$(eval &quot;'$(var use_rtk_dead_reckoning)'=='false'&quot;)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="position_interpolate_node" exec="position_interpolate" if="$(eval &quot;'$(var use_rtk_dead_reckoning)'=='false'&quot;)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="smoothing_node" exec="smoothing">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="height_node" exec="height">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="angular_velocity_offset_stop_node" exec="angular_velocity_offset_stop">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="correction_imu" exec="correction_imu">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="rolling" exec="rolling">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="enable_additional_rolling" exec="enable_additional_rolling" if="$(eval &quot;'$(var enable_additional_rolling)'=='true'&quot;)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<node pkg="eagleye_rt" name="rtk_heading_node_3rd" exec="rtk_heading" args="3rd" if="$(var use_rtk_heading)">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
</group>

<node pkg="eagleye_rt" name="monitor" exec="monitor">
<param from="$(var config_path)"/>
<param name="yaml_file" value="$(var config_path)"/>
</node>
<include file="$(var directory_with_related_launches)/gnss_converter.launch.xml">
<arg name="config_path" value="$(var config_path)"/>
</include>

</group>

<group if="$(var use_eagleye_pose)">
<include file="$(var directory_with_related_launches)/fix2pose.launch.xml">
<arg name="output_pose_with_cov_name" value="$(var output_pose_with_cov_name)"/>
</include>
</group>

</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>

<launch>
<arg name="output_pose_with_cov_name" default="/localization/pose_estimator/pose_with_covariance"/>
<node pkg="eagleye_fix2pose" name="fix2pose_node" exec="fix2pose">
<!-- /eagleye/fix or /GNSS/fix(GNSS pose only mode)-->
<remap from="eagleye/fix" to="eagleye/fix" />
<remap from="eagleye/pose_with_covariance" to="$(var output_pose_with_cov_name)"/>
<!-- plane rectangular coordinate number -->
<param name="plane" value="7"/>
<!-- 1 : plane rectangular coordinate 2 : MGRS -->
<param name="tf_num" value="2"/>
<!-- 0 : No convert 1 : ellipsoid -> altitude 2 : altitude -> ellipsoid -->
<param name="convert_height_num" value="0"/>
<!-- 0 : EGM2008-1 1 : Japanese Geoid 2011 Ver2.1 -->
<param name="geoid_type" value="1"/>

<param name="parent_frame_id" value="map"/>
<param name="child_frame_id" value="eagleye_base_link"/>
<param name="base_link_frame_id" value="base_link"/>
<param name="gnss_frame_id" value="gnss_link"/>

<param name="fix_only_publish" value="false"/>
<!-- 0:fix.status 1:fix.position_covariance[0] (if fix_only_publish==true)-->
<param name="fix_judgement_type" value="0"/>
<!--Fix status(if fix_judgement_type is 0)-->
<param name="fix_gnss_status" value="0"/>
<!-- Minimum covariance of the pose topics to be published(if fix_judgement_type is 0)-->
<param name="fix_std_pos_thres" value="0.1"/>


</node>

</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<launch>

<arg name="config_path"/>

<group>
<push-ros-namespace namespace="gnss"/>
<node pkg="eagleye_gnss_converter" name="gnss_converter_node" exec="gnss_converter">
<param from="$(var config_path)"/>
</node>
</group>

</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<launch>
<group>
<include file="$(find-pkg-share map4_localization_launch)/eagleye_pose_twist_localization_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"/>
</include>
</group>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<launch>
<!-- pose_initializer -->
<group>
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
<arg name="common_config_file" value="$(var pose_initializer_common_param_path)"/>
<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>

<!-- pose_initializer (Automatic call from AD API) -->
<group>
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>

</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<launch>
<!-- 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"/>
<arg name="ndt_scan_matcher_param_path"/>
<arg name="localization_error_monitor_param_path"/>
<arg name="ekf_localizer_param_path"/>
<arg name="pose_initializer_param_path"/>
<arg name="pose_initializer_common_param_path"/>
<arg name="eagleye_param_path"/>

<arg name="input/pointcloud" default="/sensing/lidar/top/outlier_filtered/pointcloud" description="The topic will be used in the localization util module"/>
<arg name="use_pointcloud_container" default="true" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>

<!-- localization module -->
<group>
<push-ros-namespace namespace="localization"/>
<!-- util module -->
<group>
<push-ros-namespace namespace="util"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
</include>
</group>
<!-- pose_estimator module -->
<group>
<push-ros-namespace namespace="pose_estimator"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_estimator/pose_estimator.launch.xml"/>
</group>
<!-- twist_estimator module -->
<group>
<push-ros-namespace namespace="twist_estimator"/>
<include file="$(find-pkg-share map4_localization_launch)/eagleye_twist_localization_launch/twist_estimator/twist_estimator.launch.xml"/>
</group>
<!-- pose_twist_fusion_filter module -->
<group>
<push-ros-namespace namespace="pose_twist_fusion_filter"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml"/>
</group>
<!-- localization_error_monitor_module -->
<group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/localization_error_monitor/localization_error_monitor.launch.xml"/>
</group>
</group>
</launch>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading