This repository provides automated scripts to configure a compatible Ubuntu 22.04 (Jammy Jellyfish) system for development and simulation with the Vizzy 2.0 Humanoid Robot. The installer will set up ROS 2 Humble Hawksbill, Ignition Gazebo Fortress, and all necessary dependencies, including the
vizzy2.0
colcon workspace.
The full_installer.sh
script automates the following key setup processes:
- System locale configuration (UTF-8).
- Addition of required package repositories (ROS 2, Gazebo).
- Installation of ROS 2 Humble Desktop and development tools.
- Installation of Ignition Gazebo Fortress.
- Optional NVIDIA GPU offloading configuration for Gazebo.
- Installation of Point Cloud Library (PCL) and
ros_gz
bridge dependencies. - Cloning of the
vizzy2.0
repository. - Installation of
vizzy2.0
dependencies usingrosdep
. - Building the
vizzy2.0
colcon workspace. - Configuration of the
.bashrc
file for sourcing ROS 2 and the new workspace.
Before running the installer, please ensure your system meets the following requirements:
- Operating System: Ubuntu 22.04 LTS (Jammy Jellyfish).
- Internet Connection: Required for downloading packages and cloning repositories.
- Git: The
git
command-line tool must be installed (sudo apt install git
). - Sudo Privileges: The installer requires
sudo
access to install system packages and configure repositories.
Follow these steps to set up your system:
-
Clone this Repository: Open a terminal and clone this
vizzy_install_2.0
repository to your local machine.git clone https://github.com/vislab-tecnico-lisboa/vizzy_install_2.0.git cd vizzy_install_2.0
-
Make the Installer Executable: Navigate into the cloned directory and give the installer script execute permissions.
chmod +x full_installer.sh
-
Run the Installer Script: Execute the script from within the
vizzy_install_2.0
directory../full_installer.sh
During the execution, the script will prompt you for a few configuration choices:
-
NVIDIA GPU Offloading:
- Prompt:
[Vizzy]: Do you have an NVIDIA graphics card in your current setup and want to use it for offloading? (yes/no) Default: yes
- Purpose: If you have an NVIDIA graphics card, choosing "yes" (or pressing Enter for the default) will configure your system to attempt to use the NVIDIA GPU for running Ignition Gazebo simulations. This is achieved by setting specific environment variables that enable PRIME render offloading.
- Note: Your system must have a functional NVIDIA driver and a compatible graphics card for this to work. If you choose "no" or do not have an NVIDIA card, Gazebo will use the default graphics renderer (often an integrated GPU). This choice is saved and applied to ROS 2 launch files. An alias
ign-nvidia
will also be added to your.bashrc
for manual command-line offloading if "yes" is selected.
- Prompt:
-
Sudo Password:
- The script will request your user password via
sudo
once at the beginning of the execution. - Purpose: This is required for system-level operations such as installing packages via
apt
, adding repositories, and initializingrosdep
.
- The script will request your user password via
-
Colcon Workspace Path:
- Prompt:
[Vizzy]: Enter the path for the colcon workspace (Default: ~/vizzy2_ws):
- Purpose: This determines the directory where the
vizzy2.0
source code will be cloned and built. - Default: If you press Enter without typing a path, it will use
~/vizzy2_ws
(a directory namedvizzy2_ws
in your home folder).
- Prompt:
After the installer script completes successfully:
-
Regarding a PCL-related Warning (Benign):
- You may have observed a warning message similar to
** WARNING ** io features related to pcap will be disabled
during thecolcon build
phase (Step 13) of the installation. - This is a known, benign warning related to the Point Cloud Library (PCL). Crucially, this specific warning does not affect the core functionality of Vizzy's simulation or navigation capabilities as set up by this installer. However, we are continuously working to refine the setup process and minimize all warnings :).
- You may have observed a warning message similar to
-
Update Your Shell Environment:
- IMPORTANT: For all environment changes, newly set aliases, and sourced paths to take effect, you must either source your updated
.bashrc
file in your current terminal.(Alternatively, simply close your current terminal and open a new one.)source ~/.bashrc
- IMPORTANT: For all environment changes, newly set aliases, and sourced paths to take effect, you must either source your updated
Once the setup is complete and your terminal environment is updated:
-
To launch the Vizzy Gazebo Simulation:
ros2 launch vizzy_launch vizzy_simulation_launch.xml
-
NVIDIA GPU Offloading (if enabled during installation):
- The launch command above should automatically attempt to use the NVIDIA GPU if you selected "yes" during installation.
- For manually running Ignition Gazebo with NVIDIA offloading (outside of ROS 2 launch if needed), you can use the alias:
ign-nvidia gazebo <your_world_or_other_args>
- To run Gazebo normally (without forced NVIDIA offloading via the alias):
ign gazebo <your_world_or_other_args>
libEGL warning: egl: failed to create dri2 screen
(or similar EGL/DRI2 errors with Gazebo): This error usually indicates an issue with how Gazebo is interacting with your graphics drivers, especially when NVIDIA offloading is intended.- If you selected NVIDIA support during installation:
- Verify NVIDIA Drivers: Ensure your proprietary NVIDIA drivers are correctly installed and functioning. You can often check this with the command
nvidia-smi
. - Check Offloading Configuration: The installer sets up an environment variable to tell launch files to use NVIDIA. Verify this is active in your current terminal:
This command should output
echo $VIZZY_USE_NVIDIA
true
. - Terminal Session: If it doesn't output the expected value, ensure you have run
source ~/.bashrc
in your current terminal or opened a new terminal after the installer finished. - Re-run Installer / Manual Check: If the
VIZZY_USE_NVIDIA
variable is not being set correctly despite sourcing.bashrc
, you can try re-running the installer's graphics setup portion or manually check the contents of~/.config/vizzy_installer/graphics.env
and your~/.bashrc
for the sourcing line. - Still an issue? If the variable is
true
and you still see EGL errors, there might be a deeper issue with your NVIDIA driver installation, the specific offloading variables, or how they are being applied by the launch file. Consider opening an issue in this repository with details about your GPU, driver version, and the exact error messages.
- Verify NVIDIA Drivers: Ensure your proprietary NVIDIA drivers are correctly installed and functioning. You can often check this with the command
- If you did NOT select NVIDIA support (or chose "no"):
- Ensure your system's Mesa drivers for integrated graphics (Intel/AMD) are up-to-date:
sudo apt update && sudo apt upgrade
- If errors persist, it might be related to a specific Gazebo version or system configuration. Please open an issue with details.
- Ensure your system's Mesa drivers for integrated graphics (Intel/AMD) are up-to-date:
- If you selected NVIDIA support during installation:
- Package not found / Command not found: Ensure you have sourced
~/.bashrc
in your current terminal or opened a new terminal after the installation. - Problems with
sudo apt-get upgrade -y
: This issue can occur during theROS 2 installation
phase (Step 4) of the installation. To resolve this, just run on the terminal:and then you can restart the installation process with:sudo apt-get update --fix-missing
./full_installer.sh