GpDrivingSim Info

Software Info

Speed dreams main website http://www.speed-dreams.org
Speed dreams wiki http://sourceforge.net/apps/trac/speed-dreams/wiki/WikiStart
Wikipedia info http://en.wikipedia.org/wiki/Speed_Dreams
Torcs software where Speed Deams was derived from http://www3.uji.es/~martiv/index_torcs.html
TCSE: Torcs Car Setup Editor http://www.berniw.org/trb/index.php?page=downloads
Linux software packages speed-dreams, speed-dreams-robots-base, speed-dreams-devel
How to build a car videos http://rootgamer.com/video/video-tutorial-build-car-torcs


Files Info

Cars /usr/share/games/speed-dreams-2/cars
Tracks /usr/share/games/speed-dreams-2/tracks
Category files /usr/share/games/speed-dreams-2/categories
Config files /usr/share/games/speed-dreams-2/config
Menu /usr/share/games/speed-dreams-2/data/menu
3D Objects /usr/share/games/speed-dreams-2/data/objects
Sounds /usr/share/games/speed-dreams-2/data/sound
Textures /usr/share/games/speed-dreams-2/data/textures
Drivers /usr/share/games/speed-dreams-2/drivers
   

Adding a car

This assumes a car name of "rr9".

  1. Add a car category Greenpower
  2. Add car directory in /usr/share/games/speed-dreams-2/cars
  3. Add car files to this (can copy an existing car)
  4. Rename all files to be based on the cars name "rr9*.*"
  5. Edit "rr9.xml" and change "params name" as needed and the graphics file name "*.acc" to "rr9.acc"
  6. Change the physics parameters in "rr9.xml" as needed.
  7. Change the 3D design and other files as needed. (Note that rr9.acc names some of the other graphics files needed)

Files


rr9.xml The overal configuration file
rr9-preview.jpg A picture for the car selector
rr9.acc Overal 3D design for the car
rr9.png Texture bits for the car
wheel.rgb Wheels texture
shadow.rgb Shadow on the ground below the car
rr9.wav Sound car makes

Creating 3D model
Basic process:


  1. Start with a 3D drawing (could be in STL or other formats).
  2. Needs to be scaled to metres and car should have its front to the right (X+) direction. Can use admesh to scale, rotate and offset car.
  3. Run blender and delete the default cube object.
  4. import the 3D design.
  5. Can rotate and scale etc (click TL rotate. Angle can be typed in ("180<Enter>").
  6. Save blender file. ("car.blend")
  7. Create a UV map. Go to "Edit Mode". u -> "Smart UV Project" -> "Ok".
  8. Open UV View (drag TR corner to left and use BR "Editor Type" button to set "UV/Image Editor").
  9. Create an image: Image -> NewImage. Use "car.png" as name.
  10. Save image file. Image -> Save Image. (Note you will have to save the image after all changes <Alt>S).
  11. Add a material. RH Menu, Select Materials (sphere). Then "New".
  12. Add a texture. Select textures (red/while checkboard). Then "New". Set Type to "Image or movie".
  13. Under Image choose "Open" and select "car.png"
  14. Under mapping set mapping to UV in RH panel.
  15. Paint the car. Go to 3D view and select "Texture Paint" mode.
  16. Paint car as needed using tools in LH menus.
  17. Save the blender and image files (CRTL-S, <Alt>S (in UV Editor window)).
  18. Export as an AC3D file "car.ac"
  19. Create Speed Deams ACC file with the command "make".

To actually paint the car using blender see the following:

You can use a brush to "spray" the car to bet the basic colour.
To add graphics a graphics picture file can be loaded as a texture. This can then "stenciled" over the car.

  1. First load the picture as a texture using the texture controls in the RH panel (red/while checkboard).
  2. In the LH panel select the texture and set the "Brush Mapping" to "stencil".
  3. Set the brush to be "TexDraw"
  4. When the mouse cursor is in the 3D display window the texture will be visable. Move it by draging with the RH button over the car. Use the RH button with CTRL to resize and RH mouse button with shift to rotate.
  5. You can then use the brush to "spray" stencil the image onto the car.

You may have to reduce the vertex count in the orginal design file. You can do this using blenders "Decimate" modifier.

Adding Robot drivers for cars

You need to edit /usr/share/games/speed-dreams-2/drivers/simplix and add entries for the appropriate cars.

Adding a track

The basic process for a track named gptest2 is:

  1. Use "trackeditor" to create the basic track layout/ This allows the shape, gradients and basic graphics to be defined.
  2. Given the track information create the speed-dreams track data using sd2-trackgen
  3. Edit manually to add local info and starting grid etc.
  4. Edit to add 3D extras.

To use trackeditor:

  1. run trackeditor.sh
  2. Create a named track in /usr/share/games/speed-dreams-2/tracks/road (path)
  3. Edit the track
  4. Can add pits if wanted.
  5. Save the track
  6. Can edit the file to add the "Local Info" and "Starting Grid" sections.

To use sd2-trackgen:
Note the sd2-trackgen program works with files in the /usr/share/games/speed-dreams-2/tracks directory.

  1. sd2-trackgen -c road -n gptest2 -E 0

RR9 Info

Motor graphs http://www.greenpower.beamweb.co.uk/files/TechnicalInfo/GreenpowerF24PerformanceGraph.pdf
Car simulator http://portal.beam.ltd.uk/greensim/wwwgreensimcss.py
   

Car Simulation Parameters

These are set in the cars *.xml file. The main parameters of interest are listed below.
 

Car.mass 150 The all up weight of the car in kg
Car.GC height 0.15 The centre of gravity heigh in metres
Car.front-rear weight repartition 0.6 The front to rear position of the CofG
Aerodynamics.cx 0.26 Air drag coefficient
Aerodynamics.front area 0.33 Cars frontal area
Engine.data points.1.Tq 13.5 Motors torque at 0 rpm
Gearbox.gears.1.ratio 3.5 Drive gearing ratio
Steer.steer lock 21 The steering lock in degrees
Brake System.max pressure ? Braking max force
     
*Wheel.ypos -.03 Wheel y positions
*wheel.mu 0.8 Tyres coefficiennt of friction
*wheel.ride height 60 Cars track to bottom clearance
Front Axle.xpos 0.75 Front axle xpos
Rear Axle.xpos -0.5 Rear axle xpos
     
Bonnet.zpos 0.3 Bonnet camera height
Driver.zpos 0.5 Driver camera height

To change relative performance of cars:

To speed up simulation:

To make the car less roll stable


Car Data


Body
Length 2.8m
Width 0.6m
Height  
Axle height  
CofG  
   
Wheels
Diameter 416mm
Tyre Width 25mm
Coeficient of friction 0.8
   
Physics
Frontal Area 0.26 m^2
Aerodynamic factor Cd 0.33
Rolling Drag 0.006
Mass 123Kg
   
Engine/Gears
RPM 0 - 2100 RPM
Torque 3.5 - 0 Nm
Gear Ratio 2.4
   
Brakes
   
   

Notes on using Blender