Skip to content

Commit

Permalink
fixed webots docker should be fixed. fixed compose.sim so it can laun…
Browse files Browse the repository at this point in the history
…ch the docker
  • Loading branch information
manx52 committed Oct 5, 2024
1 parent 1c43d98 commit 7e1a142
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ repos:
# rev: '' # Use the sha / tag you want to point at
# hooks:
# - id: mypy
# exclude: "cmake-build-debug|setup.py|external"
# exclude: "cmake-build-debug|setup.py|external|soccer_strategy|soccer_common|soccer_msgs|soccer_localization|soccer_description|soccer_webots|test_integration.py"
# args: ["--config-file","pyproject.toml"]
11 changes: 4 additions & 7 deletions external/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apt update && apt-fast install -y \
libprotobuf-dev \
libjpeg9-dev \
wget \
ant \
dirmngr \
gnupg2 \
lsb-release \
Expand Down Expand Up @@ -48,22 +49,18 @@ RUN echo "export WEBOTS_HOME=/usr/local/webots" >> ~/.bashrc
RUN echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$WEBOTS_HOME/lib/controller" >> ~/.bashrc
RUN echo "export PYTHONPATH=$PYTHONPATH:$WEBOTS_HOME/lib/controller/python38" >> ~/.bashrc

WORKDIR /usr/local

WORKDIR /usr/local/

COPY hlvs_webots hlvs_webots
RUN cd hlvs_webots/controllers/referee && \
pip3 install numpy==1.20.2 && \
pip3 install -r requirements.txt

COPY GameController GameController
RUN apt update && apt-fast -y install ant protobuf-compiler libprotobuf-dev && \
cd GameController && \
ant
RUN cd GameController && ant


RUN apt-fast install -y protobuf-compiler libprotobuf-dev && \
cd hlvs_webots && \
RUN cd hlvs_webots && \
make clean && \
make

Expand Down
1 change: 1 addition & 0 deletions soccer_common/src/soccer_common/transformation2d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""EXPERIMENTAL, USE AT YOUR OWN RISK!"""

import math

import numpy as np
Expand Down
8 changes: 4 additions & 4 deletions tools/docker/compose.simulation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ x-simulator: &simulator
cap_add:
- SYS_PTRACE
pid: "host"
command: bash -c "sleep "
command: bash -c "webots --batch --sysinfo --log-performance=performance.log ./hlvs_webots/worlds/robocup.wbt"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /dev/dri:/dev/dri:rw
- /dev/snd:/dev/snd:rw
- ./external/hlvs_webots/worlds:/usr/local/hlvs_webots/worlds:rw
- ./external/hlvs_webots/controllers/referee/:/usr/local/hlvs_webots/controllers/referee/:rw
- ./external/hlvs_webots/protos/:/usr/local/hlvs_webots/protos/:rw
- /home/$USER/catkin_ws/src/soccerbot/external/hlvs_webots/worlds:/usr/local/hlvs_webots/worlds:rw
- /home/$USER/catkin_ws/src/soccerbot/external/hlvs_webots/controllers/referee/:/usr/local/hlvs_webots/controllers/referee/:rw
- /home/$USER/catkin_ws/src/soccerbot/external/hlvs_webots/protos/:/usr/local/hlvs_webots/protos/:rw
- /var/run/docker.sock:/var/run/docker.sock
- /dev:/dev

Expand Down

0 comments on commit 7e1a142

Please sign in to comment.