- https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/
- https://github.com/ros2-for-arm/ros2/wiki/ROS2-on-arm-architecture
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt update && sudo apt install -y curl gnupg2 lsb-release
curl http://repo.ros2.org/repos.key | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update && sudo apt upgrade
sudo apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-pip \
python-rosdep \
python3-vcstool \
wget
sudo apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws
wget https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos
vcs import src < ros2.repos
sudo rosdep init && rosdep update
rosdep install --from-paths src --ignore-src --rosdistro crystal -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers python3-lark-parser"
cd ~/ros2_ws/
touch \
src/ros-perception/laser_geometry/COLCON_IGNORE \
src/ros/resource_retriever/COLCON_IGNORE \
src/ros2/geometry2/COLCON_IGNORE \
src/ros2/urdf/COLCON_IGNORE \
src/ros2/demos/COLCON_IGNORE \
src/ros2/kdl_parser/COLCON_IGNORE \
src/ros2/ros1_bridge/COLCON_IGNORE \
src/ros2/orocos_kinematics_dynamics/COLCON_IGNORE \
src/ros2/examples/rclpy/COLCON_IGNORE \
src/ros2/robot_state_publisher/COLCON_IGNORE \
src/ros2/rviz/COLCON_IGNORE \
src/ros2/rcl/rcl/test/COLCON_IGNORE \
src/ros2/urdfdom/COLCON_IGNORE \
src/ros2/system_tests/COLCON_IGNORE \
src/ros2/rosidl_typesupport_opensplice/COLCON_IGNORE \
src/ros2/rosidl_typesupport_connext/COLCON_IGNORE \
src/ros2/rmw_connext/COLCON_IGNORE \
src/ros2/rmw_opensplice/COLCON_IGNORE \
src/ros2/common_interfaces/visualization_msgs/COLCON_IGNORE \
src/ros2/common_interfaces/stereo_msgs/COLCON_IGNORE \
src/ros-planning/COLCON_IGNORE \
src/ros-visualization/COLCON_IGNORE
sudo nano /etc/dphys-swapfile
Change CONF_SWAPSIZE
to 2000
Restart service
sudo systemctl restart dphys-swapfile
cd ~/ros2_ws/
colcon build --symlink-install --packages-ignore qt_gui_cpp rqt_gui_cpp
sudo apt install python3-argcomplete
. ~/ros2_ws/install/local_setup.bash
ros2 run demo_nodes_cpp talker
. ~/ros2_ws/install/local_setup.bash
ros2 run demo_nodes_py listener