Why catkin_make doesnt create new executables

asked 2015-06-19 16:25:14 -0500

erivera1802 gravatar image

Hi there,

I am trying to create a new ROS package, but when I try to build it, it doesnt show that red line that says

Linking CXX executable /home/edrone/catkin_ws/devel/lib/stream/stream_node

Then, it doesnt create the executable. The curious thing is that it worked before, I have created several packages, and when I change something in the cpp file in those packages, it shows that line. but now i dont know what is going on with this new package.

Here is my CMakeList.txt:

cmake_minimum_required(VERSION 2.8.3)
project(camshift_drone)
find_package(catkin REQUIRED COMPONENTS
  ardrone_autonomy
  cv_bridge
  geometry_msgs
  image_transport
  roscpp
  sensor_msgs
  std_msgs
  tf
)

catkin_package()

include_directories(
  ${catkin_INCLUDE_DIRS}
)

add_executable(camshift_drone_node src/camshift_drone_node.cpp)

target_link_libraries(camshift_drone_node
   ${catkin_LIBRARIES}
)

Also, I have tried the solution of putting this line on the terminal, in my home folder, in the catkin workspace folder, but it hasnt worked.

  . ~/catkin_ws/devel/setup.bash

I hope somebody can help me, Thanks!

edit retag flag offensive close merge delete

Comments

so there's no camshift_drone_node in ~/catkin_ws/devel/lib/camshift_drone?

Po-Jen Lai gravatar image Po-Jen Lai  ( 2015-06-19 20:51:44 -0500 )edit

Does your new package have a package.xml ?

ahendrix gravatar image ahendrix  ( 2015-06-19 23:45:03 -0500 )edit

Both answers are yes

I dont know why, but I created a new test package, and these packages started building. Still, I dont know what was the problem.

erivera1802 gravatar image erivera1802  ( 2015-06-21 13:27:17 -0500 )edit

This is more guesswork, than expertise, but after comparing my packages CMakeLists.txt with yours I've noticed you call catkin_package() with no parameters... is it possible You've forgoten CATKIN_DEPENDS? Ex: catkin_package(CATKIN_DEPENDS roscpp)

Reiner gravatar image Reiner  ( 2015-06-24 03:55:28 -0500 )edit

@Reiner The arguments of catkin_package are only relevant for packages which use this package.

Dirk Thomas gravatar image Dirk Thomas  ( 2015-06-24 11:34:58 -0500 )edit
1

Please provide more information, e.g. the full output when you invoke catkin_make. May be also a link to the full package sources.

Dirk Thomas gravatar image Dirk Thomas  ( 2015-06-24 11:36:41 -0500 )edit