Note: This tutorial assumes that you have completed the previous tutorials: Mingw Build Environment.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Mingw Runtime Environment

Description: steps necessary to package a mingw runtime environment for ros on windows.

Tutorial Level: INTERMEDIATE

Next Tutorial: Qt-Ros on Windows

Overview

Be warned - this is still very experimental! There are alot of commands with arguments that aren't fully covered yet and will just abort (e.g. rospack find works, but rosstack find bombs).

Preparation

First we need a linux box because we're going to mingw cross-compile the necessary bits and pieces.

> rosmake --pre-clean rosout win_env

Note that usually rosout will have been compiled natively when installing. Be sure to clean the configuration.

  • Move windows versions of the rospack binaries to the $ROS_ROOT/bin folder.

roscd 
cd bin
cp rospack rospack_linux
cp rosstack rosstack_linux
cp `rospack find rospack`/bin/rospack.exe .
cp `rospack find rospack`/bin/rosstack.exe .

Packaging

Ok, at this point you will probably want to zip up the trees and keep a copy floating around so you don't have to repeat this process. When things are more stable, we'll consider maintaining an archive somewhere. Assuming your tree is in /opt/ros

cd /opt
zip -r ros.zip ./ros

Setting up on Windows

  • Install python 2.7 and pywin32.

  • Copy and unzip the file above to your windows box.
  • Set up environment variables
    • copy win_env/scripts/winshell.bat -> %ROS_ROOT/setup.bat

    • be sure to edit variables to point to the correct locations!

  • To start roscore/programs from the shell, create a shortcut for %ROS_ROOT/setup.bat on the desktop.

If you want to start roscore/programs from outside the shell, first edit and then run win_env/scripts/winsetup.py to hack the registry so that your variables are always present.

Testing

If you've got the rospy_tutorials package installed, you should be able to do in separate winshells:

roscore

roslaunch win_env listener.launch

roslaunch win_env talker.launch

winmaster

Building Packages

cpp packages:

Building packages for this runtime environment has to be done back in the mingw build environment on the linux platform. We don't have the system set up for windows mingw develompent yet, and in most cases anyway, mingw development on windows is often awkward and really slow.

You can either copy the stacks/packages over directly to the windows box, or run them as Standalone Clients.

python packages:

These can be done just as easily on the linux or the windows box.

Wiki: mingw_cross/graveyard/Mingw Runtime Environment - Diamondback (last edited 2011-10-16 23:32:39 by DanielStonier)