Skip to content

Commit

Permalink
revert tools
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Jul 26, 2024
1 parent c6e7c1d commit 7465a9e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 45 deletions.
27 changes: 13 additions & 14 deletions tools/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG ROS_DISTRO=jazzy
ARG ROS_DISTRO=z
ARG PREFIX=
ARG HUSARION_ROS_BUILD_TYPE=hardware

## =========================== ROS builder ===============================
FROM rosbot-jazzy-rosdep
FROM husarnet/ros:${PREFIX}${ROS_DISTRO}-ros-base AS ros_builder

ARG ROS_DISTRO
ARG PREFIX
Expand All @@ -12,21 +12,20 @@ ARG HUSARION_ROS_BUILD_TYPE
ENV HUSARION_ROS_BUILD_TYPE=${HUSARION_ROS_BUILD_TYPE}

WORKDIR /ros2_ws
RUN mkdir -p src
RUN mkdir src

COPY ./ src/

RUN apt-get update && apt-get install -y \
python3-pip \
stm32flash python3-periphery python3-ftdi


COPY ./ src/
# RUN vcs import src < src/rosbot/rosbot_hardware.repos && \
# if [ "$HUSARION_ROS_BUILD_TYPE" == "simulation" ]; then \
# vcs import src < src/rosbot/rosbot_simulation.repos; \
# else \
# rm -rf src/rosbot_gazebo; \
# fi && \
RUN rm -rf src/rosbot_gazebo; rm -rf src/rosbot_controllers/mecanum_drive_controller \
stm32flash

RUN vcs import src < src/rosbot/rosbot_hardware.repos && \
if [ "$HUSARION_ROS_BUILD_TYPE" == "simulation" ]; then \
vcs import src < src/rosbot/rosbot_simulation.repos; \
else \
rm -rf src/rosbot_gazebo; \
fi && \
rm -rf /etc/ros/rosdep/sources.list.d/20-default.list && \
rosdep init && \
rosdep update --rosdistro $ROS_DISTRO && \
Expand Down
41 changes: 10 additions & 31 deletions tools/compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,16 @@ services:
build:
context: ../
dockerfile: tools/Dockerfile.dev
network_mode: host
ipc: host
# privileged: true # GPIO
# devices:
# - ${SERIAL_PORT:?err}
# - /dev/bus/usb/ #FTDI
devices:
- ${SERIAL_PORT:?err}
- /dev/bus/usb/ #FTDI
volumes:
- ../rosbot_utils:/ros2_ws/src/rosbot_utils
# command: tail -f /dev/null
environment:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
command: >
ros2 launch rosbot_bringup bringup.launch.py
mecanum:=${MECANUM:-False}
namespace:=rosbot
rviz:
image: husarion/rviz2:jazzy-jazzy
# build:
# context: ..
# dockerfile: Dockerfile
network_mode: host
ipc: host
runtime: nvidia
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# - ./rosbot.rviz:/root/.rviz2/default.rviz
environment:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
- ROS_DOMAIN_ID
- DISPLAY
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
command: >
rviz2 --ros-args -r __ns:=/rosbot -r /tf:=tf -r /tf_static:=tf_static
command: tail -f /dev/null
# command: >
# ros2 launch rosbot_bringup combined.launch.py
# mecanum:=${MECANUM:-False}
# serial_port:=$SERIAL_PORT
# serial_baudrate:=576000
# namespace:=robot1

0 comments on commit 7465a9e

Please sign in to comment.