ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Compiling single package under winros

asked 2013-06-09 23:19:55 -0600

ChrisEule gravatar image

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 flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2013-06-10 01:10:34 -0600

Daniel Stonier gravatar image

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.

edit flag offensive delete link more
0

answered 2013-06-10 03:21:40 -0600

ChrisEule gravatar image

Thank you very much for your quick reply!

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

edit flag offensive delete link more
0

answered 2013-11-17 23:09:37 -0600

ChrisEule gravatar image

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:
   thread
-- 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.

edit flag offensive delete link more

Comments

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

Daniel Stonier gravatar image Daniel Stonier  ( 2013-11-20 22:05:43 -0600 )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.

ChrisEule gravatar image ChrisEule  ( 2013-11-24 20:37:40 -0600 )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.

Daniel Stonier gravatar image Daniel Stonier  ( 2013-11-24 22:03:40 -0600 )edit

Question Tools

Stats

Asked: 2013-06-09 23:19:55 -0600

Seen: 671 times

Last updated: Nov 17 '13