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

BSM generator is failing to generate valid BSM #2402

Open
MishkaMN opened this issue Jun 10, 2024 · 1 comment
Open

BSM generator is failing to generate valid BSM #2402

MishkaMN opened this issue Jun 10, 2024 · 1 comment
Labels
anomaly Something isn't working

Comments

@MishkaMN
Copy link
Contributor

MishkaMN commented Jun 10, 2024

Summary

For some runs BSM was not able to be encoded. The issue is intermittent, but sometimes happens a lot to make BSM unusable.
I have seen the issue in simulation where the vehicle did not move at all. It suddenly started not being able to encode BSM, which the log shows failure to create projection from x,y.z to lat and lon that's needed in BSM. See below picture:

image

And also I noticed this issue in real life vehicle where BSM's lat lon comes out wrong intermittently:

good:
image
few sec later where vehicle didn't move, bsm id not changed (because configured to be fixed):
image

This is most likely occurring from constantly recreating projector because the georeference msg is being published at some rate and there is a race condition occurring:

  void BSMGenerator::georeferenceCallback(const std_msgs::msg::String::UniquePtr msg)
  {
    // Build projector from proj string
    map_projector_ = std::make_shared<lanelet::projection::LocalFrameProjector>(msg->data.c_str());
  }

NOTE:
It probably didn't have issue in ROS1 because we had 0.5hz as publication before. But ROS2 migration made it 2hz (every 500ms), which also probably should be reverted back:
ROS1:
https://github.com/usdot-fhwa-stol/autoware.ai/blob/carma-system-4.1.0/common/map_file/nodes/map_param_loader/map_param_loader.cpp#L98
ROS2:
https://github.com/usdot-fhwa-stol/autoware.ai/blob/carma-system-4.5.0/common/map_file_ros2/nodes/map_param_loader/map_param_loader.cpp#L63

Version

4.5.0 (Current)

Expected Behavior

BSM is able to be encoded

Actual Behavior

BSM not encodeable

Steps to Reproduce the Actual Behavior

Start carma and wait for logs to start saying not able to encode BSM.
Issue is intermittent.
Perhaps it will occur more on PC that has less power.

Related Work

No response

@MishkaMN MishkaMN added the anomaly Something isn't working label Jun 10, 2024
@MishkaMN
Copy link
Contributor Author

Turning the georeference broadcast back to 2Hz actually makes the startup process little unstable where platform shuts down soon after startup. This is because when some data is broadcasting such as MAP, the node may not have georeference when it is instructed to process it. Then the common handling method looks like just throw an exception. Instead, the callers probably need to handle the exception gracefully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anomaly Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant