How to implement a virtual sensor in Torcs?

Anand Madhusoodanan <[email protected]>
Newsgroups gmane.games.torcs.general
Message-ID <CAF=pQxKYe=TkoVGnGghpb5=v-x2vOuMtaiFE8-b=JjSt1vinsQ@mail.gmail.com>
Hi,
     I am using Torcs as part of a project , where i have to add two robots
and implemente Adaptive Cruise Control based on the distance between the
two robots in Torcs. As of now, i calculate the distance between the two
cars, by finding the difference between the distance covered by the two
cars, for every simulation time step. This is somewhat of a "near perfect"
implementation and not how it works in real world cars which use a radar
sensor to detect obstacles in front and adapt accordingly.

Is there a way to implement a virtual sensor in Torcs, say something that
works like a Radar(used in real cars) or say a ping sensor for a demo
model? Basically, I am looking at  a sensor implementation in software or
maybe even some available code that models a sensor that i can interface
with Torcs.

For e.g., if a car in front is going over a curve on the road, it may go
out of the range of view of my radar sensor . When both cars are on a
straight road and on same lanes, the virtual sensor gets the correct
reading and implements ACC. If there a lane change by the car in front,
then the sensor detects that there is no obstacle in front and can speed up.


Is there a way to progmmatically implement such a sensor behaviour in Torcs
? Has anyone done something like this in Torcs or knows of something that
will work in my case? Please provide any suggestions and ideas that come to
mind.


Regards,
Anand.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov

_______________________________________________
Torcs-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.