Unitree Camera SDK

This guide is intended to help users get started using the Go1 EDU using the Unitree Camera SDK.

The Unitree Camera SDK allows depth and color streaming, and provides intrinsic calibration information. The library also offers pointcloud, depth image aligned to color image.

Dependencies

Dependency Minimum Version Remarks
OpenCV >=4 Requires GStreamer
CMake >=2.8  
OpenGL   For Pointcloud GUI
GLUT   For Pointcloud GUI
X11   For Pointcloud GUI

Workspace Setup

  1. Clone the repository.

    $ git clone https://github.com/unitreerobotics/UnitreecameraSDK.git
    
  2. Build the SDK.

    $ cd UnitreeCameraSDK
    $ mkdir build
    $ cd build
    $ cmake ..
    $ make
    

Running Examples

Note

You may have to kill processes that occupy the cameras’ resources before running the examples. To do so, run the commands given in the example_putImagetrans demo.

# If you start this file, you must bash "kill.sh" to turn off automatic startup program.
# "Unitree/autostart/02camerarosnode/kill.sh" and "Unitree/autostart/04imageai/kill.sh".
# You can also use the following instructions:

ps -A | grep point | awk '{print $1}' | xargs kill -9
ps -aux|grep mqttControlNode|grep -v grep|head -n 1|awk '{print $2}'|xargs kill -9
ps -aux|grep live_human_pose|grep -v grep|head -n 1|awk '{print $2}'|xargs kill -9

Get Camera Raw Image

$ cd UnitreeCameraSDK
$ ./bin/example_getRawFrame

Get Calibration Parameters File

$ cd UnitreeCameraSDK
$ ./bin/example_getCalibParamsFile

Get Rectified Image

$ cd UnitreeCameraSDK
$ ./bin/example_getRectFrame

Get Depth Image

$ cd UnitreeCameraSDK
$ ./bin/example_getDepthFrame

Get Point Cloud

$ cd UnitreeCameraSDK
$ ./bin/example_getPointCloud

Transfer Image to Other Devices

$ cd UnitreeCameraSDK
$ ./bin/example_putImagetrans

Get Image From Other Devices

$ cd UnitreeCameraSDK
$ ./bin/example_getimagetrans