A walkthrough on installing ROS kinetic on Ubuntu 16.
- Install VMware.
- Download Ubunto.
- Create your new VM.
- Setup.
- Install ROS kinetic.
- Lunch ROS.
VMware Workstation is a line of Desktop Hypervisor products which lets users run virtual machines, containers and Kubernetes clusters.
VMware Workstation workby using special functions in modern 64-bit x86 CPUs to create fully isolated, secure virtual machines that encapsulate an operating system and its applications. The VMware virtualization layer maps physical hardware resources to a virtual machine's virtual resources, so each virtual machine has its own CPU, memory, disks, and I/O devices, as well as the full equivalent of a standard x86 machine. VMware Workstation installs onto the host operating system and provides broad hardware support by inheriting device support from the host.
https://www.vmware.com/go/getworkstation-win
https://www.vmware.com/go/getworkstation-linux
Ubuntu Desktop is a Linux distribution developed by Canonical, and it’s one of the most popular distributions, thanks to its ease of use. It’s also one of the top choices for people who are getting started with Linux.
Open VMware and then Click on "Create a New Virtual Machine"
Click on 'Custom (Advanced) then on 'Next'
Choose 'Workstation 16' for the Hardware then on 'Next'
Make sure to choose the right Ubunto Image in our case the ubunto-16 then on 'Next'
Enter your personal information then on 'Next'
For the processors set 2 for each to get total of 4 processors then on 'Next'
Make sure to choose 'Use network address translation (NAT)' so you can connect to your computer network
Select I/O Controller Type 'LSI Logic'
Select Disk Type 'SCSI'
Selecta Disk 'creat a new virtual disk'
Secify the disk capacity 'split virtual disk into multiple file'
Click on 'Next'
Finally Click on 'Finsh'
For now, you can wait until all files are set. It may take a few minutes, don't worry!
Sign in to your account with the same password you used previously. Open your Terminal to start updating the apt
sudo apt-get update
sudo apt-get upgrade
sudo apt install build-essential dkms linux-headers-$(uname -r)
it wil ask you to enter either Y/N , Enter 'Y'
Then powr off your VM , Click on 'Edit Virtual Machine Settings' on the right
then Click on CD/DVD 2 (SATA) then Choos 'Use ISO image file' then the ubunto 16 image
then Click on CD/DVD (SATA) then Choos 'Use ISO image file' then the ubunto 16 image then on 'Ok'
ROS Kinetic ONLY supports Wily (Ubuntu 15.10), Xenial (Ubuntu 16.04) and Jessie (Debian 8) for debian packages.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
if you haven't already installed curl
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
First, make sure your Debian package index is up-to-date:
sudo apt-get update
Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
sudo apt-get install ros-kinetic-desktop-full
To find available packages, use:
apt-cache search ros-kinetic
It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.
If you just want to change the environment of your current shell, instead of the above you can type:
source /opt/ros/kinetic/setup.bash
If you use zsh instead of bash you need to run the following commands to set up your shell:
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
source ~/.zshrc
Up to now you have installed what you need to run the core ROS packages. To create and manage your own ROS workspaces, there are various tools and requirements that are distributed separately. For example, rosinstall is a frequently used command-line tool that enables you to easily download many source trees for ROS packages with one command.
To install this tool and other dependencies for building ROS packages, run:
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
Before you can use many ROS tools, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS. If you have not yet installed rosdep, do so as follows.
sudo apt install python-rosdep
With the following, you can initialize rosdep.
sudo rosdep init
rosdep update
Create the catkin root and source folders:
sudo apt-get install ros-kinetic-catkin
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
Configure the catkin workspace by issuing a first “empty” build command:
catkin_make
cd ~/catkin_ws/src
Launching ROS on a project from @Smart_methods for a robotic arm , Clone Github repository.
git clone https://github.com/smart-methods/arduino_robot_arm.git
Check the dependencies:
cd ~/catkin_ws
rosdep install --from-paths src --ignore-src -r -y
sudo apt-get install ros-kinetic-moveit
sudo apt-get install ros-kinetic-joint-state-publisher ros-kinetic-joint-state-publisher-gui
sudo apt-get install ros-kinetic-gazebo-ros-control joint-state-publisher
sudo apt-get install ros-kinetic-ros-controllers ros-kinetic-ros-control
Finally, update your .bashrc script with the information about the new workspace:
sudo nano ~/.bashrc
at the end of the (bashrc) file add the follwing line Make sure to change the username
(source /home/roamohamed/catkin_ws/devel/setup.bash)
then ctrl + o
source ~/.bashrc
The final command to finally launch the project
roslaunch robot_arm_pkg check_motors.launch