Add Dockerfile and run script for Webots integration; update package dependencies
This commit is contained in:
@@ -159,5 +159,7 @@ chmod +x doc/build_docs.sh
|
||||
<!-- iiwa controller - docker -->
|
||||
<!-- Lightweight cobot -->
|
||||
```bash
|
||||
docker build -t evilfisru/lwc:... -f docker/jazzy/.../Dockerfile .
|
||||
|
||||
docker run -it --rm --network host evilfisru/lwa:jazzy-lwa7-noble
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
FROM evilfisru/ros:jazzy-base-noble
|
||||
|
||||
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
||||
ENV WEBOTS_HOME=/usr/local/webots
|
||||
ENV LIBGL_ALWAYS_SOFTWARE=1
|
||||
ENV GALLIUM_DRIVER=llvmpipe
|
||||
|
||||
# X11 utilities and Mesa software renderer
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
libx11-6 \
|
||||
x11-utils \
|
||||
libglu1-mesa \
|
||||
libgl1-mesa-dri \
|
||||
mesa-utils \
|
||||
libegl-mesa0 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Webots R2025a (compatible with ros-jazzy-webots-ros2)
|
||||
RUN wget -q https://github.com/cyberbotics/webots/releases/download/R2025a/webots_2025a_amd64.deb \
|
||||
-O /tmp/webots.deb && \
|
||||
apt-get update && \
|
||||
apt-get install -y /tmp/webots.deb && \
|
||||
rm /tmp/webots.deb && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ros-jazzy-rmw-cyclonedds-cpp \
|
||||
# ros-jazzy-webots-ros2-control \
|
||||
python3-pil \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /ros2_ws
|
||||
|
||||
COPY src/ src/
|
||||
|
||||
RUN apt-get update && \
|
||||
rosdep install --from-paths src -i -r -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
|
||||
colcon build --mixin release
|
||||
|
||||
RUN echo ". /ros2_ws/install/setup.bash" >> /root/.bashrc
|
||||
|
||||
CMD ["bash"]
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# Run the Webots container with X11 forwarding.
|
||||
# Usage:
|
||||
# ./run.sh — interactive shell
|
||||
# ./run.sh ros2 launch iiwa_bringup webots_spawn.launch.py ...
|
||||
|
||||
IMAGE="${WEBOTS_IMAGE:-evilfisru/lwc:jazzy-webots}"
|
||||
|
||||
# Allow local Docker processes to connect to the X server
|
||||
xhost +local:docker > /dev/null
|
||||
|
||||
docker run -it --rm \
|
||||
--name ros-webots \
|
||||
--network host \
|
||||
-e DISPLAY="${DISPLAY}" \
|
||||
-e QT_X11_NO_MITSHM=1 \
|
||||
-e LIBGL_ALWAYS_SOFTWARE=1 \
|
||||
-e GALLIUM_DRIVER=llvmpipe \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
|
||||
"${IMAGE}" \
|
||||
"$@"
|
||||
@@ -13,6 +13,7 @@
|
||||
<exec_depend>iiwa_utils</exec_depend>
|
||||
<exec_depend>iiwa_config</exec_depend>
|
||||
<exec_depend>iiwa_description</exec_depend>
|
||||
<exec_depend>foxglove_bridge</exec_depend>
|
||||
|
||||
<!-- ROS 2 infrastructure -->
|
||||
<exec_depend>launch</exec_depend>
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
<!-- Webots -->
|
||||
<exec_depend>webots_ros2_driver</exec_depend>
|
||||
<exec_depend>webots_ros2_control</exec_depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<!-- Runtime plugins referenced in YAML configs -->
|
||||
<exec_depend>moveit_kinematics</exec_depend>
|
||||
<exec_depend>moveit_simple_controller_manager</exec_depend>
|
||||
<exec_depend>moveit_planners_ompl</exec_depend>
|
||||
<exec_depend>pilz_industrial_motion_planner</exec_depend>
|
||||
<exec_depend>moveit_planners_chomp</exec_depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
|
||||
@@ -15,10 +15,15 @@
|
||||
<depend>moveit_ros_planning_interface</depend>
|
||||
<depend>moveit_core</depend>
|
||||
<depend>moveit_ros_planning</depend>
|
||||
<depend>moveit_planners_ompl</depend>
|
||||
<depend>pilz_industrial_motion_planner</depend>
|
||||
<depend>moveit_planners_chomp</depend>
|
||||
<depend>moveit_msgs</depend>
|
||||
<depend>geometry_msgs</depend>
|
||||
<depend>std_srvs</depend>
|
||||
<depend>moveit_py</depend>
|
||||
<depend>tf_transformations</depend>
|
||||
<depend>python3-scipy</depend>
|
||||
<depend>iiwa_msgs</depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<depend>rviz_rendering</depend>
|
||||
<depend>rviz_default_plugins</depend>
|
||||
<depend>pluginlib</depend>
|
||||
<depend>cv_bridge</depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
|
||||
@@ -8,6 +8,15 @@
|
||||
<maintainer email="nir.azkiel@realsenseai.com">Nir Azkiel</maintainer>
|
||||
<license>Apache-2.0</license>
|
||||
|
||||
<exec_depend>rclpy</exec_depend>
|
||||
<exec_depend>sensor_msgs</exec_depend>
|
||||
<exec_depend>std_srvs</exec_depend>
|
||||
<exec_depend>rcl_interfaces</exec_depend>
|
||||
<exec_depend>tf2_ros</exec_depend>
|
||||
<exec_depend>realsense2_camera_msgs</exec_depend>
|
||||
<exec_depend>python3-numpy</exec_depend>
|
||||
<exec_depend>python3-paho-mqtt</exec_depend>
|
||||
|
||||
<test_depend>ament_copyright</test_depend>
|
||||
<test_depend>ament_flake8</test_depend>
|
||||
<test_depend>ament_pep257</test_depend>
|
||||
|
||||
Reference in New Issue
Block a user