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

Map Based Prediction Incorrect Predictions #494

Closed
08beeqtufail-sudo opened this issue Mar 7, 2022 · 28 comments
Closed

Map Based Prediction Incorrect Predictions #494

08beeqtufail-sudo opened this issue Mar 7, 2022 · 28 comments
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) status:stale Inactive or outdated issues. (auto-assigned) type:bug Software flaws or errors.

Comments

@08beeqtufail-sudo
Copy link

Hello Everyone,
I am testing the proposed map based prediction with some of the bag files and a map that I have at my disposal. I am facing the problem that the map_based_prediction outputs some strange trajectories (e.g, a trajectory going backwards for an object moving straight in its lane etc...) .After digging in the code a little bit, i can see that the condition to check whether to do a linear prediction or the normal prediction is decided based only on the object velocity x component (object.kinematics.twist_with_covariance.twist.linear.x) . But an object's velocity in map frame is not only x component. So i would like to know the rationale behind this. Thank you for your time and great work.
Regards,
M.Tufail

satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this issue Mar 14, 2022
* Ros2 v0.8.0 object range splitter (autowarefoundation#306)

* Fix typo in perception module (autowarefoundation#440)

* add use_sim-time option (autowarefoundation#454)

* Unify Apache-2.0 license name (autowarefoundation#1242)

* Remove use_sim_time for set_parameter (autowarefoundation#1260)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Perception components (autowarefoundation#1368)

* [bev_optical_flow]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [object_merger]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [object_range_splitter]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [shape_estimation]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [map_based_prediction]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [naive_path_prediction]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [roi_image_saver]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [lidar_apollo_instance_segmentation]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [object_flow_fusion]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [traffic_light_map_based_detector]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [dynamic_object_visualization]: component node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix typo

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix -Wunused-parameter (autowarefoundation#1836)

* Fix -Wunused-parameter

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix mistake

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>

* Detection by tracker (autowarefoundation#1910)

* initial commit

* backup

* apply format

* cosmetic change

* implement divided under segmenterd clusters

* cosmetic change

* bug fix

* bug fix

* bug fix

* modify launch

* add debug and bug fix

* bug fix

* bug fix

* add no found tracked object

* modify parameters and cmake

* bug fix

* remove debug info

* add readme

* modify clustering launch

* run pre-commit

* cosmetic change

* cosmetic change

* cosmetic change

* apply markdownlint

* modify launch

* modify for cpplint

* modify qos

* change int to size_T

* bug fix

* change perception qos

* Update perception/object_recognition/detection/detection_by_tracker/package.xml

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* cosmetic change

* cosmetic change

* fix launch

* Update perception/object_recognition/detection/detection_by_tracker/src/utils.cpp

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* modify header include order

* change include order

* Update perception/object_recognition/detection/detection_by_tracker/src/detection_by_tracker_core.cpp

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* change to std::optional

* cosmetic change

* Update perception/object_recognition/detection/detection_by_tracker/src/detection_by_tracker_core.cpp

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* Update perception/object_recognition/detection/detection_by_tracker/src/detection_by_tracker_core.cpp

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* bug fix

* modify readme

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* Change formatter to clang-format and black (autowarefoundation#2332)

* Revert "Temporarily comment out pre-commit hooks"

This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3.

* Replace ament_lint_common with autoware_lint_common

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply Black

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add COLCON_IGNORE (autowarefoundation#500)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* port object range splitter (autowarefoundation#494)

* change autoware_perception_msgs to autoware_auto_perception_msgs

* delete COLCON_IGNORE

* use changed autoware_auto_perception_msgs (autowarefoundation#546)

* add README of object_range_splitter (autowarefoundation#592)

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>
Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
@yukkysaito
Copy link
Contributor

@08beeqtufail-sudo
Thanks for the report.

We are currently working on a major revision and may be able to cure it there.

https://github.com/autowarefoundation/autoware.universe/pull/491/files

@08beeqtufail-sudo
Copy link
Author

@yukkysaito Thanks for your reply. I am following the repository you mentioned for future updates.

@BonoloAWF BonoloAWF added the type:bug Software flaws or errors. label Apr 19, 2022
@mitsudome-r
Copy link
Member

@08beeqtufail-sudo It seems like the PR mentioned by @yukkysaito is merged. Could you check if the issue still remains? If it still does, please provide a reproducing steps (or a rosbag) so that others can investigate the bug.

@08beeqtufail-sudo
Copy link
Author

@mitsudome-r I am currently working on another project but i will test it within a couple of days and let you know.

@08beeqtufail-sudo
Copy link
Author

@mitsudome-r @yukkysaito I was able to test the latest map_based_prediction with some bag files. I still have the same problem. I can see in the code that the part that decides whether to do linear prediction or normal prediction still checks the x component of twist of an object. But the tracked objects in my custom bag files are in map_frame. So the objects have a x velocity part and a y velocity part. So the speed of an object should be calculated based on both of these components. The decision to do linear prediction or not, should be based on this speed and not just x-component?
It is worth mentioning that the tracked objects i have in my bag file are coming from an independent perception module, not from the autoware.universe perception module. I just adapt the format in order to use with map_based_prediction module of autoware.universe.
So it is entirely possible that the tracked objects given by autoware.universe perception module only have x components, in that case, using only the x-component of velocity makes sense.

@xmfcx
Copy link
Contributor

xmfcx commented May 17, 2022

@08beeqtufail-sudo could you send some visuals, images/short videos of the issue? It'd help us to understand the actual problem and help in the solving process.

@08beeqtufail-sudo
Copy link
Author

Hello @xmfcx ,
Below you will find some of the images from the prediction failure described above. The red-colored rectangle is the object in question, for which the predictions are wrong. Note that this is a right-hand traffic scenario, similar to european countries. I have investigated the problem, some of the problems come from the fact that the estimated velocity is not stable in my case.
But another problem is that the map_based prediction performs a linear prediction based on whether an object's x velocity is less than a certain threshold, which in my case is not a good enough criteria. Because the objects have celocities in map frames and performing linear prediction based on x component value is not sufficient.
modified_Screenshot from 2022-05-23 17-49-09
modified_Screenshot from 2022-05-23 17-48-23
modified_Screenshot from 2022-05-23 17-47-56
modified_Screenshot from 2022-05-23 17-35-39

@mitsudome-r
Copy link
Member

@miursh @yukkysaito do you have any comment on this?

@mitsudome-r
Copy link
Member

@miursh @yukkysaito friendly ping

@mehmetdogru
Copy link
Contributor

Myself also facing this issue while #566

While I test UC-PB-008-0001_20_20-Shalun scenario observed some wrong map based predictions for NPCs when they are turning around the roundabout. Here you can see the video.

And this causes some serious issues since vehicle is not able to cross the intersection because of the wrong predicted paths.

@mitsudome-r
Copy link
Member

@kaancolak Would be looking into this issue as well.

@kaancolak kaancolak self-assigned this Jun 21, 2022
@mehmetdogru
Copy link
Contributor

mehmetdogru commented Jul 4, 2022

@kaancolak

Another input:

map_based_prediction node crashes most of the time while testing UC-PB-008-0001... scenarios with 7593c2b

[openscenario_interpreter_node-3] [map_based_prediction-34] terminate called after throwing an instance of 'std::length_error'
[openscenario_interpreter_node-3] [map_based_prediction-34]   what():  Exceeded upper bound
[openscenario_interpreter_node-3] [ERROR] [map_based_prediction-34]: process has died [pid 530007, exit code -6, cmd '/home/md/projects/autoware/install/map_based_prediction/lib/map_based_prediction/map_based_prediction --ros-args -r __node:=map_based_prediction -r __ns:=/perception/object_recognition/prediction --params-file /tmp/launch_params_w6aapmdb --params-file /home/md/projects/autoware/install/map_based_prediction/share/map_based_prediction/config/map_based_prediction.param.yaml -r objects:=/perception/object_recognition/objects -r /vector_map:=/map/vector_map -r objects:=/perception/object_recognition/objects'].

@xmfcx xmfcx added this to the Bus ODD Sep-Oct Milestone milestone Jul 19, 2022
@xmfcx xmfcx added the priority:high High urgency and importance. label Jul 19, 2022
@xmfcx xmfcx assigned angry-crab and unassigned kaancolak and miursh Jul 19, 2022
@xmfcx xmfcx moved this to Todo in Bus ODD Project Jul 26, 2022
@angry-crab
Copy link
Contributor

angry-crab commented Aug 1, 2022

@08beeqtufail-sudo
Hi, thank you for the information. I was wondering if it was possible for you to provide your test data(ros2bag, pcd, lanelet map, and parameter setting).
We will discuss with perception team to identify the correct output in these cases(I guess the predicated path should stay inside lanelet components).

@xmfcx
Copy link
Contributor

xmfcx commented Aug 9, 2022

@08beeqtufail-sudo ping.

@xmfcx
Copy link
Contributor

xmfcx commented Aug 16, 2022

@08beeqtufail-sudo could you provide test data so that we can reproduce the issue?

@08beeqtufail-sudo
Copy link
Author

@xmfcx , @angry-crab sorry for the delay. I was off for a couple of weeks. I will soon provide you with the test data.

@mitsudome-r
Copy link
Member

@08beeqtufail-sudo Will you be able to share the data?

@08beeqtufail-sudo
Copy link
Author

@mitsudome-r yes i will share the data, but it might take a couple of days. I will try to do it today, but i don't guarantee it.

@08beeqtufail-sudo
Copy link
Author

08beeqtufail-sudo commented Sep 5, 2022

@mitsudome-r @xmfcx , After having consulted with my project partners, at this stage, we feel that providing the rosbag and lanelet2 map might be an overkill. As i have earlier explained in my post, the problem is correctly identified. The fact that our perception and tracking system is different than that of autoware.universe, means we have x-velocity and y-velocity components of the tracked or detected objects. While in autoware.universe simulation, that's not the case. When i test the autoware.universe simulation, there's no problem. But when i test the autoware.universe planning with our own perception system, that's when the problem arises.
The data we have at our disposal in the bag files or the lanelet2 map, is confidential. Hence i am available if you have any further questions or require any other information. Thank you for your cooperation.
Regards,
M. Tufail

@simon-t4
Copy link
Contributor

Hi ,if I understand correctly, the problem lies in the confusing the twist coordinate frame.
The original Autoware publishes predicted objects using an object centric frame, while this issue describes a perception system where the predicted path is in map frame.

The ROS twist message is I think defined with linear and angular components rather than x,y of a map frame.
The velocity is meant to be independent of pose of object so an object centric frame is preferred.

A simple fix would be for the perception system described to convert x,y components into linear and angular components needed by Autoware (and consistent with ROS message definition) and perhaps publish the two messages as different topics (if x,y frame needed by other components).

tkimura4 referenced this issue in tier4/autoware.universe Oct 24, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@mitsudome-r
Copy link
Member

From ASWG:

  • @xmfcx and @mitsudome-r agree to use object centric frame for velocity expression
  • We still need to update/improve prediction module so that it fills in y component as necessary depending on detected velocity.

@angry-crab angry-crab removed their assignment Nov 1, 2022
@xmfcx xmfcx added core and removed priority:high High urgency and importance. labels Nov 1, 2022
@xmfcx
Copy link
Contributor

xmfcx commented Nov 1, 2022

We will consider this feature while refactoring for the core architecture.

@BonoloAWF BonoloAWF removed this from the Bus ODD Sep-Oct Milestone milestone Nov 2, 2022
@BonoloAWF
Copy link

Noted. Removed from Bus ODD Milestone and Project.

@stale
Copy link

stale bot commented Jan 2, 2023

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Jan 2, 2023
@xmfcx xmfcx added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Apr 24, 2023
@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Apr 24, 2023
@xmfcx xmfcx added status:stale Inactive or outdated issues. (auto-assigned) and removed core labels Apr 24, 2023
@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Apr 24, 2023
dmoszynski pushed a commit to RobotecAI/autoware.universe that referenced this issue Jun 22, 2023
@stale
Copy link

stale bot commented Jun 23, 2023

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Jun 23, 2023
keiota pushed a commit to keiota/autoware.universe that referenced this issue Aug 17, 2023
kyoichi-sugahara pushed a commit that referenced this issue Sep 16, 2023
Signed-off-by: GitHub <noreply@github.com>

Co-authored-by: kenji-miyake <kenji-miyake@users.noreply.github.com>
Copy link

stale bot commented Nov 3, 2023

This pull request has been automatically marked as stale because it has not had recent activity.

HansOersted pushed a commit to HansOersted/autoware.universe that referenced this issue Mar 8, 2024
* Update repos files

* chore: update ecu_system_setup

---------

Co-authored-by: GitHub Actions <actions@example.com>
Co-authored-by: Shinnosuke Hirakawa <shinnosuke.hirakawa@tier4.jp>
@vividf
Copy link
Contributor

vividf commented Aug 27, 2024

I will close this issue since it is stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) status:stale Inactive or outdated issues. (auto-assigned) type:bug Software flaws or errors.
Projects
No open projects
Development

No branches or pull requests