Skip to content

Commit

Permalink
fixed sim docker for the new way to download webots. minor fixes to u…
Browse files Browse the repository at this point in the history
…nit test
  • Loading branch information
manx52 committed Oct 3, 2024
1 parent cc8e336 commit c2167c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 36 deletions.
21 changes: 0 additions & 21 deletions external/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
webots/.*
webots/.clang-format
webots/msys64
webots/webots
webots/webots.lnk
webots/webots_debug_output.txt
webots/util
webots/bin/webots-bin
webots/**/*.exe
webots/**/*.o
webots/**/*.d
webots/**/*.class
webots/**/*.so
webots/**/*.dylib
webots/**/*.dll
webots/**/*.lib
webots/**/*.a
webots/**/*.cof
webots/**/*.hex
webots/**/*.pyc
webots/**/*.gch
GameController/.*
GameController/build/
hlvs_webots/controllers/referee/meshes/*
Expand Down
22 changes: 11 additions & 11 deletions external/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM nvidia/cudagl:11.4.2-base

ENV DEBIAN_FRONTEND=noninteractive

#TODO how should i split, should it be its own repo?. The dockerfile should be in hlvs_webots and we can probably rebuild when there is a puch on it
# Install dependencies
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt update && \
Expand Down Expand Up @@ -37,15 +37,16 @@ RUN apt update && apt-fast install -y \

RUN pip3 install transforms3d

WORKDIR /usr/local
ARG WEBOTS_VERSION="2022b"
ARG WEBOTS_DOWNLOAD_URL="https:/cyberbotics/webots/releases/download/R${WEBOTS_VERSION}/webots_${WEBOTS_VERSION}_amd64.deb"

RUN wget --no-verbose --show-progress "$WEBOTS_DOWNLOAD_URL" -O "/tmp/webots_${WEBOTS_VERSION}.deb" && sudo apt-get install "/tmp/webots_${WEBOTS_VERSION}.deb" -y

COPY webots/scripts webots/scripts
RUN ./webots/scripts/install/linux_compilation_dependencies.sh
ENV WEBOTS_HOME /usr/local/webots
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 && source ~/.bashrc

COPY webots webots
RUN echo WEBOTS_HOME="/usr/local/webots" >> ~/.bashrc && \
cd webots && \
export WEBOTS_HOME="/usr/local/webots" && make

COPY GameController GameController
RUN apt update && apt-fast -y install ant protobuf-compiler libprotobuf-dev libjpeg9-dev && \
Expand All @@ -59,13 +60,12 @@ RUN cd hlvs_webots/controllers/referee && \

RUN apt-get install -y protobuf-compiler libprotobuf-dev libjpeg9-dev && \
cd hlvs_webots && \
WEBOTS_HOME=/usr/local/webots make clean && \
WEBOTS_HOME=/usr/local/webots make
make clean && \
make

RUN pip3 install pyyaml

ENV QTWEBENGINE_DISABLE_SANDBOX=1
ENV WEBOTS_HOME /usr/local/webots
ENV GAME_CONTROLLER_HOME /usr/local/GameController

SHELL ["/bin/bash", "-c"]
5 changes: 1 addition & 4 deletions soccer_control/soccer_pycontrol/test/test_placo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ def test_bez1(self):
real_time=REAL_TIME,
rate=200,
)
self.bez = Bez(robot_model="bez1", pose=Transformation())
self.bez = Bez(robot_model="bez2", pose=Transformation())
walk = Navigator(self.world, self.bez)
# walk.ready()
# self.bez.motor_control.set_motor()
# walk.wait(50)
target_goal = [0.08, 0, 0, 3, 500]
# target_goal = Transformation(position=[1, 0, 0], euler=[0, 0, 0])
walk.walk(target_goal)
Expand Down

0 comments on commit c2167c4

Please sign in to comment.