RoArm-M2-S 1. How to Install ROS2

From Waveshare Wiki
Jump to: navigation, search
RoArm-M2-S 1. How to Install ROS2
RoArm-M2-S.jpg

I2C, UART
TTL Serial Bus Servo Control Interface,
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

As Moveit2 has not yet finished updating Jazzy for the latest LTS version of ROS2 as of the completion of this tutorial, we are still providing tutorials for the ROS2 Humble, and we will produce tutorials for the ROS2 Jazzy version as soon as Moveit2 is updated. This tutorial is for running ROS2 on a Windows computer using a virtual machine and refer to the subsequent tutorials for controlling the robot arm.

1. ROS2 Installation Tutorial

1.1 ROS2 Introduction

The predecessor of ROS2 is ROS, which stands for Robot Operating System. However, ROS itself is not an operating system but a software library and toolset. The advent of ROS addressed the communication issues among various components of robots. Over time, more and more robotic algorithms have been integrated into ROS. ROS2 inherits from ROS and is more powerful and excellent compared to ROS.
Main Features:

  • Multi-robot Systems: In the future, robots will not operate as isolated entities. They will need to communicate and cooperate with each other. ROS2 provides standard methods and communication mechanisms for the application of multi-robot systems.
  • Cross-platform: Different robot application scenarios require different control platforms. To ensure all robots can run ROS2, ROS2 is designed to run cross-platform on Linux, Windows, MacOS, and RTOS.
  • Real-time Capability: Robot motion control and many behavioral strategies require real-time capabilities. For example, a robot needs to reliably detect a pedestrian in front of it within 100 ms or stably solve kinematics and dynamics within a 1 ms cycle. ROS2 provides basic support for such real-time requirements.
  • Productization: ROS2 can be used not only in the research and development phase of robots but also directly in products entering the consumer market. This presents significant challenges for the stability and robustness of ROS2.

Virtual Machine Images and Software Downloads

1.2.1 Download Pre-configured ROS2 Environment Ubuntu Image

Using our pre-configured ROS2 Humble environment on Ubuntu 22.04, there is no need to install and configure the ROS2 Humble environment yourself. Follow the subsequent ROS2 tutorials to connect the robotic arm for direct control.

  • Download link: Image [System Default Password: ws]

After downloading, extract the files. All the extracted files are image files. Some virtual machine disk file systems do not support files larger than 4GB, so the configured Ubuntu image has been split into multiple files.

1.2.2 Install Oracle VM VirtualBox

Download and install Oracle VM VirtualBox, a free virtual machine software that allows you to run a virtual operating system on your computer. We run a virtual machine on a Windows system computer to install the Ubuntu operating system, then install and configure ROS2 on Ubuntu to control the robotic arm.
Note that although there is a Windows version of ROS2, relevant documentation for the Windows version is limited. Therefore, we provide the virtual machine solution by default to run ROS2.
Click Oracle VM VirtualBox Official Download Link to download. The installation process is straightforward; just keep clicking "Next." If it is already installed, skip this step.

1.3 Load the Image into the Virtual Machine Software

  1. In the left toolbar, click "New".
  2. RoArm Tutorial 1.png

  3. Set the name, type to "Linux," and version to "Ubuntu (64-bit)," then click "Next.".
  4. RoArm Tutorial 2.png

  5. You can set the memory size and the number of processors yourself. Here, I use the default settings and then click "Next."
  6. RoArm Tutorial 3.png

  7. Choose "Do not add a virtual hard disk," then click "Next." It will display the configuration of the new virtual computer. Click "Finish," then a warning will pop up, click "Continue."
  8. RoArm Tutorial 4.png
    RoArm Tutorial 5.png

  9. Select the newly created virtual machine and choose "Settings".
  10. RoArm Tutorial 6.png

  11. Select "Storage" and click the + sign on the far right of the controller to add a virtual hard disk.
  12. RoArm Tutorial 7.png

  13. Select "Register," add the ws.vmdk image file extracted earlier, then click "Select" in the bottom right corner, confirm and save. Double-click the newly created virtual computer on the left to run it.
  14. RoArm Tutorial 8.png

After successfully running the virtual machine computer, you can understand the composition of the RoArm-M2-S robotic arm ROS2 workspace according to the contents of the second chapter. Then, you can refer to the third chapter to achieve basic control of the robotic arm in ROS2.

RoArm-M2-S ROS2 Humble + Moveit2 Tutorial