combine #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: URDF transform | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ros:humble-ros-base | |
options: --workdir /github/home/ws | |
steps: | |
- name: Create working directory | |
run: mkdir -p /github/home/ws/src | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
path: src/kuka_robot_descriptions | |
- name: Install colcon | |
run: | | |
apt update | |
apt install -y ros-humble-xacro | |
- name: Build support packages | |
run: | | |
source /opt/ros/humble/setup.bash | |
colcon build --packages-ignore kuka_mock_hardware_interface kuka_kr_moveit_config kuka_lbr_iisy_moveit_config kuka_lbr_iiwa_moveit_config | |
shell: bash | |
- name: List .urdf.xacro files | |
run: | | |
files=$(find src -name "*.urdf.xacro") | |
echo $files | |
for file in $files | |
do | |
echo $file | |
filename=$(basename -- "$file") | |
filename="${filename%.*}" | |
xacro $file > urdf_out/${filename}.urdf | |
done | |
# - name: Generate URDF files | |
# run: | | |
# source /opt/ros/humble/setup.bash | |
# source install/setup.bash | |
# mkdir -p urdf_out | |
# for file in $files | |
# do | |
# echo $file | |
# filename=$(basename -- "$file") | |
# filename="${filename%.*}" | |
# xacro $file > urdf_out/${filename}.urdf | |
# done | |
# shell: bash | |
- name: Upload URDF output directory as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: urdf-artifact | |
path: urdf_out |