Skip to content
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@v4
with:
path: src/kuka_robot_descriptions
- name: Install colcon, lxml and blender python module dependencies
run: |
apt update
apt install -y ros-humble-xacro python3-pip libxxf86vm-dev libxfixes-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev libxkbcommon-dev
python3 -m pip install lxml bpy mathutils
- 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 and generate .urdf-s
run: |
source /opt/ros/humble/setup.bash
source install/setup.bash
mkdir -p urdf_out
files=$(find src -name "*.urdf.xacro")
for file in $files
do
filename=$(basename -- "$file")
filename="${filename%.*}"
xacro $file use_fake_hardware:=true > urdf_out/${filename}
done
shell: bash
- name: Generate URDF without mesh files and ros2_control tag
run: |
for file in urdf_out/*.urdf; do
python3 src/kuka_robot_descriptions/.github/scripts/modify_urdf.py "$file"
done
- name: Upload URDF output directory as artifact
uses: actions/upload-artifact@v4
with:
name: urdf-artifact
path: urdf_out