Step By Step to a working ROS Indigo environment

We are beginning with a blank Xubuntu 14.04 Trusty x64 on a Lenovo Thinkpad T520.

Setup Ubuntu environment:

  • general:
    • sudo apt-get install fail2ban ufw terminator git screen
  • optional:
    • sudo apt-get install vim vnstat htop bmon chromium-browser

Setup ROS desktop environment Ubuntu 14.04 Trusty:

// Source:  http://wiki.ros.org/indigo/Installation/Ubuntu

  • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
  • wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
  • sudo apt-get update
  • sudo apt-get install ros-indigo-desktop-full

Setup ~/.bashrc part I:

  • source /opt/ros/hydro/setup.bash
  • export ROS_MASTER_URI=”http://192.168.2.116:11311
    • export ROS_MASTER_URI=”http://ifconfig wlan0 | grep "inet " | awk -F'[: ]+' '{ print $4 }':11311″
    • export ROS_MASTER_URI=”http://ip -f inet addr show wlan0 | grep -Po 'inet K[d.]+':11311″
    • local ip 127.0.0.1 or use vpn mesh networking like: tincd
  • export ROS_HOSTNAME=192.168.2.116
    • see ROS_MASTER_URI
  • export ROS_IP=192.168.2.116
    • see ROS_MASTER_URI
  • color_prompt=yes;
    • on top

Create catkin workspace:

// Source: http://wiki.ros.org/catkin/Tutorials/create_a_workspace

  • mkdir -p ~/catkin_ws/src
  • cd ~/catkin_ws/src
  • catkin_init_workspace

We will now build the empty work space:

  • cd ~/catkin_ws/
  • catkin_make
  • source devel/setup.bash

Setup ~/.bashrc part II:

  • source /home/insert-your-username/catkin_ws/devel/setup.bash
  • PROMPT_COMMAND=”history -a ; $PROMPT_COMMAND”
  • alias exip=’curl IcanHazIp.com’

ROS Tools you should know:

Setup [amazon &title=Asus Xtion&text=Asus Xtion] on x86:

  • sudo apt-get install ros-indigo-openni2-camera
  • sudo apt-get install ros-indigo-openni2-launch
  • roslaunch openni2-camera openni2.launch

Setup 9D Razor on x86:

  • cd ~/catkin_ws/src
  • git clone https://github.com/robotictang/razor_imu_9dof
  • compile and transfer AHRS Source for Arduino FTDI Board 3.3 V
  • build workspace with catkin
  • roslaunch razor_imu_9dof razor.launch
    • requires root!

Important ROS Tutorial Sites:

Useful commands during operation:

  • Show ros environment variables:
    • export | grep ROS
  • Synchronize time with master, in environments without ntp server
    • ntpdate `echo $ROS_MASTER_URI | grep -oE "b([0-9]{1,3}.){3}[0-9]{1,3}b"`
    • or use chrony on suitable devices (issues with dynamic tact rates)
  • Use terminal multiplexors!
    • screen, mux, terminator etc
  • Hardware communication requires root
    • copy or symlink important parts of .bashrc
    • avoid ~ and prefer hardlinks