# Compiling single package under winros

Hello guys,

I have successfully installed winros on my Win7 system and need to create my own Messagetype. This worked very well by createing a CMakeLists.txt in the directory and adding these two lines.

add_message_files(DIRECTORY msg FILES message.msg)
generate_messages()


I tried to compile the package with cmake but that didn't work. I got stucked with an error about the message_generationConfig.cmake which I found under C:\opt\ros\groovy\x86\share\message_generation\cmake. The commandline output advised me to add that path to an environment variable like message_generation_DIR but that haven't worked. Well, I finally compiled all packages and my own with the messagetypes again with "winros_make" and then the Headerfile was generated.

Has anybody figured out how to compile one single package with cmake or has somebody used the rosmake component under winros?

Best regards

edit retag close merge delete

Sort by » oldest newest most voted

The winros_make command just makes a call out to cmake, but potentially passes alot of variables. You can see part of winros_make's scripting which makes the call here.

You should also see the output for the cmake command that winros_make executed directly on standard output (check the print lines in the script above). At any rate, that should give you an idea of what magic winros_make is doing under the hood.

Note that rosmake is legacy - it is the tool that was used for the old build system. winros_make is effectively the windows counterpart of catkin_make on linux. It just adds a few extra windows specific features to make it easier for the user.

We plan to perhaps have a script to simplify building of packages only. I did that with fuerte - just haven't gotten that far with groovy yet.

more

Hey guys,

after long time I'm trying to compile a single package again to generate the headers from my defined msg and srv files in that package.

After the command

cmake -G "NMake Makefiles" -C "c:\work\ws\config.cmake" -DCMAKE_USER_MAKE_RULES_OVERRIDE:STRING="C:\Python27\lib\site-packages\win_ros\cmake\MsvcOverrides.cmake" -DCATKIN_DEVEL_PREFIX=c:\work\ws\devel c:\work\ws\src\my_project


I get the output

loading initial cache file D:\work\ws\config.cmake -- Using CATKIN_DEVEL_PREFIX: D:/work/ws/devel -- Using CMAKE_PREFIX_PATH: D:/opt/rosdeps/hydro/x86 -- Using default Python package layout -- Using CATKIN_ENABLE_TESTING: on -- Using CATKIN_TEST_RESULTS_DIR: D:/work/ws/src/tf2_msgs/test_results CMake Warning at D:/opt/ros/hydro/x86/share/catkin/cmake/test/gtest.cmake:103 (m essage): gtest not found, C++ tests can not be built. You can run 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the source space 'D:/work/ws/src/tf2_msgs' of your workspace Call Stack (most recent call first): D:/opt/ros/hydro/x86/share/catkin/cmake/all.cmake:134 (include) D:/opt/ros/hydro/x86/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:4 (find_package)

-- catkin 0.5.69
Boost  found.
Found Boost components:
-- Generating .msg files for action tf2_msgs/LookupTransform D:/work/ws/src/tf2_
msgs/action/LookupTransform.action
-- tf2_msgs: 9 messages, 1 services
-- Configuring done
-- Generating done
-- Build files have been written to: D:/work/ws/src/tf2_msgs


After that I tried the "nmake" and "nmake install" command and the folder was created under C:\opt\ros\groovy\x86\include but without the headerfiles. I really don't know why. The cmake.py doesn't do anything else.

more

Where is CMAKE_INSTALL_PREFIX pointing to in your cmake cache? You didn't pass that in, so maybe they got installed elsewhere.

( 2013-11-20 22:05:43 -0500 )edit

The CMakeCache.txt in my package tells me that CMAKE_INSTALL_PREFIX is pointing to D:/opt/ros/hydro/x86. Seems to be correct. And the files are not installed there.

( 2013-11-24 20:37:40 -0500 )edit

Did you attempt the [tutorial](http://wiki.ros.org/win_ros/hydro/Msvc%20SDK%20Messages) for generating your own messages? Is there a reason you're trying to do this in a custom way? Might be easier to debug if you can verify the tutorial first.

( 2013-11-24 22:03:40 -0500 )edit

I now tried to compile the package with the following command I have seen on the output.

cmake -G "NMake Makefiles" -C "c:\work\ws\config.cmake" -DCMAKE_USER_MAKE_RULES_OVERRIDE:STRING="C:\Python27\lib\site-packages\win_ros\cmake\MsvcOverrides.cmake" -DCATKIN_DEVEL_PREFIX=c:\work\ws\devel c:\work\ws\src\my_project

The difference to the command winros_make is executing is the last path "c:\work\ws\src\my_project" which describes the directory of my project. The output then looks like this:

loading initial cache file c:\work\ws\config.cmake Boost found. Found Boost components: date_time;thread -- Using CATKIN_DEVEL_PREFIX: c:/work/ws/devel -- Using CMAKE_PREFIX_PATH: C:/opt/rosdeps/groovy/x86 CMake Warning at C:/opt/ros/groovy/x86/share/catkin/cmake/test/gtest.cmake:99 (m essage): gtest not found, C++ tests can not be built. You can run 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the root of your workspace Call Stack (most recent call first): C:/opt/ros/groovy/x86/share/catkin/cmake/all.cmake:133 (include) C:/opt/ros/groovy/x86/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:5 (find_package)

-- Using CATKIN_TEST_RESULTS_DIR: C:/work/wsbak/src/my_project/test_results -- catkin 0.5.64 -- my_project: 2 messages, 0 services -- Configuring done -- Generating done -- Build files have been written to: C:/work/wsbak/src/msm_msgs

Looks very promissing. The two messages I have defined were parsed successfully but at least the projectfolder with its headerfiles were not created under C:\work\ws\devel\include

more