CarClient

class airgen.client.CarClient(ip='', port=41451, geo=False, timeout_value=3600)

Bases: VehicleClient, object

enableCarSpeedControl(status, vehicle_name='')

Enable or disable speed control for the car.

Parameters:
  • status (bool) -- True to enable, false to disable.

  • vehicle_name (str, optional) -- Name of the vehicle

getCarControls(vehicle_name='')
Parameters:

vehicle_name (str, optional) -- Name of vehicle

Return type:

CarControls

getCarState(vehicle_name='')

The position inside the returned CarState is in the frame of the vehicle's starting point

Parameters:

vehicle_name (str, optional) -- Name of vehicle

Return type:

CarState

moveOnPath(path, velocity, lookahead=-1, adaptive_lookahead=1, orientations=[], vehicle_name='')

Command the car to move along a specified path.

This function sends commands to a car to follow a given path at a specified velocity. The path is a list of 3D vectors, and each vector represents a point in space that the car should follow.

Parameters:
  • path (List[Vector3r]) -- A list of 3D vectors representing the path to follow.

  • velocity (float) -- The speed at which the car should move along the path, in meters per second.

  • timeout_sec (float, optional) -- The maximum time allowed for the car to reach the destination, in seconds. Defaults to 3e38.

  • lookahead (int, optional) -- The number of points the car should look ahead on the path for control decisions. Defaults to -1, which means no specific lookahead.

  • adaptive_lookahead (bool, optional) -- Whether to adjust the lookahead dynamically based on the car's speed. Defaults to True.

  • orientations (Optional[List[Quarterion]], optional) -- Optional list of orientations corresponding to each path point. Defaults to empty.

  • vehicle_name (str, optional) -- The name of the vehicle being controlled, if applicable. Defaults to "".

Returns:

None

setCarControls(controls, vehicle_name='')

Control the car using throttle, steering, brake, etc.

Parameters:
  • controls (CarControls) -- Struct containing control values

  • vehicle_name (str, optional) -- Name of vehicle to be controlled

setCarTargetSpeed(speed, vehicle_name='')

Set a target speed for the car.

Parameters:
  • speed (float) -- Target speed in m/s

  • vehicle_name (str, optional) -- Name of vehicle to be controlled