- A ROS node publishing String data on Windows.
- Another ROS node on Linux listening to the String data.
- Windows 7 or Vista (32/64 bit)
- Microsoft Visual Studio 2008 or Microsoft Visual Studio 2008 Express Edition
- CMake (version 2.8 or later)
- Linux Machine with ROS cturtle installed. Note that this is currently required because ROSWIN32 doesn't include ros master as yet. The ros master is run on the linux machine and ROSWIN32 communicates with it.
- Download the latest ROSWIN32 installation executable here or do a svn checkout of the sources from here.
- Run the executable and complete the installation.
Running the example "babbler"
Setting up your Linux machine.
- We will first need to set ROS_IP. Open a terminal and enter the following command.
export ROS_IP=mylinuxipaddressWhere mylinuxipaddress is the IP address of your linux machine.
- Now we will fire up the ros master. In the same terminal enter the following command.
roscoreRemember the ROS_MASTER_URI after the master has been launched successfully. You will require this in the later steps.
- Note: in order to avoid exporting ROS_IP every time you open a new terminal, you can edit the environment variable permanently by editing its value in the ros/setup.sh file.
Setting up your Windows machine.
- Copy the REC GmbH/ROSWIN32/examples folder from your installation directory to a location where you have write access (your Desktop for instance.)
- Create a build_babbler folder.
- Start CMake and set the source directory to examples/babbler. Set the build directory to build_babbler.
- Press Configure and select the compiler "Visual Studio 9 2008". After the configuration is complete, press Configure once again. And then finally, press Generate.
- After successfully generating your visual studio project, navigate to the build_babbler directory and open babbler.sln with Visual Studio 2008.
- You will now need to set the ROS_MASTER_URI and ROS_IP for windows and this can be done by changing the following two lines in the babbler.cpp file.
The ROS_MASTER_URI can be set by modifying the following line to the value we noted on the linux machine.
ros::master::setURI("http://xxx.xxx.xxx.xxx:11311/"); The ROS_IP can be set by modifying the following line to include the IP address of your windows machine.
- Once the changes have been made, right click on babbler in the Solution Explorer window and click build. babbler should build without any errors.
- Make sure the master we started on the linux machine is still running.
- Now, run babbler.exe from the build_babbler/Debug directory. A babbler node will be initialized and will start publishing string data on the topic /babble
- The other examples can be run in a similar way as babbler.