autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
967 stars 631 forks source link

The tf published by `gnss_poser` competes with the one from `ndt_scan_matcher` and it creates a wrong tf structure tree as base_link has two parents. #6677

Closed marioney closed 5 months ago

marioney commented 6 months ago

Checklist

Description

The gnss_poser package broadcasts a tf between map_frame and base_frame tf in https://github.com/autowarefoundation/autoware.universe/blob/b44fb2014d241e656a56c0cf8d848866b33bd8b3/sensing/gnss_poser/src/gnss_poser_core.cpp#L196 and https://github.com/autowarefoundation/autoware.universe/blob/b44fb2014d241e656a56c0cf8d848866b33bd8b3/sensing/gnss_poser/src/gnss_poser_core.cpp#L376

When I use this package in combination with ndt_scan_matcher to give an initial position or to use the regularization option, the result is a duplicate of the tf between base_frame and map, one published by ndt_scan_matcher and the other by gnss_poser

If I use a different value for the map_frame parameter of gnss_poser then base_frame will have two parents and yield an unvalid tf tree structure.

Expected behavior

gnss_poser package should only broadcast this tf if explicitly required by the user via a ros param.

Actual behavior

As describe above, gnss_poser package broadcast this tf all the time.

Steps to reproduce

  1. Configure and run gnss_poser
  2. Run autoware using ndt as option for pose localization (Default)

Versions

Possible causes

No response

Additional context

This is a duplicate of #6676 (now closed) which was created Originally created from a post in a discussion https://github.com/orgs/autowarefoundation/discussions/4088#discussioncomment-8875963

YamatoAndo commented 6 months ago

base_link frame and map frame are directly connected.

Screenshot from 2024-03-25 15-31-47

marioney commented 6 months ago

Thanks for the response.

Can you please share your gnss_poser configuration file?

I see a gnss_base_link frame I your tf tree, is it configured in there?

YamatoAndo commented 6 months ago

Yes, I have configured gnss_base_link, just like in the latest Autoware. https://github.com/autowarefoundation/autoware.universe/blob/3683131483dfdfc14f1490cb061c3589701a53ea/sensing/gnss_poser/config/gnss_poser.param.yaml

marioney commented 6 months ago

But then I have two questions:

  1. What's the relationship between gnss_base_link and base_link?
  2. Why do you set the gnss_base_frame to gnss_base_link and not gnss_link which is what's set on the sensor_kit_description

I think the tf between map and gnss_base_link is not needed, because gnss_base_link should be on-board the vehicle, and therefore have a static tf to base_link.

YamatoAndo commented 6 months ago

What's the relationship between gnss_base_link and base_link?

It's the estimated position of the base_link based on GNSS localization.

Why do you set the gnss_base_frame to gnss_base_link and not gnss_link which is what's set on the sensor_kit_description

"gnss_link" refers to the antenna position of the GNSS receiver.

YamatoAndo commented 6 months ago

@marioney Has your question been resolved?

YamatoAndo commented 5 months ago

@marioney There is no problem in this report. So I'll close it. Feel free to report anything else if needed.

Yaoye1120 commented 3 months ago

base_link frame and map frame are directly connected.

Screenshot from 2024-03-25 15-31-47

@YamatoAndo hello, in this tf tree figure, which component published the tf from gnss_base_link to base_link ? I have launched gnss_poser.launch.xml, but terminator displays that "Please publish TF gnss_base_link to base_link" Sincerely !