ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

rviz2 does not open in ubuntu 20.04 docker ade image [closed]

asked 2021-03-10 19:13:20 -0500

Vini71 gravatar image

updated 2021-03-10 19:35:21 -0500

Hi I am using ubuntu 20.04 and ROS2 foxy distro.

I was using ubuntu 18.04 and ros2 dashing installed automatically by autoware auto repo. Everything was working fine: Lgsvl simulator, rviz2, etc ....

But I needed to upgrade to get the new features. However I tried a fresh install several times, and followed step-by-step from these installation links: 1- https://autowarefoundation.gitlab.io/... 2- https://ade-cli.readthedocs.io/en/lat... 3- https://gitlab.com/ApexAI/autowarecla...

In a summarize I have installed Nvidia-driver, nvidia-container-toolkit nvidia-cuda-toolkit and all the required dependencies. The container generates the Autoware Auto images correctly, compile the ros2 packages, etc. Everything is working correctly with excpetion of rviz2 that does not open anymore. Giving the oupt error below:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-autoware-auto'
1615423952.126068 [0]      rviz2: using network interface wlp2s0 (udp/192.168.100.10) selected arbitrarily from: wlp2s0, docker0
dbus[129]: The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.
Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)

There are some web-solutions for ros distro installation inside container:

https://answers.ros.org/question/3010...

However in my case I do not know which files to modify exactly because the images comes from the AutowareAuto repo and I do not have the same files in the same structure as the solution above. How can I manage these modifications to fix this problem?

I have already changed the .aderc file and remove the line:

ADE_DISABLE_NVIDIA_DOCKER=false

my .aderc file is below:

export ADE_DOCKER_RUN_ARGS="--cap-add=SYS_PTRACE --net=host -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp"
export ADE_GITLAB=gitlab.com
export ADE_REGISTRY=registry.gitlab.com
export ADE_IMAGES="
  registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/ade-foxy:master
  registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/binary-foxy:master
"

The Dockerfile inside AutowareAuto/tools/ade_image is below:

ARG ROS_DISTRO=dashing

FROM ros:$ROS_DISTRO
ARG CODENAME=bionic

# Disable non-free repositories
RUN if [ "$(uname -m)" = "x86_64" ]; then \
        echo "\
deb http://archive.ubuntu.com/ubuntu/ ${CODENAME} main universe\n\
deb http://archive.ubuntu.com/ubuntu/ ${CODENAME}-backports main universe\n\
deb http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main universe\n\
deb http://security.ubuntu.com/ubuntu/ ${CODENAME}-security main universe\n\
" > /etc/apt/sources.list; \
    else \
        echo "\
deb http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME} main universe\n\
deb http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-backports main universe\n\
deb http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-updates main universe\n\
deb http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-security main universe\n\
" > /etc/apt/sources.list; \
    fi

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y \
        gettext-base \
        locales \
        keyboard-configuration && \
    rm -rf /var/lib/apt/lists/*
RUN locale-gen en_US.UTF-8; dpkg-reconfigure -f noninteractive locales
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

RUN echo deb https://deb.nodesource.com/node_10.x ${CODENAME} main ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Vini71
close date 2021-03-12 12:35:01.746480

Comments

I think I encountered something like this with rviz and docker a month or so ago using rocker, but can no longer reproduce this now on rocker, so make sure you're using images built from the latest foxy binaries?

ruffsl gravatar image ruffsl  ( 2021-03-10 21:07:04 -0500 )edit

Hi thanks for the reply. However I have installed from the latest foxy binaries. I also always update ade-cli and the images before enter ade, using sudo ade --start --update. Is there a chance to be other issue? Such set NVidia Gpus, ip, change dockerfile? I am really lost on this topic cause I am not a computer scientist or software engineer, so I do not understand what is going on and what the error means. Do you remember how you fixed please?

Vini71 gravatar image Vini71  ( 2021-03-10 21:21:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-03-12 12:32:45 -0500

Vini71 gravatar image

I found the issue!

For some reason in ubuntu 20.04, rviz2 does not work in the following BOLDED images does not work get from the command: % ls -l .aderc*

.aderc-amd64-dashing

.aderc-amd64-dashing-lgsvl

.aderc-amd64-foxy

.aderc-amd64-foxy-lgsvl

There is some line missing on .aderc configuration file or Dockerfile when these images are built through the command:

$ade --rc .aderc-amd64-dashing start      or     $ade --rc .aderc-amd64-foxy start

Just the images built with lgsvl simulator have the correct code and configuration files written for ubuntu 20.04 that allows rviz2 works. Then it is required to build ros-distro with the lgsvl internal simulator:

ade --rc .aderc-amd64-dashing-lgsvl start
or 
ade --rc .aderc-amd64-foxy-lgsvl start

In my case I am using foxy as it is the most recent ros distro available for ubuntu 20.04.

There is just one way to make rviz2 work without trigger the lgsvl simulator image. It is setting the --privileged flag to build the images:

ade --rc .aderc-amd64-dashing start --privileged
ade --rc .aderc-amd64-foxy start --privileged 
or just
ade start --privileged

that will start the standard ros-distro image without the lgsvl simulator

However it is not recommended use --privileged flags to run docker for security reasons... This was the way I have worked around to launch rviz2 successfully.

edit flag offensive delete link more

Comments

ros2 generally didn't run for me not only rviz2,

But your solution worked for me, so thank you.

However ade start --privileged syntax didn't run correctly for me. But this one did: ade start -- --privileged

omarabdelaziz gravatar image omarabdelaziz  ( 2021-07-17 14:55:04 -0500 )edit

Nice I am glad this answer helped you.

Vini71 gravatar image Vini71  ( 2021-07-17 22:56:16 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-03-10 19:13:20 -0500

Seen: 1,486 times

Last updated: Mar 12 '21