>

Install ROS on Cygwin

ROS-rc was tested on an Windows XP inside a VMWare virtual machine and one windows xp dual core laptop. I only compiled "$ROS_ROOT/" and assumed the installation is in ~/ros/ I also did some test using "rosmake roscpp_tutorials" and "rosmake rospy_tutorials". They seems to work fine.

Have fun.
tingfan@gmail.com
Originally posted on Tue Jan 5 21:39:58 PST 2010
Updated on Sat Jan 9 16:46:34 PST 2010
Updated on Mon May 10 09:52:14 PDT 2010

Steps

  1. download latest cygwin setup (1.7) and install (default) minimal setting with one additional packages wget, also make sure you have these (default) packages bash, tar, gawk and bzip2 (for apt-cyg).
  2. Install apt-cyg
     
    			wget http://stephenjungels.com/jungels.net/projects/apt-cyg/apt-cyg -O /bin/apt-cyg
    			or 
    			wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg -O /bin/apt-cyg
    			then
    			chmod a+x /bin/apt-cyg
    		
    Now you can install packages with
    			apt-cyg -m [mirror site]  install [package name]
    		
    There are two sites you need to know. Now, take an exercise installing following tools from the official release mirrors subversion, make, cmake, gcc4, python, pkg-config . I also installed vim.
    			apt-cyg -m ftp://sourceware.org/pub/cygwin/ install subversion make cmake gcc4 python pkg-config vim 
    		
    The rest of necessary packages will be installed by ros automatically using apt-cyg from cygwinports.
  3. Install ROS. We roughly follow the official document at ROS.org.
    1. Install PyYaml (we will the pure-python parser, so don't build the lib)
      		  wget --tries=10 http://pyyaml.org/download/pyyaml/PyYAML-3.09.tar.gz
      		  tar xzf PyYAML-3.09.tar.gz
      		  cd PyYAML-3.09
      		  python setup.py --without-libyaml install
      		  cd ..
      		
    2. Get rosinstall
      			wget --no-check-certificate http://ros.org/rosinstall -O ~/rosinstall
      			chmod 755 ~/rosinstall
      		
    3. Checkout source but don't build yet (-n)
      			~/rosinstall -n ~/ros http://ros.org/rosinstalls/boxturtle_ros.rosinstall 
      		
    4. Environmental Setup - This step is different from the original procedure.
      add following lines to the end of ~/ros/setup.sh because some ros executables depend on dlls in these "*/lib" folders.
      			export PATH=$PATH:$ROS_ROOT/3rdparty/xmlrpcpp/lib/
      			export PATH=$PATH:$ROS_ROOT/core/rosconsole/lib/
      			export PATH=$PATH:$ROS_ROOT/core/roscpp/lib/
      			export PATH=$PATH:$ROS_ROOT/core/roslib/lib/
      			export PATH=$PATH:$ROS_ROOT/tools/rospack/lib/
      		
      Do yourself a favor checking `echo $PATH` see if it contains any un-escaped white-space paths such as "c:\Program Files". Mr. Lioutikov (r.lioutikov@gmx.de) suggested inserting export PATH=${PATH// /\\ } into .bashrc.ros to cure the problem. I myself simply don't inherit any path from windows.
      			echo "source ~/ros/setup.sh" >> ~/.bashrc
      			. ~/.bashrc
      		
    5. Build
    6. 		rosmake rostest --rosdep-install --rosdep-yes
      		
      Note
      * If you own a non-unicore machine, read this message
      * If the building process bail out due to some dll not found error, such as
      		/cygdrive/c/prj/ros/ros/ros/bin/rosstack.exe: error while loading shared libraries: 
      		cygrosstack.dll: cannot open shared object file: No such file or directory
      		
      proceed to next step to setup the path then retry.

      Done. You can either re-open the cygwin window or type

      			. ~/.bashrc
      		
      to initialize your environment
  4. For people interested in the tutorials
    Simple Test - Let talker from rospy talk to listener from roscpp. The "windows fire wall" dialog may popout to ask for permission to listen to a port. Just click on "unblock".
    	~/rosinstall -o ~/ros-tutorials http://www.ros.org/rosinstalls/ros_boxturtle_tutorial.rosinstall
    	echo "source ~/ros-tutorials/setup.sh" >> ~/.bashrc
    	. ~/.bashrc
    	rosmake roscpp_tutorials
    	rosmake rospy_tutorials
    	
    In separate cygwin windows, run
    	roscore  
    	rosrun rospy_tutorials talker.py
    	rosrun roscpp_tutorials listener.exe
    	

Known Issues