Teach you to use virtual machines to interact with robots

There are many ways to interact with the robot, and friends can choose according to their preferences.

But in the process of practice, we found that configuring the ROS development environment may be a challenge for beginners, so we prepared a convenient and fast Ubuntu system U disk, including the installed ROS and the configured development environment. Friends can insert it into the computer when they get it, and select the U disk to boot into the system for operation. Simple and straightforward.

However, we later discovered that different brands of computers use different ways to start the system using a USB flash drive, and some of them need to be configured. Due to the large number of brands, it is difficult for us to provide specific support for each brand, and some computers may This startup method is not supported either.

Therefore, we introduce another method here to facilitate friends to choose according to the situation.

This way is to use a virtual machine. And we've made the process as easy as possible. And see below:

The development environment of this tutorial ( note that the steps and settings may be different due to different software and hardware ):

hardware:

  • desktop/laptop

  • R&D robots 

software :

  • Windows 10

  • VirtualBox-7.0.8

  • Ubuntu 18.04

  • ROS melodic

step:

1. Install VirtualBox

First go to the official website of VirtualBox to download the installation file and install it by default.

https://www.virtualbox.org/wiki/Downloads

2. Install Ubuntu18.04 and ROS, etc. or import the configured virtual computer

Go to the Ubuntu official website to download ubuntu-18.04.6-desktop-amd64.iso.

https://releases.ubuntu.com/18.04/

You can refer to the official tutorial to install the system to a virtual machine.

https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview

Then install ROS melodic, set up the development environment, and install the corresponding dependencies.

http://wiki.ros.org/melodic/Installation/Ubuntu

There may be some minor problems during the installation process, you can search for relevant solutions according to the problems that arise. However, some reference methods may no longer be applicable over time and need to be tried repeatedly.

In order to save everyone's time, we will devote more energy to the actual robot research and development and improve the research and development efficiency. We have prepared a virtual computer that has been installed and configured for everyone. Just a simple import is all it takes to interact with the bot.

If you use the installed and configured virtual computer ova format file provided by us, you can skip the above steps of Ubuntu installation, ROS installation and development environment configuration, and directly import the configured system and development environment as follows:

In the upper left corner of VirtualBox, click Manage > Import Virtual Computer

In the pop-up dialog box, click the folder icon as shown in the figure below:

Find where Ubuntu 18.04.ova is stored as follows:

You can modify each configuration according to the specific situation and personal preferences:

Here we mainly emphasize the setting of the location of the virtual computer, because it will take up a lot of space, please choose a larger hard disk storage space.

After setting, you can click Finish and wait for the import:

After the import is successful, you will see the newly added virtual computer, and you can use it by clicking Start:

3. Network configuration

ROS melodic mainly interacts with the robot through the master-slave mode. In order to achieve a stable network connection, the virtual machine needs to be connected to the WiFi hotspot of the robot.

This requires setting the virtual machine network mode. The default is network address translation (NAT) mode, which needs to be changed to bridged network card mode. Quick changes can be made through the following steps:

Click on the area shown in the picture:

The network mode selection dialog box will pop up:

Select the bridge NIC:

You can also find the network settings in the settings to make corresponding changes:

Then connect your computer to the robot's WiFi hotspot via WiFi, check the master-slave configuration, and after confirmation, you can perform remote control, map building, navigation and other operations on the robot.

Tips: 

There are some practical functions in the device column, such as the use of USB peripherals, and the host ( note that the host here refers to the device where the virtual machine is installed, do not confuse it with the equipment on the robot such as the robot master-slave composed of NVIDIA Jetson and the virtual machine ) between the interoperability and so on. For example, you may need to copy the files of the host computer to the virtual machine, then you can simply click to set it as shown below, and you can drag and drop the files of the host computer to the virtual machine, and vice versa. Simpler and more straightforward than shared folders.

This is the end of the sharing in this issue. If there are any shortcomings, please give your comments and suggestions. We welcome you to share your experience and insights in robot research and development.

Guess you like

Origin blog.csdn.net/COONEO/article/details/130925495