Skip to content

Development with Skyhub SDK

mvorobiev edited this page Oct 30, 2025 · 13 revisions

How to build examples

This is a quick guideline how to build ROS-based examples to run with Skyhub services.

Build environment setup for x86-64 platform

To start development work on regular PC workstatin with Intel/AMD based CPUs, you'll need:

  1. Setup Ubuntu Linux 22.04 Operation system.
  2. Setup ROS 2 Humble packages.
  3. Setup Skyhub SDK package.

Setup local Skyhub workspace

  1. Get PC workstation with installed Linux x86-64 Ubuntu 22.04 distribution.
  2. Install ROS 2 Humble using apt package manager: sudo apt-get install ros-humble-ros-base.
  3. Install required tools using apt package manager: sudo apt-get install git cmake curl gnupg2 lsb-release wget tar libasio-dev python3-colcon-common-extensions libpython3.10-dev python3-dev
  4. Download Skyhub SDK package from here.
  5. Install SDK using this command: sudo dpkg -i ugcs-skyhub-sdk_1.6.0.484_amd64.deb

Build examples for x86-64 platform and run them

You may build all samples in a batch or one-by-one. In any way you'll use colcon utility as it used for any ROS2 projects. These steps to build examples from this repository.

  1. Clone this repository on you build workstation: git clone git@github.com:ugcs/skyhub-ros-sdk.git
  2. Change directory to the package you want to build: cd skyhub-ros-sdk
  3. Source you workspace with ROS2 humble framework: source /opt/ros/humble/setup.bash
  4. Source you workspace with Skyhub SDK: source /opt/ugcs/skyhub-ros/local_setup.bash
  5. Now build the sample with colcon: colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON

Then build process complete, your module will be in ./install/skyhub_demo/ directory.

To be able to run mouse-log example, you may need to adjust the access rights: sudo chmod 666 /dev/input/mouse0

Now run the built module (mouse-log for example): SKYHUB_CONFIG_FILE=./skyhub.conf ~/skyhub-ros-sdk/install/skyhub_demo/lib/skyhub_demo/mouse-log

Build environment setup for ARM64 platform

To make run you modules on target Skyhub platform you must use cross-compile environment. We provide the docker container which contains the required toolchain.

  1. Cross-build is supported on the same Linux x86-64 Ubuntu 22.04 OS as for regular x86-development. Use this OS as your base.
  2. Pull the docker image, suited for the used SDK version (1.4): docker pull ugcs/skyhub-ros-drivers:sdk-1.5
  3. Run the contaier: docker run -it -d --name driver-build-container ugcs/skyhub-ros-drivers:sdk-1.5 /bin/bash`
  4. Copy the desired package to build into the running contaier: docker cp ~/skyhub-ros-sdk/skyhub_demo driver-build-container:/root/
  5. Connect to the target container: docker attach driver-build-container
  6. Inside the container set the target platform: export DESKTOP_ARCH=arm64 && export UBUNTU_NAME=hirsute
  7. Now switch to the package directory inside the container: 'cd skyhub_demo'
  8. Source the toolchain settings: source /opt/ros2_env.bash
  9. And run the command to build the package: colcon build --cmake-args -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release

After the successful build you will get the binaries INSIDE the container in the /root/skyhub_demo/install directory. Now you may get it back to the host:

tar -cvzf driver.tar.gz ./install

exit

docker cp driver-build-container:/root/skyhub_demo/driver.tar.gz ./

Remove the container if you do not need to re-run the build: docker rm -f driver-build-container | true

Deployment on the Skyhub

Then you get the binaries for the target platform (ARM64), you need to put them into Skyhub eco-system.

  1. Copy the driver.tar.gz to the running Skyhub using SCP utility: scp driver.tar.gz root@10.1.0.1
  2. Connect to the Skyhub using SSH: ssh root@10.1.0.1
  3. Untar the archive: tar -xvzf driver.tar.gz
  4. Create the directory for the new Skyhub module: mkdir -p /var/skyhub/modules/skyhub_demo
  5. Copy the content of the archive: mv ~/install/* /var/skyhub/modules/
  6. Add the new section to the /etc/skyhub/payloads.conf: MOUSE. Use any existing section as a template. You need to replace the package and binary names.
  7. Now restart the Skyhub service: service skyhub restart.

Then the service will start again, you will see the desired payload module (MOUSE=false) in the 'ROS_PAYLOADS' section. Set it to enable (MOUSE=true) and restart the service again. Now it will add the default configuration section for this module.