intel / ad-rss-lib

Library implementing the Responsibility Sensitive Safety model (RSS) for Autonomous Vehicles
https://intel.github.io/ad-rss-lib/
GNU Lesser General Public License v2.1
336 stars 138 forks source link

nuScenes data compatibility #178

Closed samueleruffino99 closed 6 months ago

samueleruffino99 commented 6 months ago

Hello, I was wondering whether your tool could work with nuScenes dataformat as well, or in case not if you know some conversion tools that can be used toward this goal. Thanks !!

berndgassmann commented 6 months ago

Hi, in general these libraries require the current state of the situation the vehicles are in. For full support you have to know the map data with it's lane representation. If you don't have this you should still be able to apply some of the formulars directly to calculate the RSS desired safety distances -- given that the situation is taking place on a straight road, at least. nuScenes is recorded in U.S. isn't it? So at least most of the scenes should take place on straight roads ;-). What you need at bare minimum is the relative position between two vehicles and their current 4D (x,y,z, yaw) velocity vectors. If nuScenes provides 3D-bounding boxes of the vehicles in world coordinates, you should be able to derive that data easily. If not ... hmm, then you need a detector and tracker to calculate that data on your own (or by any algorithm out there that is doing that in at least a meaningful way). I hope the neScenes data-set provides also consecutive frames of a scene and not only single shot recordings at switching places; otherwise the RSS evaluation might become less helpful. On single shot is is only able to tell you if the current situation is safe or not; it will not be able to tell who of the cars is the responsible one and who would have to break. Especially you should then reset the states (destroy the RSS objects and create new ones) when you encounter time jumps. As said, the decision on how to react for the vehicles depends on how the situation evolved over time. I.e. whose action was responsible for entering the unsafe state -> that actor will then have to stop that action by braking either longitudinally or e.g. interrupt its lane change when entering the unsafe state while driving side-by-side. For sure the intersection evaluations only work with map data in the supported map format... open drive. I hope this provides a notion of what might be possible and which effort you would have to take to apply it. Regards, Dr.-Ing. Bernd Gaßmann.