V-REP on Docker

Typically: "How do I... ", "How can I... " questions
Post Reply
gvgramazio
Posts: 18
Joined: 23 Feb 2018, 14:46

V-REP on Docker

Post by gvgramazio »

Hi, I'm trying to build a docker image with all the requirements to run v-rep and I have some troubles. This is what I have right now:

Code: Select all

FROM ubuntu:16.04

RUN apt-get update && apt-get -y install \
      curl \
      sudo

# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
    mkdir -p /home/developer && \
    echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
    echo "developer:x:${uid}:" >> /etc/group && \
    echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
    chmod 0440 /etc/sudoers.d/developer && \
    chown ${uid}:${gid} -R /home/developer

USER developer
ENV HOME /home/developer

RUN cd /home/developer && \
    curl http://coppeliarobotics.com/files/V-REP_PRO_EDU_V3_5_0_Linux.tar.gz --output vrep.tar.gz && \
    tar -xzf vrep.tar.gz && \
    rm vrep.tar.gz
But if I run `./vrep.sh` in the V-REP directory I encounter an error of missing libraries. If I run `./libLoadErrorCheck.sh ` I have the following output.

Code: Select all

	linux-vdso.so.1 =>  (0x00007ffdac474000)
	liblua5.1.so (0x00007fa23a8e5000)
	libqscintilla2.so.9 (0x00007fa239324000)
	libQt5OpenGL.so.5 (0x00007fa2390cd000)
	libQt5Widgets.so.5 (0x00007fa23889c000)
	libQt5Gui.so.5 (0x00007fa2380ef000)
	libQt5SerialPort.so.5 (0x00007fa237ed6000)
	libQt5Network.so.5 (0x00007fa237b45000)
	libQt5Core.so.5 (0x00007fa23740d000)
	libGL.so.1 => not found
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa2371f0000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa236e6e000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa236b65000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa23694f000)
	libc.so.6 This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
./vrep.sh: line 33:   543 Aborted                 (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"
=> /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa236585000)
	libQt5PrintSupport.so.5 (0x00007fa236317000)
	libGL.so.1 => not found
	libGL.so.1 => not found
	libGL.so.1 => not found
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa2360fd000)
	libicui18n.so.56 (0x00007fa235c64000)
	libicuuc.so.56 (0x00007fa2358ac000)
	libicudata.so.56 (0x00007fa233ec9000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa233cc1000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa233abd000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa23a7eb000)
	libgthread-2.0.so.0 => not found
	libglib-2.0.so.0 => not found
	libGL.so.1 => not found
What dependancies I'm missing? I've found nothing on coppeliarobotics.com. If I solve these dependencies with

Code: Select all

apt-get -y install libgl1-mesa-glx libglib2.0-0 
V-REP doesn't run. The error this time is:

Code: Select all

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
./vrep.sh: line 33:   543 Aborted                 (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: V-REP on Docker

Post by coppelia »

Hello,

Not sure... can you confirm that you have platforms/libqxcb.so present?

Cheers

gvgramazio
Posts: 18
Joined: 23 Feb 2018, 14:46

Re: V-REP on Docker

Post by gvgramazio »

Sorry if I didn't reply to this message before but it wasn't on my subscriptions. I've solved the docker problem using the following docker file:

Code: Select all

FROM ubuntu:16.04

RUN apt-get update && apt-get install -y \
  wget \
  libglib2.0-0  \
  libgl1-mesa-glx \
  xcb \
  "^libxcb.*" \
  libx11-xcb-dev \
  libglu1-mesa-dev \
  libxrender-dev \
  libxi6 \
  libdbus-1-3 \
  libfontconfig1 \
  xvfb \
  && rm -rf /var/lib/apt/lists/*

RUN wget http://coppeliarobotics.com/files/V-REP_PRO_EDU_V3_5_0_Linux.tar.gz
RUN tar -xf V-REP_PRO_EDU_V3_5_0_Linux.tar.gz
RUN apt-get remove -y wget

RUN echo 'export QT_DEBUG_PLUGINS=1' >> ~/.bashrc
RUN echo 'export PATH=/V-REP_PRO_EDU_V3_5_0_Linux/:$PATH' >> ~/.bashrc
It works fine except for one thing: if I start V-REP even in headless mode it gives me problems because there is no screen. This should be an issue due to Qt and a possible workaround is to launch V-REP with xvfb that fakes a screen.

I've loaded this on github and an automatic build on docker hub. Maybe it could be helpful to someone.

macieksz@pro.onet.pl
Posts: 16
Joined: 28 Jan 2018, 08:21

Re: V-REP on Docker

Post by macieksz@pro.onet.pl »

I tried to run coppelia in headless mode from inside docker but failed(even tried to use the same dockerfile above)

./coppeliaSim.sh -h
[CoppeliaSimClient] loading the CoppeliaSim library...
[CoppeliaSimClient] done.
[CoppeliaSimClient:loadinfo] launching CoppeliaSim...
[CoppeliaSim:loadinfo] CoppeliaSim V4.1.0., (rev. 1), flavor: 1
[CoppeliaSim:loadinfo] Legacy machine ID: 51B6-94EB-B7C3-9CEC-F7E3-6D1D
[CoppeliaSim:loadinfo] Machine ID: 9B11-736C-C667-0000-55AE-0101
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.

./coppeliaSim.sh: line 35: 52 Aborted (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"

Do you have any solution for that?

Why Coppelia use qt5 in headless mode, i tried to reinstall the qt5 inside the docker but did not work!

I am using this image
ros:melodic-ros-base-bionic

gvgramazio
Posts: 18
Joined: 23 Feb 2018, 14:46

Re: V-REP on Docker

Post by gvgramazio »

Hi @macieksz,
You should try tu run it with xvfb-run. More info on the repository page referenced above.

macieksz@pro.onet.pl
Posts: 16
Joined: 28 Jan 2018, 08:21

Re: V-REP on Docker

Post by macieksz@pro.onet.pl »

I already did that before asking on forum:

Here is the same output:

root@40ce36d83bb2:/coppelia_sim#: xvfb-run ./coppeliaSim.sh -h
[CoppeliaSimClient] loading the CoppeliaSim library...
[CoppeliaSimClient] done.
[CoppeliaSimClient:loadinfo] launching CoppeliaSim...
[CoppeliaSim:loadinfo] CoppeliaSim V4.1.0., (rev. 1), flavor: 1
[CoppeliaSim:loadinfo] Legacy machine ID: 51B6-94EB-B7C3-9CEC-F7E3-6D1D
[CoppeliaSim:loadinfo] Machine ID: D309-736C-98C3-0000-55AE-0101
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.

./coppeliaSim.sh: line 35: 67 Aborted (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"

macieksz@pro.onet.pl
Posts: 16
Joined: 28 Jan 2018, 08:21

Re: V-REP on Docker

Post by macieksz@pro.onet.pl »

The solution is

RUN rm libcoppeliaSim.so
RUN mv libcoppeliaSimHeadless.so libcoppeliaSim.so

https://www.coppeliarobotics.com/helpFi ... ndLine.htm

and use ./coppeliaSim.sh -h and it works

Post Reply