I'm new to ROS, but have been trying to bring myself up to speed quickly. So far, so good (I have a 64-bit MSVC 10 environment from source up and running), but I've come across a few little things while learning.
The first was that the tutorial for making a package wasn't building (
http://wiki.ros.org/win_ros/hydro/Msvc%20SDK%20Messages ). I dug into it and it was a requirement of hydro's common_msgs/actionlib_msgs requiring version 0.5.78 of catkin. The default install files pointed to a pull of catkin 0.5.69 I thought this would be a simple fix, so I changed the branch locally, the rest of the tutorial then worked, so I made a pull request to change the version number to 0.5.78 in the reference file. That pull request is here:
https://github.com/ros-windows/win_ros/pull/44
In the comments Younghyo points out that I accidentally broke roslaunch/roscore/etc. in doing so. As I commented in the pull request, in the newer version of catkin 0.5.78 the way the batch files to create environment variables are listed has changed. It is no longer a semi-colon delimited string as before, but a series of indexed environment variables and a count variable to tell you how many there are. roslaunch/roscore/etc broke because these batch files were not called and as a result key environment variables are missing (ROS_PACKAGE_PATH, etc).
In my build I have changed the scripts such that they are now compatible with this new system. However, given my newness with ROS, before I get hasty and make another pull requests I'd rather someone look it over to make sure its sensible. I made three changes that can be seen here:
https://gist.github.com/JonathanWade/8d2453c12fc333c8ef46
The first change to setup.bat loops through each environment variable and calls the referenced batch script. Unfortunately because I create the environment variable string on the fly, then reference it inside the loop scope, all with the end goal of getting the string the variable it is pointing to... it requires a bit of delayed expansion and indirection. There are some commented out lines to help those not familiar with batch scripting understand whats happening. Unfortunately when we end the setlocal that enabled the delayed expansion we destroy all environment variables within that scope including those that were created by the batch scripts that were called! So we have to recapture these variables at endlocal. This is pretty hackish and may not be the best long term solution unless it can be assumed that this small set of variables will be all we care about and can be hardcoded in the manner I have done it.
The second file was changed due to the use of delayed expansion in the first. As mentioned in the comments the delayed expansion will mess with the echo'ing of python code, so it is explicitly set to off for that block of script.
Finally, I caught a 'bug' in the third file. The use of the square brackets will function correctly if ROS_MASTER_URI does not exist, but if it does the behaviour is not correct and the batch file will exit reporting "]==[] was unexpected" and the environment will fail to be set up correctly. The quote syntax should work both when the variable does and does not exist
I'm happy with how my local environment is working and would love to contribute any fixes/improvements I can, but mentioned I'm new at all this so I'd rather someone experienced vet the changes or perhaps the changes should wait until the port to indigo begins.
If you make these changes to your local copy make sure to use the -p flag with winros_make or you'll get python errors from cached scripts
Jon