79604471

Date: 2025-05-03 07:58:04
Score: 0.5
Natty:
Report link

Here is my solution fixing the dark/black screen in Gazebo.

I am running ROS2 Jazzy version. - Virtual Machine ubuntu-24.04.2-desktop-amd64.ISO

Here are my settings:

  1. System -> Motherboard -> Base memory: >=4096 MB

  2. System -> Motherboard -> Processors: 8 CPUs

  3. System -> Motherboard -> Execusion Cap: 100%

  4. System -> Motherboard -> Extended Features:

    a. Enable PAE/NX -> checked

    b. Enable Nested VT-x/AMD-V -> checked

  5. Paravirtualization Interface: KVM (as I am running host Window 11 and guest Ubuntu

    a. Hardware Virtualization: Enable Nested Paging

    -> checked

  6. Display -> Screen -> Video memory: 256 MB

  7. Display -> Screen -> Graphics Controller: VMSVGA

  8. Display -> Screen -> Extended Features: Enable 3D Acceleration -> checked

  9. Extended Features: check the box Enable 3D Acceleration

A. Now open a terminal

run:

export LIBGL_ALWAYS_SOFTWARE=1 and export DISPLAY=:0

and run:

gz sim

They have to be in the same terminal window otherwise It won't work.

B. Run your files

Example: this is what I have

export LIBGL_ALWAYS_SOFTWARE=1 and export DISPLAY=:0

cd ~/ros2_ws

source install/setup.bash

colcon build

ros2 launch my_robot_bringup my_robot_gazebo.launch.xml

And same thing here, all of them have to stay in the same terminal window.

Good Luck!

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Doan Phan