> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CarClient

## \_\_init\_\_

<ResponseField name="CarClient.__init__(ip=&#x22;&#x22;, port=41471, timeout_value=3600)">
  No description provided!
</ResponseField>

<Note>
  All car-specific methods accept an optional `robot_name`. If omitted, calls apply to the first robot configured in the simulation settings (alphabetical order).
</Note>

## rotate

<ResponseField name="CarClient.rotate(rate, duration, robot_name=&#x22;&#x22;)">
  No description provided!
</ResponseField>

## setCarControls

<ResponseField name="CarClient.setCarControls(controls, robot_name=&#x22;&#x22;)">
  Control the car using throttle, steering, brake, etc.

  <ResponseField name="Arguments">
    <ParamField query="controls" type="CarControls">
      [CarControls](/simulation/airgen/reference/datatypes#carcontrols): Struct containing control values
    </ParamField>

    <ParamField query="robot_name" type="str, optional">
      Name of robot to be controlled
    </ParamField>
  </ResponseField>
</ResponseField>

## enableCarSpeedControl

<ResponseField name="CarClient.enableCarSpeedControl(status, robot_name = &#x22;&#x22;)">
  Enable or disable speed control for the car.

  <ResponseField name="Arguments">
    <ParamField query="status" type="bool">
      True to enable, false to disable.
    </ParamField>

    <ParamField query="robot_name" type="str, optional">
      Name of the robot
    </ParamField>
  </ResponseField>
</ResponseField>

## setCarTargetSpeed

<ResponseField name="CarClient.setCarTargetSpeed(speed, robot_name = &#x22;&#x22;)">
  Set a target speed for the car.

  <ResponseField name="Arguments">
    <ParamField query="speed" type="float">
      Target speed in m/s
    </ParamField>

    <ParamField query="robot_name" type="str, optional">
      Name of robot to be controlled
    </ParamField>
  </ResponseField>
</ResponseField>

## getCarState

<ResponseField name="CarClient.getCarState(robot_name=&#x22;&#x22;)">
  The position inside the returned CarState is in the frame of the robot's starting point

  <ResponseField name="Arguments">
    <ParamField query="robot_name" type="str, optional">
      Name of robot
    </ParamField>
  </ResponseField>

  <ResponseField name="Returns">
    <ResponseField name="CarState" type="CarState">
      CarState
    </ResponseField>
  </ResponseField>
</ResponseField>

## getCarControls

<ResponseField name="CarClient.getCarControls(robot_name=&#x22;&#x22;)">
  No description provided!

  <ResponseField name="Arguments">
    <ParamField query="robot_name" type="str, optional">
      Name of robot
    </ParamField>
  </ResponseField>

  <ResponseField name="Returns">
    <ResponseField name="CarControls" type="CarControls">
      CarControls
    </ResponseField>
  </ResponseField>
</ResponseField>

## moveOnPath

<ResponseField
  name="CarClient.moveOnPath(
path,
speed,
lookahead=-1,
adaptive_lookahead=1,
orientations=[],
robot_name=&#x22;&#x22;
)"
>
  Command the car to move along a specified path.

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

  <ResponseField name="Arguments">
    <ParamField query="path" type="List[Vector3r]">
      A list of 3D vectors representing the path to follow.
    </ParamField>

    <ParamField query="speed" type="float">
      The speed at which the car should move along the path, in meters per second.
    </ParamField>

    <ParamField query="timeout_sec" type="float, optional">
      The maximum time allowed for the car to reach the destination, in seconds. Defaults to 3e38.
    </ParamField>

    <ParamField query="lookahead" type="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.
    </ParamField>

    <ParamField query="adaptive_lookahead" type="bool, optional">
      Whether to adjust the lookahead dynamically based on the car's speed. Defaults to True.
    </ParamField>

    <ParamField query="orientations" type="Optional[List[Quarterion]], optional">
      Optional list of orientations corresponding to each path point. Defaults to empty.
    </ParamField>

    <ParamField query="robot_name" type="str, optional">
      The name of the robot being controlled, if applicable. Defaults to "".
    </ParamField>
  </ResponseField>
</ResponseField>
