Ask Your Question
0

Uknown CMake Command "catkin_package"

asked 2016-06-28 08:41:32 -0500

moisesm54 gravatar image

updated 2016-06-28 08:50:19 -0500

This CMakeLists.txt File

cmake_minimum_required(VERSION 2.8)
project(ardrone_tutorials)

find_package(catkin REQUIRED)
catkin_package()

install(PROGRAMS
src/drone_controller.py         
src/drone_status.py         
src/drone_video_display.py          
src/joystick_controller.py          
src/keyboard_controller.py
        DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )

install(DIRECTORY launch/  
DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)

Gives the results

rosmake starting...                   
[ rosmake ] Packages requested are:
['ardrone_tutorials']                 
[ rosmake ] Logging to directory
/home/ardrone/.ros/rosmake/rosmake_output-20160628-151821
[ rosmake ] Expanded args
['ardrone_tutorials'] to:
['ardrone_tutorials']       
[rosmake-0] Starting >>> roslang [
make ]                                
[rosmake-0] Finished <<< roslang  No
Makefile in package roslang           
[rosmake-0] Starting >>> roscpp [ make
]                                     
[rosmake-0] Finished <<< roscpp  No
Makefile in package roscpp            
[rosmake-0] Starting >>> geometry_msgs
[ make ]                              
[rosmake-0] Finished <<< geometry_msgs
No Makefile in package geometry_msgs  
[rosmake-0] Starting >>> sensor_msgs [
make ]                                
[rosmake-0] Finished <<< sensor_msgs 
No Makefile in package sensor_msgs    
[rosmake-0] Starting >>> rosbuild [
make ]                                
[rosmake-0] Finished <<< rosbuild  No
Makefile in package rosbuild          
[rosmake-0] Starting >>> roslib [ make
]                                     
[rosmake-0] Finished <<< roslib  No
Makefile in package roslib            
[rosmake-0] Starting >>> rosconsole [
make ]                                
[rosmake-0] Finished <<< rosconsole 
No Makefile in package rosconsole     
[rosmake-0] Starting >>> pluginlib [
make ]                                
[rosmake-0] Finished <<< pluginlib
ROS_NOBUILD in package pluginlib      
[rosmake-0] Starting >>>
message_filters [ make ]              
[rosmake-0] Finished <<<
message_filters  No Makefile in
package message_filters [rosmake-0]
Starting >>> image_transport [ make ] 
[rosmake-0] Finished <<<
image_transport ROS_NOBUILD in package
image_transport  [rosmake-0] Starting
>>> std_srvs [ make ]                                       [rosmake-0] Finished <<< std_srvs  No
Makefile in package std_srvs          
[rosmake-0] Starting >>> bullet [ make
]                                     
[rosmake-0] Finished <<< bullet
ROS_NOBUILD in package bullet         
[rosmake-0] Starting >>> angles [ make
]                                     
[rosmake-0] Finished <<< angles
ROS_NOBUILD in package angles         
[rosmake-0] Starting >>> rospy [ make
]                                     
[rosmake-0] Finished <<< rospy  No
Makefile in package rospy             
[rosmake-0] Starting >>> rostest [
make ]                                
[rosmake-0] Finished <<< rostest  No
Makefile in package rostest           
[rosmake-0] Starting >>> roswtf [ make
]                                     
[rosmake-0] Finished <<< roswtf  No
Makefile in package roswtf            
[rosmake-0] Starting >>> tf [ make ]  
[rosmake-0] Finished <<< tf
ROS_NOBUILD in package tf             
[rosmake-0] Starting >>>
common_rosdeps [ make ]               
[rosmake-0] Finished <<<
common_rosdeps ROS_NOBUILD in package
common_rosdeps    [rosmake-0] Starting
>>> camera_calibration_parsers [ make ]                     [rosmake-0]
Finished <<<
camera_calibration_parsers ROS_NOBUILD
in package camera_calibration_parsers
[rosmake-0] Starting >>>
camera_info_manager [ make ]          
[rosmake-0] Finished <<<
camera_info_manager ROS_NOBUILD in
package camera_info_manager
[rosmake-0] Starting >>>
ardrone_autonomy [ make ]             
[rosmake-0] Finished <<<
ardrone_autonomy [PASS] [ 4.55 seconds
]                [rosmake-0] Starting
>>> diagnostic_msgs [ make ]                                [rosmake-0] Finished <<<
diagnostic_msgs  No Makefile in
package diagnostic_msgs [rosmake-0]
Starting >>> std_msgs [ make ]        
[rosmake-0] Finished <<< std_msgs  No
Makefile in package std_msgs          
[rosmake-0] Starting >>>
diagnostic_updater [ make ]           
[rosmake-0] Finished <<<
diagnostic_updater ROS_NOBUILD in
package diagnostic_updater [rosmake-0]
Starting >>> rosbag [ make ]          
[rosmake-0] Finished <<< rosbag  No
Makefile in package rosbag            
[rosmake-0] Starting >>> joy [ make ] 
[rosmake-0] Finished <<< joy
ROS_NOBUILD in package joy            
[rosmake-0] Starting >>>
ardrone_tutorials [ make ]            
[ rosmake ] All 9
linesardrone_tutorials: 0.2 sec ]  [ 1
Active 26/27 Complete ]
{-------------------------------------------------------------------------------   mkdir -p bin   cd build && cmake -Wdev
-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..  
TODO: implement add_roslaunch_check()
in rostest-extras.cmake.   CMake Error
at CMakeLists.txt:5 (catkin_package):
    Unknown CMake command "catkin_package".

     -- Configuring incomplete, errors occurred!
-------------------------------------------------------------------------------} [ rosmake ] Output from build of
package ardrone_tutorials written to:
[ rosmake ]   
/home/ardrone/.ros/rosmake/rosmake_output-20160628-151821/ardrone_tutorials/build_output.log
[rosmake-0] Finished <<<
ardrone_tutorials [FAIL] [ 0.25
seconds ]               [ rosmake ]
Halting due to failure in package
ardrone_tutorials.  [ rosmake ]
Waiting for other threads to complete.
[ rosmake ] Results:                  
[ rosmake ] Built 27 packages with 1
failures.                             
[ rosmake ] Summary output to
directory                             
[ rosmake ]
/home/ardrone/.ros/rosmake/rosmake_output-20160628-151821

Any idea why the CMake Error happens? The find_package(catkin) was in the line before catkin_package(), so I don't know waht else is needed ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-28 08:52:03 -0500

updated 2016-06-28 08:54:59 -0500

It looks to me like you have a CMakeLists.txt file for the catkin build system, but you are trying to build the package using the command rosmake (from the old rosbuild system). That won't work. If you are on Fuerte and using rosmake, you'll need an old style manifest.xml (instead of package.xml) and CMakeLists.txt.

http://wiki.ros.org/rosbuild/CMakeLists

http://wiki.ros.org/rosbuild/Manifest

http://wiki.ros.org/rosbuild

edit flag offensive delete link more

Comments

1

Yes, you should not use catkin in Fuerte. Please see the first note on the catkin wiki page for Fuerte: http://wiki.ros.org/catkin?distro=fuerte

Dirk Thomas gravatar imageDirk Thomas ( 2016-06-28 09:11:19 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2016-06-28 08:41:32 -0500

Seen: 560 times

Last updated: Jun 28 '16