Skip to content

Installation & Setup ​

This page walks through the base environment setup required across all e-Yantra projects.

WARNING

Each project may have additional dependencies. Always check your specific project page after completing this base setup.


System Requirements ​

RequirementMinimum
OSUbuntu 22.04 LTS
RAM8 GB
Disk30 GB free
ROSROS 2 Humble

Step 1 — Install ROS 2 Humble ​

bash
# Set locale
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8

# Add ROS 2 apt repo
sudo apt install software-properties-common curl
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
  -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] \
  http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" \
  | sudo tee /etc/apt/sources.list.d/ros2.list

# Install
sudo apt update
sudo apt install ros-humble-desktop
bash
docker pull osrf/ros:humble-desktop

docker run -it \
  --env="DISPLAY" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
  osrf/ros:humble-desktop

Step 2 — Source ROS 2 ​

Add this to your ~/.bashrc so it loads in every terminal:

bash
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc

Step 3 — Clone a Project Repository ​

bash
git clone <project-repo-url>
cd <project-folder>
pip install -r requirements.txt

Step 4 — Verify Setup ​

bash
ros2 doctor

Success

If ros2 doctor reports no errors, your base environment is ready. Proceed to your project page for project-specific setup.


Troubleshooting ​

ros2: command not found

ROS 2 is not sourced. Run:

bash
source /opt/ros/humble/setup.bash

Then add the line to ~/.bashrc as shown in Step 2.

Gazebo fails to open / black screen

This is usually a GPU driver issue. Try running Gazebo with software rendering:

bash
export LIBGL_ALWAYS_SOFTWARE=1
gazebo

Released under the MIT License.