From 934a2549586e4a3aa9a357bad2f6be56317062ba Mon Sep 17 00:00:00 2001 From: Ruixiang Du Date: Fri, 31 Mar 2023 09:27:13 +0800 Subject: [PATCH] ci: added more building test environments --- .github/workflows/ros-ci.yml | 36 +++++++++++++++++-- .github/workflows/standalone-ci.yml | 11 +++--- README.md | 56 ++++++++++++++++------------- 3 files changed, 70 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml index 8ea8600..2e09052 100644 --- a/.github/workflows/ros-ci.yml +++ b/.github/workflows/ros-ci.yml @@ -6,8 +6,6 @@ name: ROS # events but only for the master branch on: push: - branches: - - main pull_request: branches: - main @@ -31,6 +29,40 @@ jobs: - name: Run catkin_make run: cd /catkin_ws && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make" + build-noetic: + # The type of runner that the job will run on + runs-on: ubuntu-20.04 + container: + image: ros:noetic-robot + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libasio-dev + - name: Create catkin workspace + run: mkdir -p /catkin_ws/src && cd /catkin_ws/src && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_init_workspace" + - name: Copy code to catkin workspace + run: cd /catkin_ws/src && git clone https://github.com/westonrobot/ugv_sdk.git + - name: Run catkin_make + run: cd /catkin_ws && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make" + + build-foxy: + # The type of runner that the job will run on + runs-on: ubuntu-20.04 + container: + image: ros:foxy + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libasio-dev + - name: Create colcon workspace + run: mkdir -p /ros2_ws/src && cd /ros2_ws/src && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash" + - name: Copy code to colcon workspace + run: cd /ros2_ws/src && git clone https://github.com/westonrobot/ugv_sdk.git + - name: Run colcon build + run: cd /ros2_ws && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build" + build-humble: # The type of runner that the job will run on runs-on: ubuntu-22.04 diff --git a/.github/workflows/standalone-ci.yml b/.github/workflows/standalone-ci.yml index 04a6cc4..379df65 100644 --- a/.github/workflows/standalone-ci.yml +++ b/.github/workflows/standalone-ci.yml @@ -2,19 +2,18 @@ name: Cpp on: push: - branches: - - main pull_request: branches: - main jobs: build: - - runs-on: ubuntu-18.04 - + strategy: + matrix: + os: [ ubuntu-22.04, ubuntu-20.04, ubuntu-18.04 ] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies run: sudo apt-get install -y build-essential cmake libasio-dev - name: Build and pack diff --git a/README.md b/README.md index 387c3d0..4fb93ee 100755 --- a/README.md +++ b/README.md @@ -5,14 +5,19 @@ ## Introduction -This software package provides a C++ interface to communicate with the mobile platforms from Weston Robot and AgileX Robotics, for sending commands to the robot and receiving the latest robot state. The repository is a joint effort by the development teams at Weston Robot (Singapore) and AgileX Robotics (China). +This software package provides a C++ interface to communicate with the mobile platforms, for sending commands to the +robot and receiving the latest robot state. The repository is a joint effort by the development teams at **Weston Robot ( +Singapore)** and **AgileX Robotics (China)**. -- Copyright (c) 2020-2021 [Weston Robot](https://www.westonrobot.com/) -- Copyright (c) 2020-2021 [AgileX Robotics](http://www.agilex.ai/?lang=zh-cn) +- Copyright (c) 2020-2023 [Weston Robot](https://www.westonrobot.com/) +- Copyright (c) 2020-2023 [AgileX Robotics](http://www.agilex.ai/?lang=zh-cn) -Please create an issue on Github at https://github.com/westonrobot/ugv_sdk/issues if you encounter any problems when using the packages. +Please create an issue on Github at https://github.com/westonrobot/ugv_sdk/issues if you encounter any problems when +using the packages. -**Supported robot platforms** +## Supported Platforms + +### Robot bases * Scout * Scout Mini @@ -21,7 +26,7 @@ Please create an issue on Github at https://github.com/westonrobot/ugv_sdk/issue * Bunker * Ranger Mini -**Supported environments** +### Software environments * Architecture: x86_64/arm64 * OS: Ubuntu 16.04/18.04/20.04 @@ -29,23 +34,23 @@ Please create an issue on Github at https://github.com/westonrobot/ugv_sdk/issue It should also work in other similar Linux environments but only the above listed environments are regularly tested. -**Communication protocol** +### Communication protocols -| Robot | Protocol V1 | Protocol V2 | UART | CAN | Support Status | -| :---------------: | :---------: | :---------: | :---: | :---: | :------------: | -| Scout 1.0 | Y | - | N | Y | Discontinued | -| Scout 2.0 | Y | Y | N | Y | Active | -| Scout Mini (Skid) | Y | Y | - | Y | Active | -| Scout Mini (Omni) | Y | Y | - | Y | Active | -| Hunter 1.0 | Y | Y | - | Y | Active | -| Hunter 2.0 | - | Y | - | Y | Active | -| Bunker | Y | Y | - | Y | Active | -| Tracer | - | Y | N | Y | Active | -| Ranger Mini | - | Y | - | Y | Active | +| Robot | Protocol V1 | Protocol V2 | UART | CAN | Support Status | +|:-----------------:|:-----------:|:-----------:|:----:|:---:|:--------------:| +| Scout 1.0 | Y | - | N | Y | Discontinued | +| Scout 2.0 | Y | Y | N | Y | Active | +| Scout Mini (Skid) | Y | Y | - | Y | Active | +| Scout Mini (Omni) | Y | Y | - | Y | Active | +| Hunter 1.0 | Y | Y | - | Y | Active | +| Hunter 2.0 | - | Y | - | Y | Active | +| Bunker | Y | Y | - | Y | Active | +| Tracer | - | Y | N | Y | Active | +| Ranger Mini | - | Y | - | Y | Active | -**Important Note** - -The main branch of this repository supports all Scout variants and both V1 and V2 protocol. Earlier versions of the SDK can be found in v1.x and v2.x branch for V1 and V2 protocol support respectively. +**Important note:** The main branch of this repository supports all Scout variants and both V1 and V2 protocol. Earlier +versions of the SDK can be found in v1.x and v2.x branch for V1 and V2 protocol support respectively. These two branches are not +actively maintained any longer and only kept for reference. * V1 Protocol: v1.x branch of scout_ros and ugv_sdk * V2 Protocol: v2.x branch of scout_ros and ugv_sdk @@ -68,8 +73,8 @@ $ cd .. $ catkin_make ``` -## Setup CAN-To-USB adapter - +## Setup CAN-To-USB adapter + 1. Enable gs_usb kernel module ``` $ sudo modprobe gs_usb @@ -94,7 +99,8 @@ $ catkin_make $ cansend can0 001#1122334455667788 ``` -Two scripts inside the "./scripts" folder are provided for easy setup. You can run "./setup_can2usb.bash" for the first-time setup and run "./bringup_can2usb.bash" to bring up the device each time you unplug and re-plug the adapter. +Two scripts inside the "./scripts" folder are provided for easy setup. You can run "./setup_can2usb.bash" for the +first-time setup and run "./bringup_can2usb.bash" to bring up the device each time you unplug and re-plug the adapter. ## Demo Code @@ -106,4 +112,4 @@ $ ./bin/demo_scout_robot can0 ## Reference -* [CAN command reference in Linux](https://rdu.im/docs/canbus) +* [CAN command reference in Linux](https://notes.rdu.im/system/linux/canbus/)