Page 1 of 1

XMR SDK

PostPosted: Sat Jan 05, 2013 12:57 pm
by JarreauGT
Hi guys,

What language is supported by the SDK?
Can I use the SDK to create a robot car or motion platform?

Thanks.

Re: XMR SDK

PostPosted: Sat Jan 05, 2013 1:21 pm
by Eugene Cojocar
Hi,

There are two ways to work with the SDK:
- Windows file mapping, so any programming language suits that supports
windows file mapping. I use C/C++.
- Torcs compatible UDP. So any language that can work via UDP,
C/C++, C# etc.

The current InGameDataSDK structure for windows file mapping:
struct InGameDataSDK
{
int car_index;
int car_num;
char car_name[ 64 ];
float speed; //speed, kmh
float acceleration; //acceleration, m/s
int gear0; //gear -1 - rear, 0-neutral, 1 - first, 2 - second etc
int gear_shake;
int none;
float lateral_g_force; //lateral_g_force in world coordinates
float vertical_g_force;
float longitudinal_g_force;
float transform_matrix[3][3];//transform matrix
float pitch; //pitch angle
float roll; //roll angle
float yaw; //yaw angle
float car_vel_x; //velocity_x in car's coordinates
float car_vel_y; //velocity_y in car's coordinates
float car_vel_z; //velocity_z in car's coordinates
float x_pos, y_pos, z_pos;//car's position in world coordinates
float car_accel_x; //acceleration_x in car's coordinates
float car_accel_y; //acceleration_y in car's coordinates
float car_accel_z; //acceleration_z in car's coordinates
float car_angular_vel_x; //angular velocity_x in car's coordinates (around right axis)
float car_angular_vel_y; //angular velocity_y in car's coordinates (around top axis)
float car_angular_vel_z; //angular velocity_z in car's coordinates (around front axis)
float wheelSpinVel[ 4 ]; //Vector of 4 sensors representing the rotation speed of the wheels [0, inf] (rad/s)
float engine_temperature; //engine temperature
float clutch_temperature; //clutch temperature
float lf_tire_temperature[ 3 ]; //temperature of the lf tire, 0 - left, 1 - middle and 2 - right part of the tire
float rf_tire_temperature[ 3 ]; //temperature of the rf tire, 0 - left, 1 - middle and 2 - right part of the tire
float rr_tire_temperature[ 3 ]; //temperature of the rr tire, 0 - left, 1 - middle and 2 - right part of the tire
float lr_tire_temperature[ 3 ]; //temperature of the lr tire, 0 - left, 1 - middle and 2 - right part of the tire
float rpm0;
unsigned int time;
float tireLoad[ 4 ]; //tire load 0 - LF, 1 - RF, 2 - RR, 3 - LR
JoystickDataSDK joystick_data[2]; //Joysticks data, 0 and 1 joysticks
};

Re: XMR SDK

PostPosted: Sat Jan 05, 2013 2:10 pm
by JarreauGT
That's what I looked for.
Thanks for the quick response.

Jack.

Re: XMR SDK

PostPosted: Wed Feb 06, 2013 3:02 pm
by JarreauGT
The SDK works great. It would be great to add some more options:
-Fuel
-Max Fuel
-Max RPM
-Lap

Re: XMR SDK

PostPosted: Wed Feb 06, 2013 4:17 pm
by Eugene Cojocar
Glad to hear that.
I'm planning to add much more options for the output structure - RPM, laps, suspension data etc.

Re: XMR SDK

PostPosted: Sat Oct 26, 2013 8:03 pm
by Eugene Cojocar
The first version of the InGameDataSDK2 structure that will be available at Business version

struct InGameDataSDK2
{
int car_index;
int car_num;
char car_name[ 64 ];
float speed;
float acceleration;
int gear0;
int gear_shake;
int none;
float lateral_g_force;
float vertical_g_force;
float longitudinal_g_force;
float transform_matrix[3][3];
float pitch;
float roll;
float yaw;
float car_vel_x;
float car_vel_y;
float car_vel_z;
float x_pos, y_pos, z_pos;
float car_accel_x;
float car_accel_y;
float car_accel_z;
float car_angular_vel_x;
float car_angular_vel_y;
float car_angular_vel_z;
float wheelSpinVel[ 4 ]; //Vector of 4 sensors representing the rotation speed of the wheels [0, inf] (rad/s)
float engine_temperature; //engine temperature
float clutch_temperature; //clutch temperature
float lf_tire_temperature[ 3 ]; //temperature of the lf tire, 0 - left, 1 - middle and 2 - right part of the tire
float rf_tire_temperature[ 3 ]; //temperature of the rf tire, 0 - left, 1 - middle and 2 - right part of the tire
float rr_tire_temperature[ 3 ]; //temperature of the rr tire, 0 - left, 1 - middle and 2 - right part of the tire
float lr_tire_temperature[ 3 ]; //temperature of the lr tire, 0 - left, 1 - middle and 2 - right part of the tire
float rpm0;

float lf_camber;
float rf_camber;
float rr_camber;
float lr_camber;

float lf_toe;
float rf_toe;
float rr_toe;
float lr_toe;

float lf_susp_offset;
float rf_susp_offset;
float rr_susp_offset;
float lr_susp_offset;

float lf_susp_vel;
float rf_susp_vel;
float rr_susp_vel;
float lr_susp_vel;

float engine_torque;

float lf_slip;
float rf_slip;
float rr_slip;
float lr_slip;

float lf_slip_angle;
float rf_slip_angle;
float rr_slip_angle;
float lr_slip_angle;

float fuel;
float max_fuel;
int lap;

unsigned int time;
float tireLoad[ 4 ]; //tire load 0 - LF, 1 - RF, 2 - RR, 3 - LR
JoystickDataSDK joystick_data[2]; //Joysticks data, 0 and 1 joysticks
};