Hello Brent,

 

in fact the TORCS and Speed-Dreams interface for drivers (robots or human) is implemented by just load a dynamic link library that exports a low number of functions.

 

While race it is just one function called “drive”. For human drivers the information is taken from the screen, so the parameters this function gets from the simulation is not a topic here. The result from the “driver” is a small set of commands, the throttle position (accel: 0..1), brake position(brake: 0..1), clutch position (clutch: 0..1), steering wheel position(steer: -1..+1) and the gear (gear: [Integer Index of Revers, Neutral, First, …, Last].

 

That’s all.

 

The interpretation of the driver commands is done by the simulation based on the car data (setup as xml files).

 

So to have a remote driver you would have to just implement such a dynamic link library getting the data from the equipment (keyboard; mouse, steer wheel, …, other devices you want to use;) and translate it into the basic commands (accel, brake, clutch, steer, gear).

As template you could use the human driver used for the standard game.

 

BUT what you need to implement the real drivers car in the simulation you need to modify the simulation itself to allow to overwrite the calculated data (position/direction/speed of the car).  At the moment such an interface is not implemented. Keep in mind that for the real world car the calculation of the forces is not needed, only the position/direction/speed at each timestep.

 

TORCS and Speed dreams are able to load a simulation engine. This way you could use a modified simulation that has a new interface for getting real time data from real world cars.

 

Speed dreams also can load a race manager engine (one is the standard game and the other is for genetic optimization of setup parameters).

So it would be possible to add features for setting up the devices for data import here without changing the standard race manager. The benefit would be, that you  would be able to use it in parallel and would not have to implement all your changes again and again for each new version of the standard game.

 

The core requirements are the real time data acquisition, the simulation is done at 500 Hz, while the robot/human driver interface is called with 50 Hz.

 

Assuming that the “virtual” driver is watching the race at his screen as rendered simulation output, it would be possible to have a buffer that makes it less critical to get the data in time without gaps (Watching the race at TV would not allow to use a buffer).

 

Assuming that the virtual drivers are connected to the simulation computer, it should be possible to implement such a system without too much issues. Using a remote connection for the virtual driver would raise a lot of issues (Latency, …).

 

And there is another issue: If one of the virtual drivers is overtaking the real world car driver at the end of the long straight coming out of slipstreaming, how do you inform the real world car driver that he cannot drive the racingline as usual? :-D

 

In fact the collision detection used to detect car/car collision in the game would always have to damage the virtual drivers car and move it to the side/out of the track. This means the race is not symmetric.

 

Cheers

 

Wolf-Dieter

 

 

 

 

Von: Brent Picasso [mailto:brent@autosportlabs.com]
Gesendet: Mittwoch, 9. April 2014 08:14
An: speed-dreams-devel@lists.sourceforge.net
Cc: Mike Marich; Kelley Picasso; Brian Lalor; Jeff Ciesielski; Scott Miller; Ryan Doherty
Betreff: [Speed-dreams-devel] Introductions

 

Greetings speed-dreams developers!

 

I'm a co-founder of Autosport Labs; here we focus on open source hardware / software for motorsports applications.  Last year we successfully crowd-funded on Indiegogo the RaceCapture/Pro system - a data acquisition and real time telemetry system for racing applications.

 

In summary, the system can log data from engine and chassis sensors, built-in accelerometers and GPS, transmitting the data in real-time to http://www.race-capture.com. The primary benefit of this technilog is real-time vehicle and driver analysis during the race, where race coaches, teams and drivers can make adjustments during the race, when it actually matters, vs. after the fact.

 

Data flows to the cloud in a web based application where anyone with the link can view and analyze the data in real time or after the race event.

 

The reason why we are reaching out is this story:

 

http://games.slashdot.org/story/14/04/08/201253/sony-and-toyota-bring-real-life-racing-into-the-game-world

 

Toyota and Sony have made headlines with their so-called 'telemetry' system; the reality of this system is that data is simply recorded and played back in the game. In our opinion, it's not telemetry in the true sense of the word.  We can do better.


After some internal team conversations on this subject I recalled playing with the original open souce sim, TORCS- after a bit of research I found the new speed-dreams project. 

 

Further research from wikipedia shows that driver bots can be plugged in to the game in a modular fashion. We were curious if this same mechanism could receive a live feed from the RaceCapture/Pro telemetry system and create a system that would allow virtual racers to race against real-life racers - all during the race! 

 

This would be a true example of real-time telemetry blending with a driving sim; If we could get this to work we feel it could generate a great deal of excitement for both of our open source projects!

 

So here we are; thank you for entertaining our message.  Would you have any recommendations on where / how to get started with getting the two systems connected? Sample code, etc?

 

Warmest regards,

Brent Picasso

Co-Founder,

Autosport Labs


 

--
Brent Picasso

Autosport Labs

Technology for Race and Street