nbatfai / robocar-emulator

Robocar World Championship (OOCWC) is intended to offer a common research platform for developing urban traffic control algorithms and for investigating the relationship between smart cities and robot cars with particular attention to spread of robot cars of the near future. At the heart of this initiative is the Robocar City Emulator. It will enable researchers to test and validate their theories and models.
9 stars 69 forks source link

Client-side gangster identification is impossible #4

Open battila7 opened 9 years ago

battila7 commented 9 years ago

First of all, I'm not sure if this is a real issue or not.

Issue description On the client-side (myshmclient) we have a struct called SmartCar (with the alias of Gangster) which has a member called id. I thought that this stores the unique server-side ID of a gangster, but I was wrong. When the server is ordered to send the gangsters' data to a client (traffic.cpp from line 214) it sends back the return value of the cl.get_id() but I think it would be more useful if it sent back the ID of the gangster car in the m_smart_cars_map. Currently it is impossible (on client-side) to track each gangster uniquely by their IDs. I find this a serious issue.

Use case I tried to implement an algorithm which pairs gangsters with cop cars. A cop car would chase the same gangster until it's caught. As I mentioned above, I can't implement this behavior since on client-side there's no way to uniquely identificate the gangsters between gangsters function calls.

battila7 commented 9 years ago

Hotfix: https://gist.github.com/battila7/14896268411a85bfb899