Ask Your Question
0

How can I use rosbuild_check_for_display in catkin?

asked 2014-05-30 04:01:04 -0500

ct2034 gravatar image

updated 2014-05-30 04:01:56 -0500

rosbuild_check_for_display in catkin

Hi,
I am trying to catkinize a robuild package. It has a testing section that needs to differ between beeing called with simulation or on a robot. Therefor the rosbuild_check_for_display function in the CMakeLists is used. It will run the simulation if a display is present.
Is there a possibilty to do this in catkin?
Thanks for your time

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-05-30 04:47:29 -0500

joq gravatar image

Catkin provides no built-in equivalent. You'll need to code it yourself using CMake commands.

Maybe something like this would work:

if (CATKIN_ENABLE_TESTING)
  find_package(rostest REQUIRED)
  if (DEFINED ENV{DISPLAY})
    add_rostest(tests/simulation.test)
  else()
    add_rostest(tests/robot.test)
  endif()
endif()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-30 04:01:04 -0500

Seen: 47 times

Last updated: May 30 '14