pip #37
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@v4 | |
with: | |
path: src/kuka_robot_descriptions | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install colcon and lxml | |
run: | | |
apt update | |
apt install -y ros-humble-xacro | |
python -m pip install --upgrade pip | |
pip install lxml | |
- 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: Remove ros2_control and visual tags | |
run: | | |
for file in urdf_out/*.urdf; do | |
python 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 |