Skip to main content

Go2Real

Inherits from: Robot

Go2Real

required
name of the network interface, defaults to “wlo1”
required
whether to enable obstacle avoidance, defaults to False
required
whether to use low level control. If False, high level control is used. Defaults to False

getImage

Return the image of camera. Go2 only has one camera so the args are not used.
required
unused, go2 only has one camera
required
unused, go2 only has rgb images
Imagerequested image

getLidarData

Get the current LiDAR point cloud data
Point cloud data containing 3D points

getHeightMap

Get the current height map data from LiDAR
HeightMapHeight map data with resolution and origin information

getPosition

Get the current position of the unitree go2 agent with respect to the world coordinate.
required
unused
Positionunitree go2 agent’s current position (x,y,z) with respect to the world coordinate

getOrientation

return the current orientation of the unitree go2 agent in radians
required
unused
Orientationcurrent orientation of the unitree go2 agent in radians

setYaw

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)
required
the target yaw (radians) for the drone

moveByVelocity

Move the agent by velocity (velocity vector is respect to world coordinates) for the specified duration of seconds.
required
Velocitycontains x velocity (x_vel), y velocity (y_vel), z_vel is discarded
required
Velocitycontains yaw to turn by (z_vel), x_vel and y_vel are discarded
required
number of seconds that the Go2 should move before stopping
required
unused

getVelocity

Get the velocity of the unitree go2 agent
Velocityvelocity of the unitree go2 agent

setJointPositions

Set the position of the robot’s joints.
required
Dictionary mapping joint names to target positions

setJointVelocities

Set the velocity of the robot’s joints.
required
Dictionary mapping joint names to target velocities

setJointTorques

Set the torque of the robot’s joints.
required
Dictionary mapping joint names to target torques

getMotorState

Get the current state of all motors.

getIMU

Get the current IMU state.

getBatteryState

Get the current battery state.

getFootForce

Get the current foot force readings.

getLowLevelState

Get the complete low level state.