> ## 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.

# Go2

## Go2Real

Inherits from: [Robot](/robot-api/grid/robot/robot#robot)

### Go2Real

```python
Go2Real(network_interface_name, obstacle_avoidance, low_level_control: bool)
```

<ResponseField name="Arguments">
  <ParamField query="network_interface_name (optional, str)" type="" required>
    name of the network interface, defaults to "wlo1"
  </ParamField>

  <ParamField query="obstacle_avoidance (optional, bool)" type="" required>
    whether to enable obstacle avoidance, defaults to False
  </ParamField>

  <ParamField query="low_level_control (optional, bool)" type="" required>
    whether to use low level control. If False, high level control is used. Defaults to False
  </ParamField>
</ResponseField>

### getImage

```python
Go2Real.getImage(camera_name: str, image_type: str)
```

Return the image of camera. Go2 only has one camera so the args are not used.

<ResponseField name="Arguments">
  <ParamField query="camera_name (optional, str)" type="" required>
    unused, go2 only has one camera
  </ParamField>

  <ParamField query="image_type (optional, str)" type="" required>
    unused, go2 only has rgb images
  </ParamField>
</ResponseField>

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

  requested image
</ResponseField>

### getLidarData

```python
Go2Real.getLidarData()
```

Get the current LiDAR point cloud data

<ResponseField name="Returns">
  Point cloud data containing 3D points
</ResponseField>

### getHeightMap

```python
Go2Real.getHeightMap()
```

Get the current height map data from LiDAR

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

  Height map data with resolution and origin information
</ResponseField>

### getPosition

```python
Go2Real.getPosition(name: str)
```

Get the current position of the unitree go2 agent with respect to the world coordinate.

<ResponseField name="Arguments">
  <ParamField query="name (optional, str)" type="" required>
    unused
  </ParamField>
</ResponseField>

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

  unitree go2 agent's current position (x,y,z) with respect to the world coordinate
</ResponseField>

### getOrientation

```python
Go2Real.getOrientation(name: str)
```

return the current orientation of the unitree go2 agent in radians

<ResponseField name="Arguments">
  <ParamField query="name (optional, str)" type="" required>
    unused
  </ParamField>
</ResponseField>

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

  current orientation of the unitree go2 agent in radians
</ResponseField>

### setYaw

```python
Go2Real.setYaw(yaw: float, speed)
```

Set the yaw (in radians) of the unitree agent to the specified radians. Yaw measures the
rotation of the drone around the z-axis (downwards)

<ResponseField name="Arguments">
  <ParamField query="yaw (float)" type="" required>
    the target yaw (radians) for the drone
  </ParamField>
</ResponseField>

### moveByVelocity

```python
Go2Real.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, duration: Union[float, None], name: str)
```

Move the agent by velocity (velocity vector is respect to world coordinates) for the
specified `duration` of seconds.

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

    contains x velocity (x\_vel), y velocity (y\_vel), z\_vel is discarded
  </ParamField>

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

    contains yaw to turn by (z\_vel), x\_vel and y\_vel are discarded
  </ParamField>

  <ParamField query="duration (optional, Union[float, None])" type="" required>
    number of seconds that the Go2 should move before stopping
  </ParamField>

  <ParamField query="name (optional, str)" type="" required>
    unused
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### getVelocity

```python
Go2Real.getVelocity()
```

Get the velocity of the unitree go2 agent

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

  velocity of the unitree go2 agent
</ResponseField>

### setJointPositions

```python
Go2Real.setJointPositions(joint_position: dict)
```

Set the position of the robot's joints.

<ResponseField name="Arguments">
  <ParamField query="joint_position (dict)" type="" required>
    Dictionary mapping joint names to target positions
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### setJointVelocities

```python
Go2Real.setJointVelocities(joint_velocity: dict)
```

Set the velocity of the robot's joints.

<ResponseField name="Arguments">
  <ParamField query="joint_velocity (dict)" type="" required>
    Dictionary mapping joint names to target velocities
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### setJointTorques

```python
Go2Real.setJointTorques(joint_torque: dict)
```

Set the torque of the robot's joints.

<ResponseField name="Arguments">
  <ParamField query="joint_torque (dict)" type="" required>
    Dictionary mapping joint names to target torques
  </ParamField>
</ResponseField>

<ResponseField name="Returns" />

### getMotorState

```python
Go2Real.getMotorState()
```

Get the current state of all motors.

### getIMU

```python
Go2Real.getIMU()
```

Get the current IMU state.

### getBatteryState

```python
Go2Real.getBatteryState()
```

Get the current battery state.

### getFootForce

```python
Go2Real.getFootForce()
```

Get the current foot force readings.

### getLowLevelState

```python
Go2Real.getLowLevelState()
```

Get the complete low level state.
