Problems with setting up Msvc Message SDK

107 views
Skip to first unread message

Lorenz Halt

unread,
Sep 11, 2012, 8:01:52 AM9/11/12
to win...@googlegroups.com
Hi,
I am also pretty new to ROS and currently struggeling to set up a pilot project to use ROS in our industrial robot cell. Since we usally work under Visual Studio we build up some expertise and that is why ROS was more or less out of the game so far.
However, win_ros is a real gamechange here. Setting up the first listener/talker example was a big success. But to realize the first pilot application i need something more. So I tried including action_lib and this was when the trouble started.
To create the tutorial example of the "easy" fibonacci actionserver/client I needed to create my own Action. so I tried to install the Message SDK. The first problem was that I got stuck at BulletPoint 3 “Generate Official Comms” (http://www.ros.org/wiki/win_ros/Msvc%20SDK%20Messages%20-%20Fuerte). More precisely I could not perform the third step “winros comms configure”. It gave me the Cmake Error: The source directory “C:/work/comms” does not appear to contain CMakeList.txt.
With the help of Daniel who told me to redownload winros.bat and uninstall/reinstall win_rosinstall could actually configure it.
So I tried to build it. It went good till Python came into play (~14%). The first problem was that instead of executing the python script my default action was to open notepad++ for editing. That was easy to solve by changing the default action to use python.exe.
But even so the building stops with an error msg as following:
genmsg_py.py:
error: please specify args
NMAKE : fatal error U1077: 'call' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
Stop.

I am not sure how to handle this. I am happy for all ideas!



Daniel Stonier

unread,
Sep 11, 2012, 9:01:11 AM9/11/12
to win...@googlegroups.com
Creating a custom action was exactly where my colleague ran into trouble this morning ;) I absently never tested that with the comms...works fine when building the whole sdk. However, I gather that you haven't actually created a custom package with action yet - your build is failing on executing the generator scripts. I'll redo the comms tomorrow and see if I run into the same error. By chance, can you copy what happened just before the error?

Cheers,
Daniel.


Daniel Stonier

unread,
Sep 11, 2012, 9:03:24 AM9/11/12
to win...@googlegroups.com
On 11 September 2012 21:01, Lorenz Halt <loren...@gmail.com> wrote:
Hi,

So I tried including action_lib and this was when the trouble started.
 
genmsg_py.py: error: please specify args

NMAKE : fatal error U1077: 'call' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
Stop.

I am not sure how to handle this. I am happy for all ideas! 

Was this error after the default comms download or was it the comms download + actionlib? If so, how exactly did you include actionlib? 

Daniel

Lorenz Halt

unread,
Sep 17, 2012, 4:14:06 AM9/17/12
to win...@googlegroups.com
Hi Daniel,
here are the steps I've take so far:
1. Downloading and installing the Msvc SDK -> tested sucessfully
2. Setting up the Msvc SDK Projects -> successfully compiled a slightly modified talker/listner and ran it via VS10
3. Downloaded and trying to build Msvc SDK Messages, got stuck at winros comms configure...
3b. Experimenting with building actions via VS10
  1. building boost_1_47 for VC10
  2. Copying boost_1_47_thread.lib/.dll and boost_1_47_date_time.lib/.dll to rosdep
  3. Renaming those boost_1_47_*.lib in libboost_1_47_*.lib
  4. Including actionlib.lib into the ros propertysheet for vs
  5. Succesfully building and starting "my" test action server and client (TestAction)

After all, I hope this helps answering your questions and might helps others. However I guess this makes medoing the comms download + actionlib.


Cheers, Lorenz

Daniel Stonier

unread,
Sep 17, 2012, 7:38:30 PM9/17/12
to win...@googlegroups.com
On 17 September 2012 17:14, Lorenz Halt <loren...@gmail.com> wrote:
Hi Daniel,
here are the steps I've take so far:
1. Downloading and installing the Msvc SDK -> tested sucessfully
2. Setting up the Msvc SDK Projects -> successfully compiled a slightly modified talker/listner and ran it via VS10
3. Downloaded and trying to build Msvc SDK Messages, got stuck at winros comms configure...
3b. Experimenting with building actions via VS10
  1. building boost_1_47 for VC10
  2. Copying boost_1_47_thread.lib/.dll and boost_1_47_date_time.lib/.dll to rosdep
  3. Renaming those boost_1_47_*.lib in libboost_1_47_*.lib
  4. Including actionlib.lib into the ros propertysheet for vs
  5. Succesfully building and starting "my" test action server and client (TestAction)

After all, I hope this helps answering your questions and might helps others. However I guess this makes medoing the comms download + actionlib.


Lorenz,

Is your goal just to process .action files or to compile a working program? If you're just wanting to generate the .action files you shouldn't need boost or actionlib. We tested this yesterday:

  • roscreate-stack a new stack alongside the other comms stacks.
  • roscreate-comms-pkg inside the new stack
  • add an action
  • twiddle stack and package CMakeLists.txt
  • twiddle stack.xml
No problem.

If you want to build a cpp or py package (ros style) that has an action client/server, then the easiest way is to use an extended workspace (sdk install space + custom buildspace). I haven't written a tutorial for that, but I can do so if you're interested.

Daniel
 

Cheers, Lorenz



Am Dienstag, 11. September 2012 15:03:25 UTC+2 schrieb Daniel Stonier:

Was this error after the default comms download or was it the comms download + actionlib? If so, how exactly did you include actionlib? 

Daniel



--
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/

Daniel Stonier

unread,
Sep 17, 2012, 7:41:37 PM9/17/12
to win...@googlegroups.com
On 18 September 2012 08:38, Daniel Stonier <d.st...@gmail.com> wrote:
On 17 September 2012 17:14, Lorenz Halt <loren...@gmail.com> wrote:
Hi Daniel,
here are the steps I've take so far:
1. Downloading and installing the Msvc SDK -> tested sucessfully
2. Setting up the Msvc SDK Projects -> successfully compiled a slightly modified talker/listner and ran it via VS10
3. Downloaded and trying to build Msvc SDK Messages, got stuck at winros comms configure...
3b. Experimenting with building actions via VS10
  1. building boost_1_47 for VC10
  2. Copying boost_1_47_thread.lib/.dll and boost_1_47_date_time.lib/.dll to rosdep
  3. Renaming those boost_1_47_*.lib in libboost_1_47_*.lib
  4. Including actionlib.lib into the ros propertysheet for vs
  5. Succesfully building and starting "my" test action server and client (TestAction)

After all, I hope this helps answering your questions and might helps others. However I guess this makes medoing the comms download + actionlib.


Lorenz,

Is your goal just to process .action files or to compile a working program? If you're just wanting to generate the .action files you shouldn't need boost or actionlib. We tested this yesterday:

  • roscreate-stack a new stack alongside the other comms stacks.
  • roscreate-comms-pkg inside the new stack
  • add an action
  • twiddle stack and package CMakeLists.txt (mostly adding actionlib_msgs as dependancy)
  • twiddle stack.xml (again actionlib_msgs)
No problem.


Just read you're working with VS10 so ignore my comment about extended workspaces :) 
 
If you want to build a cpp or py package (ros style) that has an action client/server, then the easiest way is to use an extended workspace (sdk install space + custom buildspace). I haven't written a tutorial for that, but I can do so if you're interested.

Daniel
 

Cheers, Lorenz



Am Dienstag, 11. September 2012 15:03:25 UTC+2 schrieb Daniel Stonier:

Was this error after the default comms download or was it the comms download + actionlib? If so, how exactly did you include actionlib? 

Daniel



--
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/

Lorenz Halt

unread,
Sep 18, 2012, 4:46:00 AM9/18/12
to win...@googlegroups.com
Hi Daniel,
actually I want it all ;-). However, building a action server/client worked with the steps 3b) ff.
I'll try to generate action according to you suggested steps beneath. I'll let you know what happened.
Cheers,
Lorenz

Lorenz Halt

unread,
Sep 18, 2012, 12:07:38 PM9/18/12
to win...@googlegroups.com
I found the reason why the generation of the python msg failed. Actually (for some reason), python was not associated right within my windows system. I happend that the parameters got lost when calling e.g.
  >test foo
Args: []
but:
>python test.py foo
Args: ['foo']

And:
>assoc .py
.py=Python.File

>ftype Python.File
"C:\Python27\python.exe" "%1" %*

Even it was telling me with ftype it was not correct in the registry (%* was missing), so I changed it to

[HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command]
@="C:\Python27\python.exe "%1" %*"

And now it builds. I am aware that this was not a win_ros but a python_win problem, however I hope this might help someone with comparable issues.

Cheers,
Lorenz

Lorenz Halt

unread,
Sep 19, 2012, 7:13:57 AM9/19/12
to win...@googlegroups.com
Hi Daniel,
maybe a tutorial on how to create an action would not be wrong. Especially how to "add an action" into the CMakeList.txt and what exactly to twiddle. And maybe directly what to do to include the generated action/srv/msg into the VS Project to use it.

Thanks a lot in advance! I feel like we came a long way already!
Cheers,
Lorenz
 

Daniel Stonier

unread,
Sep 23, 2012, 7:24:44 PM9/23/12
to win...@googlegroups.com
On 19 September 2012 20:13, Lorenz Halt <loren...@gmail.com> wrote:
Hi Daniel,
maybe a tutorial on how to create an action would not be wrong. Especially how to "add an action" into the CMakeList.txt and what exactly to twiddle. And maybe directly what to do to include the generated action/srv/msg into the VS Project to use it.

That's probably a good idea. 

In the meantime, uninstall roscreate and redownload/install it. We added a few comments in the cmake to show how to add an action (roscreate-comms-pkg) and also updated a message to indicate how you should update your stack files as well.

Daniel.

 

Thanks a lot in advance! I feel like we came a long way already!
Cheers,
Lorenz
 
Is your goal just to process .action files or to compile a working program? If you're just wanting to generate the .action files you shouldn't need boost or actionlib. We tested this yesterday:

  • roscreate-stack a new stack alongside the other comms stacks.
  • roscreate-comms-pkg inside the new stack
  • add an action
  • twiddle stack and package CMakeLists.txt (mostly adding actionlib_msgs as dependancy)
  • twiddle stack.xml (again actionlib_msgs)
No problem.


Lorenz Halt

unread,
Sep 25, 2012, 4:35:40 AM9/25/12
to win...@googlegroups.com
Hey,
So I did, but now for some reasons
roscreate-comms-pkg dude_comms 
fails with error: current working directory is not on ROS_PACKAGE_PATH!
What working directory should be included? I edited setup.bat to

set ROS_PACKAGE_PATH=%ROS_HOME%/ros/fuerte/x86/share;%ROS_HOME%/ros/fuerte/x86/stacks;c:/work/comms;c:/work/comms/custom_comms

but no success so far. Since it did work well something must have changed maybe due to uninstalling/redoing roscreate?

Cheers,
Lorenz

Daniel Stonier

unread,
Sep 25, 2012, 4:48:16 AM9/25/12
to win...@googlegroups.com
On 25 September 2012 17:35, Lorenz Halt <loren...@gmail.com> wrote:
Hey,
So I did, but now for some reasons
roscreate-comms-pkg dude_comms 
fails with error: current working directory is not on ROS_PACKAGE_PATH!
What working directory should be included? I edited setup.bat to

set ROS_PACKAGE_PATH=%ROS_HOME%/ros/fuerte/x86/share;%ROS_HOME%/ros/fuerte/x86/stacks;c:/work/comms;c:/work/comms/custom_comms

but no success so far. Since it did work well something must have changed maybe due to uninstalling/redoing roscreate?

Cheers,
Lorenz

 
Ah, I need a better error message. I ticketed it a few days ago I suspect you've called an env.bat somewhere before running that. It sets a ROS_ROOT and if roscreate detects that variable, it flails about a bit.

Start a new shell without calling env.bat (i.e. no ROS_ROOT).  It should work.

I'll get my colleague to have a look at that this week.

He also ran into trouble linking an action client program in microsoft express today. Boost's auto-linking isn't playing nice with the cmake build boost in the rosdeps directory (can't find an appropriately named thread library). Temporary workaround is to disable that by  defining the BOOST_ALL_NO_LIB preprocessor macro for the project or add it to the ros properties file. I'll get him to update the sdk examples with a working actionlib project and updated ros properties.

Daniel.

Lorenz Halt

unread,
Sep 25, 2012, 6:43:54 AM9/25/12
to win...@googlegroups.com


Am Dienstag, 25. September 2012 10:48:17 UTC+2 schrieb Daniel Stonier:


On 25 September 2012 17:35, Lorenz Halt <loren...@gmail.com> wrote:
Hey,
So I did, but now for some reasons
roscreate-comms-pkg dude_comms 
fails with error: current working directory is not on ROS_PACKAGE_PATH!
What working directory should be included? I edited setup.bat to

set ROS_PACKAGE_PATH=%ROS_HOME%/ros/fuerte/x86/share;%ROS_HOME%/ros/fuerte/x86/stacks;c:/work/comms;c:/work/comms/custom_comms

but no success so far. Since it did work well something must have changed maybe due to uninstalling/redoing roscreate?

Cheers,
Lorenz

 
Ah, I need a better error message. I ticketed it a few days ago I suspect you've called an env.bat somewhere before running that. It sets a ROS_ROOT and if roscreate detects that variable, it flails about a bit.

Start a new shell without calling env.bat (i.e. no ROS_ROOT).  It should work.

I'll get my colleague to have a look at that this week.

He also ran into trouble linking an action client program in microsoft express today. Boost's auto-linking isn't playing nice with the cmake build boost in the rosdeps directory (can't find an appropriately named thread library). Temporary workaround is to disable that by  defining the BOOST_ALL_NO_LIB preprocessor macro for the project or add it to the ros properties file. I'll get him to update the sdk examples with a working actionlib project and updated ros properties.

Ok, sounds great! I'm looking forward to it :-). I think I worked around the thread-lib problem by copying the boost-thread-lib into the deps folder...

I actually called env before, without it it work better. I uncommented "add_action_files( ... ) but it is not recognized as any CMake command.
Lorenz
 

Daniel Stonier

unread,
Sep 25, 2012, 7:28:53 AM9/25/12
to win...@googlegroups.com
On 25 September 2012 19:43, Lorenz Halt <loren...@gmail.com> wrote:


Am Dienstag, 25. September 2012 10:48:17 UTC+2 schrieb Daniel Stonier:


On 25 September 2012 17:35, Lorenz Halt <loren...@gmail.com> wrote:
Hey,
So I did, but now for some reasons
roscreate-comms-pkg dude_comms 
fails with error: current working directory is not on ROS_PACKAGE_PATH!
What working directory should be included? I edited setup.bat to

set ROS_PACKAGE_PATH=%ROS_HOME%/ros/fuerte/x86/share;%ROS_HOME%/ros/fuerte/x86/stacks;c:/work/comms;c:/work/comms/custom_comms

but no success so far. Since it did work well something must have changed maybe due to uninstalling/redoing roscreate?

Cheers,
Lorenz

 
Ah, I need a better error message. I ticketed it a few days ago I suspect you've called an env.bat somewhere before running that. It sets a ROS_ROOT and if roscreate detects that variable, it flails about a bit.

Start a new shell without calling env.bat (i.e. no ROS_ROOT).  It should work.

I'll get my colleague to have a look at that this week.

He also ran into trouble linking an action client program in microsoft express today. Boost's auto-linking isn't playing nice with the cmake build boost in the rosdeps directory (can't find an appropriately named thread library). Temporary workaround is to disable that by  defining the BOOST_ALL_NO_LIB preprocessor macro for the project or add it to the ros properties file. I'll get him to update the sdk examples with a working actionlib project and updated ros properties.

Ok, sounds great! I'm looking forward to it :-). I think I worked around the thread-lib problem by copying the boost-thread-lib into the deps folder...

I actually called env before, without it it work better. I uncommented "add_action_files( ... ) but it is not recognized as any CMake command.
Lorenz

Make sure you have actionlib_msgs defined as a dependency (that is where the cmake is defined).  

In the package CMakeLists.txt there should be comments about actionlib_msgs in two places. You need to modify something like this:

...
find_package(ROS REQUIRED COMPONENTS genmsg std_msgs actionlib_msgs)
...
generate_messages(DEPENDENCIES std_msgs actionlib_msgs)
...

In the stack.xml make sure you are also depending on the common_msgs stack (that is where actionlib_msgs is):

  <build_depends>common_msgs</build_depends>

Lorenz Halt

unread,
Sep 25, 2012, 8:43:33 AM9/25/12
to win...@googlegroups.com

Hej,
yeah, you were right. I only inserted actionlib_msgs into generate_messages and forgot about find_package! Finally it worked!
I built my first own action and used it in a small server-client app!
Hopefully I'll soon find some time to start building real robot stuff!

Cheers,
Lorenz

Daniel Stonier

unread,
Sep 25, 2012, 8:55:41 AM9/25/12
to win...@googlegroups.com
Awesome :)

Daniel. 


 
Daniel.
 
Am Montag, 24. September 2012 01:24:45 UTC+2 schrieb Daniel Stonier:


On 19 September 2012 20:13, Lorenz Halt <loren...@gmail.com> wrote:
Hi Daniel,
maybe a tutorial on how to create an action would not be wrong. Especially how to "add an action" into the CMakeList.txt and what exactly to twiddle. And maybe directly what to do to include the generated action/srv/msg into the VS Project to use it.

That's probably a good idea. 

In the meantime, uninstall roscreate and redownload/install it. We added a few comments in the cmake to show how to add an action (roscreate-comms-pkg) and also updated a message to indicate how you should update your stack files as well.

Daniel.

 

Thanks a lot in advance! I feel like we came a long way already!
Cheers,
Lorenz
 
Is your goal just to process .action files or to compile a working program? If you're just wanting to generate the .action files you shouldn't need boost or actionlib. We tested this yesterday:

  • roscreate-stack a new stack alongside the other comms stacks.
  • roscreate-comms-pkg inside the new stack
  • add an action
  • twiddle stack and package CMakeLists.txt (mostly adding actionlib_msgs as dependancy)
  • twiddle stack.xml (again actionlib_msgs)
No problem.





-- 
Reply all
Reply to author
Forward
0 new messages