# Introduction to this repository This repository contains the development environment that you will need during the AI-on-Demand Winter School. To get your environment running, check the requirements and follow the installation instructions. # Requirements - Ubuntu 22.04 - Visual Studio Code - Python3 ## Installing Packages from Source 1. Install [ROS2 Humble](https://docs.ros.org/en/humble/Installation.html), [colcon](https://colcon.readthedocs.io/en/released/user/installation.html), and [Classic Gazebo](https://classic.gazebosim.org/tutorials?tut=install_ubuntu) 2. Source the ROS Environment ``` source /opt/ros/humble/setup.bash ``` If you don’t want to have to source the setup file every time you open a new shell (skipping task 2), then you can add the command to your shell startup script: ``` echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc ``` 3. Install the necessary dependencies. ``` $ sudo apt install libgazebo-dev xterm nano gedit ros-humble-gazebo-ros ros-humble-gazebo-ros-pkgs ros-humble-turtlebot3-gazebo ros-humble-launch-param-builder ros-humble-xacro ros-humble-teleop-twist-keyboard ros-humble-robot-state-publisher ros-humble-gazebo-ros2-control ros-humble-ros2-controllers ros-humble-geographic-msgs -y ``` 4. Create a directory for the course work ``` $ mkdir AIRob-2025; cd AIRob-2025 ``` 5. Clone this repository using the command ``` $ git clone https://gitsvn-nt.oru.se/asaffio/air-environment-2025.git ``` 6. Enter in the AIR Environment workspace ``` $ cd air-environment-2025 ``` 7. Build using colcon. ``` $ colcon build --symlink-install && source install/setup.bash ``` 8. Set key environment variables: ``` $ GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/src/pmb2_robot ``` 9. (Optional) If you don’t want to have to set the GAZEBO MODEL PATH every time you open a new shell, then you can add the command to your shell startup script: ``` echo "GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/src/pmb2_robot" >> ~/.bashrc ``` ## Testing ROS2 Installation Test that the ROS2 installation is successfully done, run the following command: ``` $ ros2 topic list ``` which should give the following output: ``` /parameter_events /rosout ``` Test that the setup worked properly by running the following command (window takes very long to be filled, be patient): ``` $ gazebo src/atlantis/atlantis_scenarios/scenarios/apartment/apartment.world ``` Note that Gazebo's first launch can take a very long time since the system needs to process all the models. Your computer may ask you if you want to kill the process. DO NOT KILL GAZEBO, and simply wait a couple of minutes. All should resolve itself. Once you have tested the installation, close the Gazebo. Then, test the simulation by running the command ``` $ ros2 launch atlantis_gazebo robot_sim_launch.py ``` To move the robot around use the teleop_keyboard opened in the other window. Once you have tested the installation, close the Gazebo and the teleop windows. ## Installing Python Virtual Environment (Optional) 1. Install Python venv (if not installed) ``` sudo apt install python3-venv -y ``` 2. Create a Python Virtual Environment ``` python3 -m venv ``` 3. Activate the Virtual Environment ``` source /bin/activate ``` 4. Install the Unified Planning framework and RDFLib : ``` pip install numpy==1.26.4 unified-planning[fast-downward] rdflib ``` 5. When building the ros2 packages, deactivate the Virtual Environment To exit the virtual environment, simply run: ``` deactivate ```