Skip to content

Unofficial ROS2 SDK support for Unitree GO2 AIR/PRO/EDU

Notifications You must be signed in to change notification settings

elizabethhng/go2_ros2_sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized Go2 ROS2 SDK

Build the docker file (takes ~500s)

    cd go2_ws
    sudo docker build -t go2-ros2-sdk:v0.1 . 

Enable X11 forwarding on the host machine

    xhost +si:localuser:root

Run the docker container

    docker run --runtime=nvidia  -it\
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $HOME/.Xauthority:/home/$USER/.Xauthority \
    -e DISPLAY=$DISPLAY \
    go2-ros2-sdk:v0.1 
    
    # can add /bin/bash + command at the end 

To allow the container to access the host's NVIDIA GPU, run the following

    distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
    && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
    && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
    sed ‘s#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

    sudo apt-get update && apt-get install -y nvidia-docker2
    sudo systemctl restart docker

    # Test the install
    sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi

TO-DO

  • Start up script (entrypoint) - see the construct

  • Take in args from docker run command (i.e. ROBOT_IP,CONN_TYPE, etc.)

  • This dockerfile contains secret, which requires the repository settings to allow secret. to change to manual login / token keys? # Set Git access token as an environment variable ENV GIT_ACCESS_TOKEN=

      # Install Git and clone private repository
      RUN apk --no-cache add git \
      && git clone https://<You github username>:${GIT_ACCESS_TOKEN}@github.com<Complete github Url>
    
  • [ ]

About

Unofficial ROS2 SDK support for Unitree GO2 AIR/PRO/EDU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 42.5%
  • C 25.9%
  • C++ 16.3%
  • Python 8.5%
  • CMake 6.0%
  • Shell 0.6%
  • Other 0.2%