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

How to run the Yabloc localization #10275

Open
3 tasks done
GPrathap opened this issue Mar 14, 2025 · 11 comments
Open
3 tasks done

How to run the Yabloc localization #10275

GPrathap opened this issue Mar 14, 2025 · 11 comments
Labels
component:localization Vehicle's position determination in its environment. (auto-assigned)

Comments

@GPrathap
Copy link

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

Contents

I want to run the Yabloc localization

Instructions provided here: https://autowarefoundation.github.io/autoware.universe/main/localization/yabloc/ seems to be wrong,

I've found another bag file: nishishinjuku_autoware_map

Expected behavior

But I can't see the vehicle moving. :) Could someone please tell me what steps I need to take to get Yabloc working?

I built the autoware docker image based on autoware-nightly.repos

Actual behavior

Could not produce result as https://autowarefoundation.github.io/autoware.universe/main/localization/yabloc/

Steps to reproduce

ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$AUTOWARE_HOME/autoware_map/nishishinjuku_autoware_map vehicle_model:=sample_vehicle sensor_model:=awsim_sensor_kit pose_source:=yabloc

Then I ran this bag file:

ros2 bag play /home/autoware/data/autoware_map/sample_bag/yabloc/input_bag

Versions

Ubuntu 22.04 + ROS2 humble

Possible causes

No response

Additional context

No response

@YamatoAndo YamatoAndo added the component:localization Vehicle's position determination in its environment. (auto-assigned) label Mar 17, 2025
@YamatoAndo
Copy link
Contributor

@YamatoAndo
Copy link
Contributor

@KYabuuchi Could you answer this issue?

@KYabuuchi
Copy link
Contributor

@GPrathap Hi. Which ROSBAG are you using?

There are several public ROSBAG available for running YabLoc:

  1. ROSBAG from Arbiter README
  2. ROSBAG from Driving Log Replayer

Please note that some public ROSBAGs are outdated due to updates in Autoware msg types.
For example, Obsolete ROSBAG (linked from the yabloc introducing PR)

Since the maps are compatible, you can use any of nishishinjuku map.


Also, please verify that the ROSBAG contains the /clock message.
If it does not, make sure to play the ROSBAG with the --clock option:

rosbag play your_rosbag.bag --clock

Some public ROSBAGs include /clock , while others do not.

@shpark98
Copy link

@KYabuuchi

I'm trying to run YabLoc in a real-world environment.

Does the PCD map need to include GPS information?

Since I'm planning to proceed without LiDAR, I'm curious about how YabLoc determines or matches the initial position.

@GPrathap
Copy link
Author

Hi @KYabuuchi ,

Finally, these two commands work:

ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$AUTOWARE_HOME/autoware_map/nishishinjuku_autoware_map vehicle_model:=sample_vehicle sensor_model:=awsim_sensor_kit control:=false planning:=false pose_source:=yabloc

ros2 bag play ~/autoware_map/sample_bag/yabloc/input_bag --clock

Maybe update https://autowarefoundation.github.io/autoware.universe/main/localization/yabloc/ so that someone can run it without any problem , thank youuu

@KYabuuchi
Copy link
Contributor

@shpark98 YabLoc determines its initial position using GNSS and estimates orientation by matching semantic segmentation results with a vector map.
Without GNSS, the initial position cannot be automatically determined.

In environments where GNSS is unavailable, such as indoors, global coordinate information in the PCD is not necessary.
In such cases, GNSS-based position correction and automatic initial position estimation is not available.

If you plan to use it outdoors, I recommend creating the PCD in a global coordinate system.
For example, the sample data I am proposing in this thread uses global coordinates (MGRS).

@shpark98
Copy link

Thanks for your reply @KYabuuchi

I understand that using GNSS as the initial position means comparing the current GNSS location with something.
Is my understanding correct?

If so, does the GNSS information exist within the point cloud itself?
Or is it embedded in the vector map created by the vector map builder?

@KYabuuchi
Copy link
Contributor

@shpark98 GNSS positions are not compared to anything. Autoware projects the latitude and longitude output by GNSS into local coordinates using the specified projection type.

Autoware supports several projection methods for converting latitude/longitude to local coordinates, and this page provides detailed information.
For example, if using MGRS, latitude = 36° and longitude = -115° would be projected to 11SPV 67305, 97905.

If you use the MGRS projection type, you need to create the PCD's x, y coordinates in the MGRS XXXXX, YYYYY coordinate system.

Image

@shpark98
Copy link

@KYabuuchi I'm glad given image helped. Your answers have been extremely helpful!

So, if you transform the origin of the PCD map based on the MGRS information, the GNSS data will be aligned with the PCD map, allowing you to use GNSS within Autoware.

This is just a personal curiosity, but do you know the approximate error if I only connect GNSS to Autoware without using Yabloc?
And if the vector map only contains roads without additional information like traffic lights, can Yabloc still function properly?

@KYabuuchi
Copy link
Contributor

KYabuuchi commented Mar 18, 2025

@shpark98

t do you know the approximate error if I only connect GNSS to Autoware without using Yabloc?

I'm not sure.

if the vector map only contains roads without additional information like traffic lights, can Yabloc still function properly?

Since YabLoc relies on road markings, information other than the road surface is unnecessary.
YabLoc functions even if the map does not include traffic signals.

@GPrathap
Copy link
Author

GPrathap commented Mar 19, 2025

Hi @KYabuuchi ,

I have a question regarding how to build a cost map,

  1. It uses line detection on the image and gets the point cloud whose unit is pixles

https://github.com/autowarefoundation/autoware_universe/blob/main/localization/yabloc/yabloc_particle_filter/src/camera_corrector/camera_particle_corrector_core.cpp#L60

  1. Lanelet extraction of lane marking are in the actual coordinate system,

https://github.com/autowarefoundation/autoware_universe/blob/main/localization/yabloc/yabloc_particle_filter/src/camera_corrector/camera_particle_corrector_core.cpp#L62

Questions:

  1. I don't have Lanelet2 format, but a different representation, i,e., it has one big point cloud (2d), that I can project in the image plane and then extract lane marking in the image plane. Is it okay to use the same approach that "line detection on the image" uses to generate cloud and pass, without replay on actual coordinates? Can I know what kind of modification I have to do HierarchicalCostMap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:localization Vehicle's position determination in its environment. (auto-assigned)
Projects
Status: To Triage
Development

No branches or pull requests

4 participants