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

Using CUDA with catkin - can't generate messages

asked 2013-09-08 13:41:22 -0500

Calder gravatar image

To add cuda support to a catkin package, I'm using find_package(CUDA REQUIRED) right after find_package(catkin REQUIRED COMPONENTS ...). This works by itself; however, if I call generate_messages(...) in the same CMakeLists.txt, cmake fails with the following error:

CMake Error at /opt/ros/groovy/share/genmsg/cmake/genmsg-extras.cmake:251 (include): include called with wrong number of arguments. Include only takes one file. Call Stack (most recent call first): Personal/ros_cuda_test/CMakeLists.txt:37 (generate_messages)

Both find_package(CUDA REQUIRED) and generate_messages(...) work in isolation, so it isn't a problem with the messages it's trying to generate.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-09-08 17:43:49 -0500

Calder gravatar image

I appear to have fixed the problem with

find_package(CUDA REQUIRED)

set(config)

so that the config variable used in generate_messages(...) gets cleared of anything remaining from finding CUDA. This successfully compiles.

However, I'm hesitant to call this a solution, since I don't know if catkin is expecting a value for config (hence why generate_messages(...) doesn't clear the variable itself)

edit flag offensive delete link more

Comments

This sounds like it might be worth filing an issue against `message_generation` or `genmsg`, this could probably be fixed there and made more robust to outside interference.

William gravatar image William  ( 2013-09-08 22:13:58 -0500 )edit

I a pretty sure that is a bug in genmsg. Even if the code looks like that it tries to deal with it (https://github.com/ros/genmsg/blob/groovy-devel/cmake/genmsg-extras.cmake.em#L252) it seems to fail so I have filled a ticket: https://github.com/ros/genmsg/issues/33

Dirk Thomas gravatar image Dirk Thomas  ( 2013-09-09 11:40:55 -0500 )edit

Question Tools

Stats

Asked: 2013-09-08 13:41:22 -0500

Seen: 978 times

Last updated: Sep 08 '13