From 35e9f9120230907314e9018936695b2e0a500e37 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 4 Apr 2023 19:00:45 +0200 Subject: [PATCH] Generalize gazebo model discovery --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ede12093c4..d571d474612 100644 --- a/Dockerfile +++ b/Dockerfile @@ -180,8 +180,9 @@ RUN git clone --branch python3 https://github.com/ruffsl/gzweb.git $GZWEB_WS # build gzweb RUN cd $GZWEB_WS && . /usr/share/gazebo/setup.sh && \ - GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models && \ - GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/$ROS_DISTRO/share/aws_robomaker_small_warehouse_world/models && \ + GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(find /opt/ros/$ROS_DISTRO/share \ + -mindepth 1 -maxdepth 2 -type d -name "models" \ + | xargs | sed -e 's/ /:/g') && \ xvfb-run -s "-screen 0 1280x1024x24" ./deploy.sh -m local && \ ln -s http/client/assets http/client/assets/models