Install ROS 2 and Dependencies
In the Hardware Setup screens, you can use the automated method to automatically install the required software packages and ROS 2 dependencies using shell script.
Required Software Packages
No. | Name | License Information |
---|---|---|
1 | URSim Offline Simulator (part of Docker) | END USER SOFTWARE LICENSE AGREEMENT |
2 | ROS 2 Humble | The 3-Clause BSD License |
3 | Open SSH Server | BSD License |
Automated Method
This is the recommended method. The support package provides a shell script to
install all the required dependencies to directly get started with creating the
urROS2Node
object and use the related functions.
Follow these steps to retrieve the shell script from MATLAB® path and use it on the Ubuntu machine:
Open the MATLAB terminal and access the path where
installation_script_ROS2.sh
file is available, by using the following command:installationFilePath = fullfile(codertarget.urseries.internal.getSpPkgRootDir,'resources') cd(installationFilePath)
Copy the file
installation_script_ROS2.sh
from MATLAB path into your Ubuntu® Linux® machine.Provide root access to the file to perform installation. Launch Linux terminal and change directory to the location where the copied installation script is present and run the following command in Linux terminal.
chmod +x installation_script_ROS2.sh
Launch the shell script to install the dependencies on the Linux machine.
./installation_script_ROS2.sh
If you face issues in running the automated script, refer to Troubleshooting Third-Party Installation Issues for ROS 2.