Ask Your Question
0

ROS on Ubuntu Communicating with Win_ROS

asked 2012-12-14 09:33:42 -0500

Merdad gravatar image

updated 2012-12-14 09:37:58 -0500

Hi All,

I am currently working on a robot that runs Windows 7. The control program is done using DirectX SDK 9.0 and Visual Studio 2008 Express. I am planing on using ROS for navigation. Now, the problem is communicating between the robot (Windows 7) and a workstation running Ubuntu 12.04 and ROS fuerte.

To get started, I was trying to get a publisher node on my Windows machine to publish to a Topic on my Ubuntu machine. I followed these instruction:

• Installation
1. Download the latest ROSWIN32 installation executable here or do a svn checkout of the sources from here.
2. Run the executable and complete the installation. Running the example "babbler"

• Setting up your Linux machine.
1. We will first need to set ROS_IP. Open a terminal and enter the following command. export ROS_IP=mylinuxipaddress Where mylinuxipaddress is the IP address of your linux machine.
2. Now we will fire up the ros master. In the same terminal enter the following command. roscore Remember the ROS_MASTER_URI after the master has been launched successfully. You will require this in the later steps.
3. 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.
1. Copy the REC GmbH/ROSWIN32/examples folder from your installation directory to a location where you have write access (your Desktop for instance.)
2. Create a build_babbler folder.
3. Start CMake and set the source directory to examples/babbler. Set the build directory to build_babbler.
4. Press Configure and select the compiler "Visual Studio 9 2008". After the configuration is complete, press Configure once again. And then finally, press Generate.
5. After successfully generating your visual studio project, navigate to the build_babbler directory and open babbler.sln with Visual Studio 2008.
6. 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("value obtained in the first section"); The ROS_IP can be set by modifying the following line to include the IP address of yourwindows machine. ros::network::setHost("xxx.xxx.xxx.xxx") ;
7. Once the changes have been made, right click on babbler in the Solution Explorer window and click build. babbler should build without any errors.
8. Make sure the master we started on the linux machine is still running.
9. 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
10. The other examples can be run in a similar way as babbler.


I can see the publisher node publishing on Win_ROS, but the Topic on my Ubuntu machine is not receiving it (checked using rxgraph). I have both ...
(more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2012-12-14 11:32:45 -0500

Merdad gravatar image

Guys, I resolved my problem by disabling Windows Firewall and using automatic IP assignment by the switch.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-12-14 09:33:42 -0500

Seen: 814 times

Last updated: Dec 14 '12