fmirus / torcs-1.3.7

patched version of torcs1.3.7 including the scr-server and a patch to send the game image to another application
GNU General Public License v2.0
37 stars 33 forks source link

TORCS 1.3.7

Version of TORCS 1.3.7 with SCR patch and an additional patch to send the current game image to another application via shared memory.

Installation on Ubuntu 20.04

For Ubuntu 20.04, please proceed as follow:

Install all necessary requirements

sudo apt-get install libglib2.0-dev  libgl1-mesa-dev libglu1-mesa-dev  freeglut3-dev  libplib-dev  libopenal-dev libalut-dev libxi-dev libxmu-dev libxrender-dev  libxrandr-dev libpng-dev libvorbis-dev

Build torcs

$ export CFLAGS="-fPIC"
$ export CPPFLAGS=$CFLAGS
$ export CXXFLAGS=$CFLAGS
$ ./configure --prefix=$(pwd)/BUILD  # local install dir
$ make
$ make install
$ make datainstall

Run torcs

To run torcs with local installation, execute

./your_path_to_torcs/torcs-1.3.7/BUILD/bin/torcs

Installation on Ubuntu 18.04

For Ubuntu 18.04, please proceed as follow:

Install all necessary requirements

sudo apt-get install libglib2.0-dev  libgl1-mesa-dev libglu1-mesa-dev  freeglut3-dev  libplib-dev  libopenal-dev libalut-dev libxi-dev libxmu-dev libxrender-dev  libxrandr-dev libpng-dev

Build torcs

$ export CFLAGS="-fPIC"
$ export CPPFLAGS=$CFLAGS
$ export CXXFLAGS=$CFLAGS
$ ./configure --prefix=$(pwd)/BUILD  # local install dir
$ make
$ make install
$ make datainstall

Usage with ROS

If you want to run this software with the ROS adapter, you also need to install opencv uing $apt-get install -y *opencv*, after installing the ROS Melodic release.

Installation on Ubuntu 16.04

install torcs dependencies

first we need to get some necessary debian packages

sudo apt-get install mesa-utils libalut-dev libvorbis-dev cmake libxrender-dev libxrender1 libxrandr-dev zlib1g-dev libpng16-dev

now check for openGL/DRI by running

glxinfo | grep direct

the result should look like

direct rendering: Yes

check for glut by running

dpkg -l | grep glut

if it is not installed run

sudo apt-get install freeglut3 freeglut3-dev

check for libpng by running

dpkg -l | grep png

install PLIB

first we have to create a folder for all torcs-related stuff. Therefore, run the following commands

cd /your_desired_location/

sudo mkdir torcs

export TORCS_PATH=/your_desired_location/torcs

cd $TORCS_PATH

install PLIB-dependencies

sudo apt-get install libxmu-dev libxmu6 libxi-dev

now download PLIB 1.8.5, unpack to the created directory and enter the plib folder by

sudo tar xfvz /path_to_downloaded_files/plib-1.8.5.tar.gz

cd plib-1.8.5

before we compile plib we need need to set some environment variables

export CFLAGS="-fPIC"

export CPPFLAGS=$CFLAGS

export CXXFLAGS=$CFLAGS

now we can configure and compile PLIB

./configure

make

sudo make install

just for safety, wen unset our environment variables again

export CFLAGS=

export CPPFLAGS=

export CXXFLAGS=

install openal

let's enter our base directory again

cd $TORCS_PATH

now we download openal 1.17.2 and unpack it

sudo tar xfvj /path_to_downloaded_files/openal-soft-1.17.2.tar.bz2

we enter the build folder and compile openal

cd openal-soft-1.17.2/build

sudo cmake ..

sudo make

sudo make install

install TORCS

enter your TORCS_PATH

cd $TORCS_PATH

and clone this repository

git clone https://github.com/fmirus/torcs-1.3.7.git

now we enter our torcs folder

cd torcs-1.3.7

now build we build TORCS and log the output to a text-files as TORCS does not interrupt the build on errors

make >& error.log

now open error.log with your favourite text editor and search for errors. If there are no errors you can proceed, otherwise you have to resolve.

now we are ready to install torcs by running

sudo make install

also install the torcs data-files by running

sudo make datainstall

If you made it this far, you can delete the TORCS_PATH variable by unset TORCS_PATH and are now ready to go. Congratulations :-)

Original TORCS README:

  1. Introduction
  2. Documentation
  3. Non-Free content (in GPL sense)
  4. Track editor
  5. Linux Installation from Source
  6. Windows Installation from Source (Release version) 6.1 Windows Installation from Source, additional notes
  7. Windows Installation from Source (Debug version)
  8. Testing
  9. Getting Help
  10. Running under Valgrind with Linux
  11. Changes
  12. TODO/Notes

1. Introduction


First a big welcome, I hope you will enjoy your ride:-)

This is an all in one package of TORCS. Be aware that some included artwork has non free (in the GPL sense) licenses, you will find a "readme.txt" in those directories. The rest is either licensed under the GPL or the Free Art License. If you want to create cars or advanced tracks using the accc tool, you will require stripe from http://www.cs.sunysb.edu/~stripe.

If you use TORCS for research/projects you can have a look into the FAQ for citation guidelines.

Kind regards

Bernhard

2. Documentation


You can find a variety of links on www.torcs.org (video tutorials about content creation/usage, written documentation like the robot tutorial, etc.). The TORCS API and architecture documentation can be generated with Doxygen 1.8, run "make doc", the result can be found in doc/manual/api, point to index.html.

3. Non-Free content (in GPL sense)


Here the list with the directories containing non free content, look at the readme.txt for details:

4. Track editor


The track editor is not included in this distribution, you can get it from http://www.berniw.org/trb/download/trackeditor-0.6.2c.tar.bz2, the sources are included in the jar. The sources are also available here: http://sourceforge.net/projects/trackeditor.

5. Linux Installation from Source


Command line arguments:

6. Windows Installation from Source (Release version)


Command line arguments:

6.1 Windows Installation from Source, additional notes


6.1.1 VS 2005 Express (based on imported dsw), reported by Eric Espie:

6.1.2 VS 2005 Express (based on VS2008 sln), reported by Wolf-Dieter Beelitz:

6.1.3 VS 2008 Express, reported by Stacey Pritchett:

6.1.4 VS 2012, reported by SteveO:

7. Windows Installation from Source (Debug version)


Command line arguments:

8. Testing


If you find problems which should be already fixed or new ones please report them to the torcs-users mailing list.

9. Getting Help


During the game press F1. For more in depth information visit www.torcs.org, you find there a lot of information, look at the documentation section on the left, have as well a look into the list of howto's. If you are stuck have a look into the FAQ to learn how and where to report a problem.

10. Running under Valgrind with Linux


First you need to build a debug version of TORCS, make sure that the CFLAGS, CPPFLAGS and CXXFLAGS environment variables are empty (usually they are). Then run "make distclean", then the configure script with the option --enable-debug and all other options which you require, build and install as usual.

To find memory leaks run first (Valgrind must be available in the path): ./torcs -g

You will find the logfile valgrind.log in the .torcs directory. If you have "??" in the call stack, you can run TORCS with the -k option to avoid unloading the modules: ./torcs -g -k

You should use -k just to investigate the "??" in the call stacks, because the suppression of dlclose can hide problems related with module release and cause problems because modules are just recycled but not reloaded.

Of course you can use this with the console (command line) mode as well, e.g.: ./torcs -g -r ~/.torcs/config/raceman/champ.xml ./torcs -g -k -r ~/.torcs/config/raceman/dtmrace.xml

Some additional notes:

11. Changes


Changes since 1.3.6

12. TODO/Notes


TODO for 1.3.8 "worn & blown"

TODO for 1.3.9 "analysed"

TODO for 1.3.10 "ruled"

TODO for 1.3.11 "tutored"

TODO for 1.3.12 "managed"

TODO for 1.3.13 or 1.4.x "artistic"

TODO for 1.3.14 or 1.4.x "everywhere"

TODO for 1.3.15+

TODO for 1.4.x

TODO TRB

TODO for Compliance

155-DTM -> replace with car10-trb1 acura -> replace with car9-trb1 mc-larenf1 -> replace with car10-trb1 p406 -> replace with car1-trb4 rework buggy, baja bug replace rally cars Remove invalid geometry from tracks convert force units internally from lbs to lbf

Later:

TODO for 1.9.x (pre 2.0 series, no release)

TODO for 2.0.0

TODO LATER

IDEAS FOR MUCH LATER