TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
robottools.h File Reference


Robots Tools More...

#include <car.h>
#include <track.h>
Include dependency graph for robottools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RELAXATION2(target, prev, rate)
 Blend a target with the previous unfiltered input.
#define RELAXATION(target, prev, rate)
 Smooth a target using the previous filtered result.

Typedefs

typedef enum rtCarPitSetupType rtCarPitSetupType

Enumerations

enum  rtCarPitSetupType {
  PRACTICE = 0 , QUALIFYING = 1 , RACE = 2 , BACKUP1 = 3 ,
  BACKUP2 = 4 , BACKUP3 = 5
}

Functions

tdble RtTrackGetWidth (tTrackSeg *seg, tdble toStart)
 Get the track width at the specified point.
void RtTrackLocal2Global (tTrkLocPos *p, tdble *X, tdble *Y, int flag)
 Calculate global coordinates from a local position relative to the given track segment (segment, toRight, toStart)The toStart position refers to the current segment, the function will not search for next segment if toStart is greater than the segment length.
void RtTrackGlobal2Local (tTrackSeg *segment, tdble X, tdble Y, tTrkLocPos *p, int type)
 Convert global coordinates to a local track position.
void RtTrackGlobal2LocalD (tTrackSeg *segment, double X, double Y, tTrkLocPos *p, int type)
 Convert global coordinates to a local track position using double intermediates.
tdble RtTrackHeightL (tTrkLocPos *p)
 Returns the absolute height in meters of the road at the Local position p.
tdble RtTrackHeightG (tTrackSeg *seg, tdble X, tdble Y)
 Returns the absolute height in meters of the road at the Global position (segment, X, Y)
void RtTrackSideNormalG (tTrackSeg *seg, tdble X, tdble Y, int side, t3Dd *norm)
 Compute the horizontal inward border normal using the supplied segment.
tdble RtTrackSideTgAngleL (tTrkLocPos *p)
 Used to get the tangent angle for a track position The angle is given in radian.
void RtTrackSurfaceNormalL (tTrkLocPos *p, t3Dd *norm)
 Used to get the normal vector of the road (pointing upward).
int RtDistToPit (struct CarElt *car, tTrack *track, tdble *dL, tdble *dW)
 Get the distance to the pit stop.
tdble RtGetDistFromStart (tCarElt *car)
 Get distance along the track from the start/finish line.
tdble RtGetDistFromStart2 (tTrkLocPos *p)
 Get distance along the track from the start/finish line.
void RtTelemInit (tdble ymin, tdble ymax)
 Legacy telemetry initialization; currently does nothing.
tTrackSeg * RtTrackGetSeg (tTrkLocPos *p)
 Get the effective segment of the given position starting from a segment of type TR_MAIN, searching to the sides.
tTrackSeg * RtTrackGetSideNeighbourSeg (tTrackSeg *main, tTrackSeg *current, int tr_side)
 Get the neighbour segment of the given current segment.
void RtTelemNewChannel (const char *name, tdble *var, tdble min, tdble max)
 Legacy channel registration; currently does nothing.
void RtTelemStartMonitoring (const char *filename)
 Legacy start-recording request; currently creates no file and does nothing.
void RtTelemStopMonitoring (void)
 Legacy stop-recording request; currently does nothing.
void RtTelemUpdate (double time)
 Legacy sample-recording request; currently does nothing.
void RtTelemShutdown (void)
 Legacy telemetry shutdown; currently does nothing.
void RtGetCarPitSetupFilename (rtCarPitSetupType type, int robidx, const char *carname, const char *trackname, char *filename, const int len)
 Compose filename from given strings.
void RtSaveCarPitSetup (void *hdlecar, tCarPitSetup *s, rtCarPitSetupType type, const char *modulename, int robidx, const char *trackname, const char *carname)
 Save a custom setup in the robot's local setups directory.
void RtSaveCarPitSetupFile (void *hdlecar, tCarPitSetup *s, const char *filepath, const char *carname)
 Save adjustable setup entries to a file, merging them with hdlecar's restrictions.
void RtInitCarPitSetup (void *carparmhandle, tCarPitSetup *setup, bool minmaxonly)
 Initialize tCarPitSetup from data in parameter set given in handle hdle.
bool RtCarPitSetupExists (rtCarPitSetupType type, const char *modulename, int robidx, const char *trackname, const char *carname)
 Checks if a specific car setup is available.
bool RtLoadCarPitSetup (void *hdlecar, tCarPitSetup *s, rtCarPitSetupType type, const char *modulename, int robidx, const char *trackname, const char *carname, bool minmaxonly)
 Load a custom setup from the robot's local setups directory.
bool RtLoadCarPitSetupFilename (void *hdlecar, const char *filepath, tCarPitSetup *s, bool minmaxonly)
 Load a custom setup and merge its entries with hdlecar's restrictions.
void * RtLoadOriginalCarSettings (const char *carname)
 Gets a handle to a parameter file containing the original TORCS car setup, that means the car setup merged with the cars category setup.
bool RtInitCarPitSetupFromDefault (tCarPitSetup *s, const char *carname)
 Initialize the given tCarPitSetup with the original TORCS setup, that means the car setup merged with the cars category setup.
void * RtParmReadSetup (rtCarPitSetupType type, const char *modulename, int robidx, const char *trackname, const char *carname)
 Load a custom car setup file for a given robot, car, track and session (race, practice, qualifying, ...) type.

Detailed Description


Robots Tools

Author
Eric Espie

Definition in file robottools.h.

Typedef Documentation

◆ rtCarPitSetupType

Enumeration Type Documentation

◆ rtCarPitSetupType

Enumerator
PRACTICE 
QUALIFYING 
RACE 
BACKUP1 
BACKUP2 
BACKUP3 

Definition at line 191 of file robottools.h.