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

Revision history [back]

If this is the full CMakeLists.txt, the problem is simply that you are not building the respective node.

This package actually seems to be a tutorial from Clearpath.

Check the Compiling ... section on how to compile anything. You need to have the two following lines in there:

add_executable(random_driver random_driver.cpp)
target_link_libraries(random_driver ${catkin_LIBRARIES})

And the two lines with set(...) in your CMakeLists.txt don't make sense.

If this is the full CMakeLists.txt, the problem is simply that you are not building the respective node.

This package actually seems to be a tutorial from Clearpath.

Check the Compiling ... section on how to compile anything. You need to have the two following lines in there:

add_executable(random_driver random_driver.cpp)
target_link_libraries(random_driver ${catkin_LIBRARIES})

And the two lines with set(...) in your CMakeLists.txt don't make sense.


EDIT:

Two possibilities:

  1. You don't have costmap_2d installed, do with sudo apt-get install ros-DISTRO-costmap-2d and replace DISTRO with whatever ROS version you are using.
  2. You don't configure CMake correctly. Do you have something like find_package(catkin REQUIRED COMPONENTS costmap_2d <otherpackages>) in your CMakeLists.txt? And you need to declare it as a<build_depend>in thepackage.xml`.

If this does not help, please update your question with the respective/new CMakeLists.txt content...

If this is the full CMakeLists.txt, the problem is simply that you are not building the respective node.

This package actually seems to be a tutorial from Clearpath.

Check the Compiling ... section on how to compile anything. You need to have the two following lines in there:

add_executable(random_driver random_driver.cpp)
target_link_libraries(random_driver ${catkin_LIBRARIES})

And the two lines with set(...) in your CMakeLists.txt don't make sense.


EDIT:

Two possibilities:

  1. You don't have costmap_2d installed, do with sudo apt-get install ros-DISTRO-costmap-2d and replace DISTRO with whatever ROS version you are using.
  2. You don't configure CMake correctly. Do you have something like find_package(catkin REQUIRED COMPONENTS costmap_2d <otherpackages>) in your CMakeLists.txt? CMakeLists.txt, together with the resepctive include_dirs(${catkin_INCLUDE_DIRS} and target_link_libraries(..) calls? And you need to declare it as aa <build_depend>in thepackage.xml`. in the package.xml.

If this does not help, please update your question with the respective/new CMakeLists.txt content...