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

gnss_poser fails to get antenna position from base_link in sample data. #6108

Closed
3 tasks done
KYabuuchi opened this issue Jan 18, 2024 · 1 comment · Fixed by #6116
Closed
3 tasks done

gnss_poser fails to get antenna position from base_link in sample data. #6108

KYabuuchi opened this issue Jan 18, 2024 · 1 comment · Fixed by #6116
Assignees
Labels
component:localization Vehicle's position determination in its environment. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned)

Comments

@KYabuuchi
Copy link
Contributor

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

When I run the rosbag-replay-simulation in tutorial, gnss_poser outputs the following warning.

[gnss_poser-32] [WARN 1705543736.053584803] [sensing.gnss.gnss_poser]: "gnss" passed to lookupTransform argument source_frame does not exist.
[gnss_poser-32] [WARN 1705543736.053649454] [sensing.gnss.gnss_poser]: Please publish TF base_link to gnss

Expected behavior

The gnss_poser successfully gets the antenna position from base_link. And it does not output warnings.

Actual behavior

[gnss_poser-32] [WARN 1705543736.053584803] [sensing.gnss.gnss_poser]: "gnss" passed to lookupTransform argument source_frame does not exist.
[gnss_poser-32] [WARN 1705543736.053649454] [sensing.gnss.gnss_poser]: Please publish TF base_link to gnss

Steps to reproduce

Just run the rosbag-replay-simulation in tutorial.

Versions

No response

Possible causes

The warning is printed from

try {
*transform_stamped_ptr = tf2_buffer_.lookupTransform(
target_frame, source_frame,
tf2::TimePoint(std::chrono::seconds(stamp.sec) + std::chrono::nanoseconds(stamp.nanosec)));
} catch (tf2::TransformException & ex) {
RCLCPP_WARN_STREAM_THROTTLE(
this->get_logger(), *this->get_clock(), std::chrono::milliseconds(1000).count(), ex.what());
RCLCPP_WARN_STREAM_THROTTLE(
this->get_logger(), *this->get_clock(), std::chrono::milliseconds(1000).count(),
"Please publish TF " << target_frame.c_str() << " to " << source_frame.c_str());
transform_stamped_ptr->header.stamp = stamp;
transform_stamped_ptr->header.frame_id = target_frame;
transform_stamped_ptr->child_frame_id = source_frame;
transform_stamped_ptr->transform.translation.x = 0.0;
transform_stamped_ptr->transform.translation.y = 0.0;
transform_stamped_ptr->transform.translation.z = 0.0;
transform_stamped_ptr->transform.rotation.x = 0.0;
transform_stamped_ptr->transform.rotation.y = 0.0;
transform_stamped_ptr->transform.rotation.z = 0.0;
transform_stamped_ptr->transform.rotation.w = 1.0;
return false;
}

There are two main reasons.:

  1. The default values of gnss_link in the gnss_poser config of the autoware.universe is gnss. LINK
    On the other hand, the default values of gnss_link in the sample_sensor_kit and awsim_sensor_kit are set to gnss_link.

  2. While some sensor_kit_launch files pass gnss_link as an argument, the gnss_poser launch file does not receive it. As a result, the gnss_link specified in the param.yaml of gnss_poser is loaded by the node. LINK1 LINK2

Consequently, the gnss_poser cannot get the coordinate transformation between base_link and gnss_link (antenna position), treating it as an identity transformation (interpreting that the antenna is located at the position of base_link).

However, this is not a critical issue as it is only used as the starting point for the initial position estimation of NDT.

Additional context

@KYabuuchi is going to fix this.

@KYabuuchi KYabuuchi added component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) labels Jan 18, 2024
@KYabuuchi KYabuuchi self-assigned this Jan 18, 2024
@KYabuuchi
Copy link
Contributor Author

The simplest solution is to change the default gnss_frame from gnss to gnss_link. Because in most sensor_kits the antenna position is named as gnss_link.

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) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant