Setup Virtual Environment

  • To use ROS in Windows, use Oracle VM VirtualBox to set up virtual environment.
















Set up host network as follows. Make sure to record IPv4 address.


Set up network to communicate with host PC. Change VM settings as follows.


Run VM again to set up network.

Two ethernet networks shall be visible - change the second IP address.

Enter IPv4 as follows. The IP address 192.168.56.101 was entered arbitrarily, while the gateway 192.168.56.1 was set during host network setup.

Use the ping command after installing net-tools

$ sudo apt-get install net-tools

Host pc cmd → ping 192.168.56.101

vm pc terminal → 192.168.56.1

Network setup is complete if the the user terminal displayed as follows.

Configuration

  • Install ROS

    • Recommend version: 18.04. Refer to following link: ROS Melodic

    • Install additional dependent packages after ROS installation

      • $sudo apt-get update

      • $sudo apt-get upgrade

      • $sudo apt-get install curl

      • $sudo apt-get install python3-pip

      • $sudo apt-get install git

      • $sudo apt-get install net-tools

      • $sudo apt-get install ros-melodic-rosbridge-server

      • $sudo apt-get install ros-melodic-velodyne

    • Generate Workspace and apply gen_ros code

      • $mkdir -p ~/catkin_ws/src

      • Download example code from the following link

      • Copy downloaded example code into the source src folder

      • $cd ~/catkin_ws

      • $catkin_make

      • $source devel/setup.bash