# enable ubuntu universe repository
sudo apt install software-properties-common
sudo add-apt-repository universe
# add ROS2 GPG key
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
# Add repository to sources list
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 jammy) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update && sudo apt install -y python3-flake8-docstrings python3-pip python3-pytest-cov ros-dev-tools
sudo apt install -y python3-flake8-blind-except python3-flake8-builtins python3-flake8-class-newline python3-flake8-comprehensions python3-flake8-deprecated python3-flake8-import-order python3-flake8-quotes python3-pytest-repeat python3-pytest-rerunfailures
mkdir -p ~/ros2_iron/src
cd ~/ros2_iron
vcs import --input https://raw.githubusercontent.com/ros2/ros2/iron/ros2.repos src
sudo apt upgrade -y
sudo rosdep init
rosdep update --include-eol-distros
rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers" --os=ubuntu:jammy --rosdistro=iron
cd ~/ros2_iron/
colcon build --symlink-install
sudo apt install python3-serial -y
sudo apt install python3-pip -y
mkdir -p ~/ws/src
cd ~/ws
git clone -b 2.1.0 https://github.com/iRobotEducation/irobot_create_msgs.git src/irobot_create_msgs
source ~/ros2_iron/install/local_setup.bash
colcon build
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
source ~/ros2_iron/install/local_setup.bash
source ~/ws/install/local_setup.bash
export PYTHONPATH=$PYTHONPATH:~/ws/src/irobot_create_msgs
sudo apt update
sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
sudo apt update
sudo apt install python3-gpiozero
sudo adduser [username] dialout
network:
version: 2
renderer: NetworkManager
ethernets:
usb0:
dhcp4: false
optional: true
addresses: [192.168.186.3/24]