> ## Documentation Index
> Fetch the complete documentation index at: https://scaledfoundations-rebrand.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Jetbot

## JetBot

Inherits from: [WheeledRobot](/robot-api/grid/robot/wheeled/wheeled_robot#wheeledrobot)

### JetBot

```python
JetBot(ip, locomotion_port, camera_port)
```

Initialize a JetBot robot instance.

<ResponseField name="Arguments">
  <ParamField query="ip (str)" type="" required>
    IP address of the JetBot.
  </ParamField>

  <ParamField query="locomotion_port (str), optional" type="">
    defaults to "8040".
    Port number for locomotion control. Defaults to "8040".
  </ParamField>

  <ParamField query="camera_port (str), optional" type="">
    defaults to "8050".
    Port number for camera access. Defaults to "8050".
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### getPosition

```python
JetBot.getPosition()
```

getPosition is not implemented for JetBot

### getOrientation

```python
JetBot.getOrientation()
```

getOrientation is not implemented for JetBot

### getImage

```python
JetBot.getImage(camera_name: Union[str, None], image_type: Union[str, None])
```

Return the image of camera. JetBot only has one camera so the arguments are ignored.

<ResponseField name="Arguments">
  <ParamField query="camera_name (optional, Union[str, None])" type="" required>
    unused, jetbot only has one camera
  </ParamField>

  <ParamField query="image_type (optional, Union[str, None])" type="" required>
    unused, jetbot only has rgb images
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  [Image](/robot-api/grid/utils/types#image)

  requested image and it capture parameters
</ResponseField>

### setMotors

```python
JetBot.setMotors(left_speed: float, right_speed: float)
```

Sets the speed of the motors for the JetBot. These values should be \[-1.0, 1.0]

<ResponseField name="Arguments">
  <ParamField query="left_speed (float)" type="" required>
    Speed of the left motor \[-1, 1]
  </ParamField>

  <ParamField query="right_speed (float)" type="" required>
    Speed of the right motor \[-1, 1]
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### stop

```python
JetBot.stop()
```

Stops the motors of the JetBot

### setCarControls

```python
JetBot.setCarControls(steering: float, throttle: float, brake: float)
```

Control the JetBot using ackermann steering. Does not adjust speed, only steering

<ResponseField name="Arguments">
  <ParamField query="steering (float)" type="" required>
    yaw \[-1, 1] radians
  </ParamField>

  <ParamField query="throttle (float), optional" type="">
    None
  </ParamField>

  <ParamField query="brake (float), optional" type="">
    None
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### setCarTargetSpeed

```python
JetBot.setCarTargetSpeed(velocity: float, scaling_factor: float)
```

Set the speed of the JetBot for Ackermann control. Does not adjust steering

<ResponseField name="Arguments">
  <ParamField query="velocity (float)" type="" required>
    speed \[0, 1]
  </ParamField>

  <ParamField query="scaling_factor (float), optional" type="">
    Reduce the speed of the jetbot since 1.0
    for jetbot is considerably faster than AirGenCar
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  None
</ResponseField>

### rotate

```python
JetBot.rotate(rate: float, duration: Union[float, None], scaling_factor: float)
```

Rotate the JetBot in place

<ResponseField name="Arguments">
  <ParamField query="rate (float)" type="" required>
    Throttle rate to apply during rotation. Positive rotates right, negative rotates left
  </ParamField>

  <ParamField query="duration (optional, Union[float, None])" type="" required>
    How long to rotate in seconds
  </ParamField>

  <ParamField query="scaling_factor (float), optional" type="">
    defaults to 8.
    Scaling factor for the rate to make it behave similar to simulation. Defaults to 8.0
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### moveByVelocity *(inherited)*

```python
JetBot.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, duration: float | None)
```

Move the robot by setting linear and angular velocity.

<ResponseField name="Arguments">
  <ParamField query="linear_velocity (Velocity)" type="" required>
    [Velocity](/robot-api/grid/utils/types#velocity)

    Linear velocity object containing x\_vel component
  </ParamField>

  <ParamField query="angular_velocity (Velocity)" type="" required>
    [Velocity](/robot-api/grid/utils/types#velocity)

    Angular velocity object containing z\_vel component
  </ParamField>

  <ParamField query="duration (float | None), optional" type="">
    defaults to None.
    Optional duration in seconds to move for before stopping. Defaults to None.
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />
