Ekumen-OS / andino_gz

Andino Simulation using Gazebo simulator
11 stars 3 forks source link

Flickering Issue in Gazebo Ignition Fortress with GPU #87

Closed SAJIB3489 closed 1 week ago

SAJIB3489 commented 2 weeks ago

Environment

Description

I am encountering a Flickering issue when using the NVIDIA GPU for simulation in Gazebo Ignition Fortress (version 6.16.0). The flickering disappears if I do not use the GPU, but the simulation becomes very slow. I am running the simulation inside a Docker container with a GUI via noVNC.

System Details:

Dockerfile for gazebo installation:

RUN sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' && \
    wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - && \
    apt-get update -q && \
    apt-get upgrade -y && \
    apt-get install -y \
    ros-${ROS_DISTRO}-navigation2 \
    ros-${ROS_DISTRO}-turtle-nest \
    ros-${ROS_DISTRO}-ros-gz-sim \
    ros-${ROS_DISTRO}-ros-gz-bridge \
    ignition-fortress

Docker Container Command

docker run --restart=always -d \
    -e VNC_PASSWORD=1234 \
    -e USER=sajib \
    -e PASSWORD=1234 \
    -e ROS_DOMAIN_ID=1 \
    -e NVIDIA_DRIVER_CAPABILITIES=all \
    -e __GLX_VENDOR_LIBRARY_NAME=nvidia \
    -v "/home/sajib/22":/home/sajib \
    -v /dev/dri:/dev/dri \
    -p 6555:80 \
    -p 6556:22 \
    --security-opt seccomp=unconfined \
    --shm-size=4gb \
    --gpus all \
    --runtime=nvidia \
    image_name:latest

Approaches Attempted:

  1. Disabled cast shadows in the world model (SDF):
    <cast_shadows>false</cast_shadows>
    <cast_shadows>0</cast_shadows>
  2. Modified ~/.ignition/gazebo/6/gui.config:
    <engine>ogre</engine>

    Video Link

Any suggestions or solutions would be greatly appreciated.

francocipollone commented 1 week ago

Hey there @SAJIB3489 , I haven't heard about this issue before, is it possible to try the sim in other "situations" just to discard that it is an issue with your image/container or an issue with the andino simulation setup:

  1. In your container, open just gazebo: ign gazebo and open a gazebo demo world, and check if it still happens.
  2. Try using provided docker setup: https://github.com/Ekumen-OS/andino_gz/tree/humble/docker
  3. Try running the sim in the host (if you have an ubuntu 22) simply do sudo apt install ros-humble-andino-gz for installing it. ( you need to have ros2 humble installed)

So

SAJIB3489 commented 1 week ago

Thank you for your suggestion and quick response. The issue was with the Docker image itself. I tested a different image, and it worked smoothly without any problems.

I’ll go ahead and close this issue. Have a great day!