feat: 初始化 Go2 导航相关代码与配置
This commit is contained in:
43
unitree_ros2/.github/workflows/build-humble.yml
vendored
Executable file
43
unitree_ros2/.github/workflows/build-humble.yml
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
name: Build in ubuntu:22.04 with ROS2 Humble
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest # Use latest runner to host the container
|
||||
|
||||
container:
|
||||
image: althack/ros2:humble-full
|
||||
options: --privileged # Needed for some build tools
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
|
||||
apt-get update
|
||||
apt install -y ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl
|
||||
- name: ROS2 build
|
||||
run: |
|
||||
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
||||
cd cyclonedds_ws
|
||||
git clone https://github.com/ros2/rmw_cyclonedds -b humble
|
||||
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
|
||||
cd ..
|
||||
export LD_LIBRARY_PATH=/opt/ros/humble/lib
|
||||
colcon build --packages-select cyclonedds
|
||||
. /opt/ros/humble/setup.sh
|
||||
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
||||
cd cyclonedds_ws
|
||||
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --packages-select unitree_go unitree_hg unitree_api
|
||||
. ./install/setup.sh
|
||||
cd ..
|
||||
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --packages-select unitree_ros2_example
|
||||
. ./install/setup.sh
|
||||
echo "Build completed successfully."
|
||||
Reference in New Issue
Block a user