diff --git a/README.md b/README.md index b457caf..fcab568 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ sudo apt install -y ros-${ROS_DISTRO}-webots-ros2 \ ros-${ROS_DISTRO}-ros2-controllers \ ros-${ROS_DISTRO}-moveit \ ros-${ROS_DISTRO}-moveit-py \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ ros-${ROS_DISTRO}-ament-cmake-clang-format \ ros-${ROS_DISTRO}-rosbag2-storage-mcap \ ros-${ROS_DISTRO}-librealsense2 \ diff --git a/docker/jazzy/ros-base/Dockerfile b/docker/jazzy/ros-base/Dockerfile index be50216..9d9cb29 100644 --- a/docker/jazzy/ros-base/Dockerfile +++ b/docker/jazzy/ros-base/Dockerfile @@ -1,4 +1,5 @@ -FROM evilfisru/ros:jazzy-core-noble +ARG IMAGE=evilfisru/ros:core-jazzy +FROM ${IMAGE} RUN apt-get update && apt-get install --no-install-recommends -y \ build-essential \ diff --git a/docker/jazzy/ros-iiwa7-webots/Dockerfile b/docker/jazzy/ros-iiwa7-webots/Dockerfile index 6753085..cb8f560 100644 --- a/docker/jazzy/ros-iiwa7-webots/Dockerfile +++ b/docker/jazzy/ros-iiwa7-webots/Dockerfile @@ -1,4 +1,6 @@ -FROM evilfisru/ros:jazzy-base-noble +ARG IMAGE=evilfisru/ros:base-jazzy +FROM ${IMAGE} + ARG BUILD_TYPE=release ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp @@ -40,16 +42,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /ros2_ws -COPY src/iiwa_* src/ +COPY src/iiwa_bringup src/iiwa_bringup +COPY src/iiwa_config src/iiwa_config +COPY src/iiwa_controller src/iiwa_controller +COPY src/iiwa_description src/iiwa_description +COPY src/iiwa_msgs src/iiwa_msgs +COPY src/iiwa_planning src/iiwa_planning +COPY src/iiwa_utils src/iiwa_utils 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 && \ +RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \ colcon build --mixin release -RUN if [ "$BUILD_TYPE" = "release" ]; then rm -rf src/ build/ log/; fi +RUN if [ "${BUILD_TYPE}" = "release" ]; then rm -rf src/ build/ log/; fi RUN echo ". /ros2_ws/install/setup.bash" >> /root/.bashrc diff --git a/docker/jazzy/ros-iiwa7-webots/run.sh b/docker/jazzy/ros-iiwa7-webots/run.sh index 1a27417..3a38eb4 100755 --- a/docker/jazzy/ros-iiwa7-webots/run.sh +++ b/docker/jazzy/ros-iiwa7-webots/run.sh @@ -4,7 +4,7 @@ # ./run.sh — interactive shell # ./run.sh ros2 launch iiwa_bringup webots_spawn.launch.py ... -IMAGE="${WEBOTS_IMAGE:-evilfisru/lwc:jazzy-webots}" +IMAGE="${WEBOTS_IMAGE:-evilfisru/lwc:webots-jazzy}" # Allow local Docker processes to connect to the X server xhost +local:docker > /dev/null @@ -12,6 +12,7 @@ xhost +local:docker > /dev/null docker run -it --rm \ --name ros-webots \ --network host \ + -e USER=root \ -e DISPLAY="${DISPLAY}" \ -e QT_X11_NO_MITSHM=1 \ -e LIBGL_ALWAYS_SOFTWARE=1 \ diff --git a/docker/jazzy/ros-iiwa7/Dockerfile b/docker/jazzy/ros-iiwa7/Dockerfile index 2271cf9..f66d1c7 100644 --- a/docker/jazzy/ros-iiwa7/Dockerfile +++ b/docker/jazzy/ros-iiwa7/Dockerfile @@ -1,4 +1,6 @@ -FROM evilfisru/ros:jazzy-base-noble +ARG IMAGE=evilfisru/ros:base-jazzy +FROM ${IMAGE} + ARG BUILD_TYPE=release ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp @@ -15,7 +17,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /ros2_ws -COPY src/iiwa_* src/ +COPY src/iiwa_bringup src/iiwa_bringup +COPY src/iiwa_config src/iiwa_config +COPY src/iiwa_controller src/iiwa_controller +COPY src/iiwa_description src/iiwa_description +COPY src/iiwa_msgs src/iiwa_msgs +COPY src/iiwa_planning src/iiwa_planning +COPY src/iiwa_utils src/iiwa_utils RUN apt-get update && \ rosdep install --from-paths src -i -r -y && \ diff --git a/src/iiwa_config/config/setting.yaml b/src/iiwa_config/config/setting.yaml index 7f5d950..dd19803 100644 --- a/src/iiwa_config/config/setting.yaml +++ b/src/iiwa_config/config/setting.yaml @@ -3,7 +3,7 @@ robot: ip: "192.170.10.2" port: 30200 command_mode: "position" # torque, position - fri_cycle_ms: 5 # период FRI-цикла: 5 мс (200 Гц) или 10 мс (100 Гц) + fri_cycle_ms: 10 # период FRI-цикла: 5 мс (200 Гц) или 10 мс (100 Гц) joint_position_tau: 0.04 # EMA фильтр позиций [с]: сглаживает команды перед отправкой в FRI joint_velocity_tau: 0.01 # EMA фильтр скорости [с]: убирает выбросы конечных разностей active_controller: "jtc" # "jtc" = MoveIt/JointTrajectoryController, "forward" = ForwardCommandController