Ubuntu 22.04 apt install ros1 ros Noetic Ninjemys
Ubuntu 22.04 apt install ros1 ros Noetic Ninjemys
Ubuntu 22.04 Install ROS Noetic Ninjemys
Table of contents
- Ubuntu 22.04 Install ROS Noetic Ninjemys
-
- Introduction
- installation steps
-
- Step 1: Add software source
- Step 2: Update source
- Step 3: Installation
- Verify installation
- Basic usage
-
- Create workspace
- Initialize workspace
- Create a Package
- Compile workspace
- Compile the package separately
- uninstall
- Conclusion
Introduction
As we all know, ros2 still has many functions that have not been ported, and ros1 officially no longer supports versions after ubuntu 20.04. On the other hand, Ubuntu 22.04 has updated many drivers for new hardware to provide better compatibility and experience, which has become very confusing.
If you want to use the latest version of ros noetic in 22.04, the only way is to compile it yourself. Compile the entire set of ros. It is a big challenge for beginners, who need to solve a large number of library dependencies and C++ version compatibility issues.
Today I accidentally discovered a ros noetic ninjemys installation package officially compiled by Autolabor. It has been tested and available, and it also contains a navgation stack. It can be installed and used directly for the needs of learning robot navigation and SLAM.
installation steps
Step 1: Add software source
echo "deb [trusted=yes arch=amd64] http://deb.repo.autolabor.com.cn jammy main" | sudo tee /etc/apt/sources.list.d/autolabor.list
Step 2: Update source
sudo apt update
Step 3: Installation
sudo apt install ros-noetic-autolabor
The installation process is a bit long, because this version will help install all required dependencies, and some libraries are relatively large. If the package cannot be downloaded, please try again.
When the words ros-noetic-autolabor installed appear, it means that the installation has been completed. Let's verify whether it is working normally.
Verify installation
Open a new console and execute
roscore
Open another new console
rosrun rviz rviz
If you see that rviz has started successfully, it means that the installation has been successful.
ros will be installed in the /opt/ros/noetic directory, and a reference to source /opt/ros/noetic/setup.bash will be added to ~/.bashrc
This version includes complete ros desktop full, navgation and support for gazibo. It is relatively complete and does not need to be installed separately like the official packages.
Basic usage
Create workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
Initialize workspace
catkin init
Create a Package
cd src
Use catkin create to create a package named my_package, which depends on roscpp and std_msgs
catkin create pkg my_package roscpp std_msgs
Compile workspace
cd ~/catkin_ws
catkin build
Compile the package separately
cd ~/catkin_ws/src/my_package
catkin build --this
So far we have successfully installed ros1 noetic on ubuntu 22.04 and verified that it works normally.
uninstall
sudo apt remove ros-noetic-autolabor
Conclusion
Follow [Autolabor official] to get daily update reminders.