OpenRacing

From SpaceElevatorWiki.com
Revision as of 10:12, 7 March 2011 by Keithcu (talk | contribs)
Jump to navigationJump to search

Intro

OpenRacing is a racing game, but it is also a simulator which aims to develop better artificial intelligence for human-driving assistance and driverless cars. The core is based on the Torcs codebase, which is widely considered the best FOSS racing game and which already has autonomous cars. However, the codebase contains a lot of cruft.

So, it is being methodically re-written into C#, ported to leverage the graphics engine Ogre, the physics engine ODE, the input system OIS, the widget API MyGui (which now has C# wrappers, at our request), and extended with a more general track model.

Then, we will have a clean and 10x smaller codebase for building smarter autonomous vehicles which can handle the complexities of urban scenarios, and can eventually navigate via the use of a vision recognition engine and simulated sensors like radar and GPS.

Warning: This effort has been abandoned

However, it is already a better driving research platform than Torcs and Rigs of Rods. Perhaps it could be ported to Python and research continue. If interested, please contact.

Current Status

The work in progress is here.

Achieving UTI

Using_blender_as_a_track_editor

Building OpenRacing

OpenRacing hosted in Launchpad / Bzr

Source, etc. is here: Launchpad

Install the dependencies

These instructions assume Ubuntu. If you are running something else, your steps will vary slightly. Instructions here

Compile OpenRacing

Go into openracing's directory.

./autogen.sh

The script installs a few missing files and generate the usual configure script.

Then launch configure.

$ ./configure --with-ogredotnet=/full/path/to/ogredotnet-read-only/bin \
  --with-myguinet=/full/path/to/mygui-or/Bin/Debug --with-tao=/full/path/to/tao/bin
$ cd monodevelop-project/bin
$ ln -s /full/path/to/ogredotnet/bin/Math3D.dll
$ ln -s /full/path/to/ogredotnet/bin/OgreDotNet.dll
$ ln -s /full/path/to/taoframework-2.1.0/bin/Tao.Ode.dll
$ ln -s /full/path/to/taoframework-2.1.0/bin/Tao.OpenAl.dll
$ ln -s /full/path/to/MyGUI-OR/Bin/Debug/MyGUI.dll
$ cd ..
$ make

If everything got right, an openracing script should have been generated. You can launch it immediately or install OpenRacing into the system.

$ sudo make install

And launch!

openracing

If it doesn't work, please complain to us so we can fix the bugs!

Troubleshooting

It occurs that for some mysterious reasons, mono can't load OR's libsimulator native library. Simple work-around:

Go to the data/ directory. Create the following link:

 $ ln -s ../src/libsimulator/.libs/libsimulator.so

That should work!

Using the Monodevelop project

For developers, a monodevelop project is now available, allowing to edit and launch C# parts of OpenRacing from a nice all-integrated GUI.

First, you must compile openracing as shown above. The compilation process generated for you a monodevelop.sh script.

But before to launch it there is a little hack to do...

Go to the src/ directory. A create link to Ode, OgreDotNet and MyGUI's DLLs. This is what I did on my system, please adapt it to yours:

$ ln -s /home/jeko/Sources/deps/taoframework-2.1.0/bin/Tao.Ode.dll
$ ln -s /home/jeko/Sources/deps/ogredotnet/bin/Math3D.dll   
$ ln -s /home/jeko/Sources/deps/ogredotnet/bin/OgreDotNet.dll
$ ln -s /home/jeko/Sources/deps/MyGUI-OR/Bin/Debug/MyGUI.dll

This makes sure monodevelop will find the necessary references needed to compile OpenRacing. (I tried hard to make this better, but it seems impossible)..

Then you can launch:

./monodevelop.sh

The scripts sets some environment variables (so that uninstalled shared libraries from OgreDotNet and MyGUI can be found for execution). Last hack before you're done: you must edit Config.cs file (which appears at the end of the file list):

replace:

public static string OPENRACING_DATA_PATH = "/home/jeko/Sources/openracing/data";

by:

public static string OPENRACING_DATA_PATH = "/full/path/to/openracing/data";

You're done, make sure the Debug configuration is enabled to enjoy executing OpenRacing inside a nice visual debugger.

Happy hacking!= Last email = from Keith Curtis <keithcu@gmail.com>

to speed-dreams-devel@lists.sourceforge.net

date Thu, Dec 10, 2009 at 12:01 AM

subject OpenRacing post-mortem

I've been meaning to send this for many months.

Jeko and I have decided to abandon OpenRacing. We consider it unlikely that:

  1. Our code would ever be put into Torcs-NG.
  2. That Torcs-NG will ever develop a more general track model. (The current one is 10 years old.)
  3. That Torcs-NG will be suitable for true driving AI research without this.
  4. That Torcs-NG will start moving towards more open data formats, shared components like ODE and Ogre, and better programming languages.

I'm probably naive but I think if we had approached you as soon as you started, and offered to do much of the heavy lifting, it is more likely we could have convinced you to fixup the codebase in various ways before you make a long-term commitment to it. But I think it is very difficult and unlikely now.

We aren't making much progress right now, but are starting to work more closely with Rigs of Rods which has a more general track model, uses Ogre, etc. It even uses Lua for things, and we are talking about having it support Python. It is more of a simulator than a racing game although parts of the physics are quite good.

It is a little sad that our interesting work is likely dead, but Source Forge is filled with that ;-) Torcs-NG might not ever become much of a research platform, but it is a fun game and that isn't too bad of a place to be.