I spent a Sunday morning figuring out how to run Robot Operating System on AWS EC2. Here are the basic steps and the references to get it working. I’ve gone through these steps probably about 10 times today and it takes about 5 minutes to set up an instance and configure it.
One of my weekend challenges is to understand how to use Docker better. I might make a “container” or “Docker Image” for ROS. If I do, I will put the reference here.
- Install Ubuntu-16.04 AMI (current stable Ubuntu version)
- Follow the instructions on how to configure your Ubuntu Instance for Desktop Access
- Install ROS Kintetic
- Do the ROS Installation using the remote desktop.
- Work through ROS tutorials
- Do the ROS tutorials using the remote desktop.
- Here is the first ROS Tutorial in the series that has something that will display.
- I had an issue with
roscore. However, I was able to do the rest of the tutorials.
- I tried to install and run the ROS Turtlebot but I couldn’t get it running. Here is what I found out.
- Turtlebot requires ROS Indigo
- ROS Indigo requires Ubuntu Tasty. However, I couldn’t get Ubuntu-Trusty, ROS-Indigo, and Remote Desktop to all work together.
I spent a Saturday morning trying to connect to an AWS EC2 desktop after trying to follow the instructions given by AWS on Connecting to Ubuntu Desktop with Windows that completely failed.
The instructions described here are derived from the following YouTube Video. There were some parts that were not clear/correct so I have clarified and corrected them in this post.
Configure Ubuntu Desktop Server
- Connect ssh to ec2 instance using PUTTY.
- Become the super user by executing the command
- Update the operating system
sudo apt update && sudo apt upgrade
- Type the following commands to install vncserver:
sudo apt-get install ubuntu-desktop
sudo apt-get install vnc4server
sudo apt-get install gnome-panel
- Remember the password you set. You will need this passcode later when you connect using tightvnc .
- Kill vncserver
vncserver -kill :1
- Modify the VNC startup script
- Add the following lines to the .vnc/xstartup script
# Uncomment the following two lines for normal desktop:
# exec /etc/X11/xinit/xinitrc
gnome-session –session=gnome-classic &
- Press ESC, followed by
:wq (write-quit) to save and exit the file
- Start the VNCServer again
Configure your Windows Box
Configure your EC2 Instance
- Edit your security group.
- Add port number 5901 in your ec2 security group
- Write your public ip number (or DNS name) in remote host text box and port number
- Your desktop in ec2 instance is ready and execute the command vncserver after every restart.
- Can I stop my machine and restart it?: Yes. However you will have to re-run the
vncserver command after restarting the server.