Hi I am a beginner with ROS, working through chapter 2 of the Learning ROS for Robotics Programming book (2nd ed).when i use catkin_make in my workspace i got errors.please help me.thank you.i use ROS indigo and ubunto 14.0.4.
terminal output.
mk@ubuntu:~/catkin_ws$ catkin_make
Base path: /home/mk/catkin_ws
Source space: /home/mk/catkin_ws/src
Build space: /home/mk/catkin_ws/build
Devel space: /home/mk/catkin_ws/devel
Install space: /home/mk/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/mk/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/mk/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/mk/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
-- BUILD_SHARED_LIBS is on
-
- traversing 9 packages in topological order:
-- ~~ - image_pipeline (metapackage)
-- ~~ - am_tutorial
-- ~~ - chapter2_tutorials
-- ~~ - camera_calibration
-- ~~ - image_proc
-- ~~ - image_view
-- ~~ - stereo_image_proc
-- ~~ - depth_image_proc
-- ~~ - image_rotate
-- +++ processing catkin metapackage: 'image_pipeline'
-- ==> add_subdirectory(image_pipeline-indigo/image_pipeline)
-- +++ processing catkin package: 'am_tutorial'
-- ==> add_subdirectory(am_tutorial)
-- +++ processing catkin package: 'chapter2_tutorials'
-- ==> add_subdirectory(chapter2_tutorials)
CMake Error: Error in cmake code at
/home/mk/catkin_ws/src/chapter2_tutorials/CMakeLists.txt:46:
Parse error. Expected "(", got identifier with text "messages".
-- +++ processing catkin package: 'camera_calibration'
-- ==> add_subdirectory(image_pipeline-indigo/camera_calibration)
-- +++ processing catkin package: 'image_proc'
-- ==> add_subdirectory(image_pipeline-indigo/image_proc)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- thread
-- +++ processing catkin package: 'image_view'
-- ==> add_subdirectory(image_pipeline-indigo/image_view)
-- Using these message generators: gencpp;genlisp;genpy
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- signals
-- thread
-- +++ processing catkin package: 'stereo_image_proc'
-- ==> add_subdirectory(image_pipeline-indigo/stereo_image_proc)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- thread
-- +++ processing catkin package: 'depth_image_proc'
-- ==> add_subdirectory(image_pipeline-indigo/depth_image_proc)
-- Using these message generators: gencpp;genlisp;genpy
-- Boost version: 1.54.0
-- Eigen found (include: /usr/include/eigen3)
-- +++ processing catkin package: 'image_rotate'
-- ==> add_subdirectory(image_pipeline-indigo/image_rotate)
-- Using these message generators: gencpp;genlisp;genpy
-- Eigen found (include: /usr/include/eigen3)
-- Configuring incomplete, errors occurred!
See also "/home/mk/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/mk/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1cmake_minimum_required(VERSION 2.8.3)
project(chapter2_tutorials)
Invoking "make cmake_check_build_system" failed
and my CMakelists:
cmake_minimum_required(VERSION 2.8.3)
project(chapter2_tutorials)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
message_generation
)
Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES chapter2_tutorials
CATKIN_DEPENDS roscpp std_msgs
DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_executable(chap2_example1_a src/example1_a.cpp)
add_executable(chap2_example1_b src/example1_b.cpp)
add_dependencies(chap2_example1_a chapter2_tutorials_generate_
messages_cpp)
add_dependencies(chap2_example1_b chapter2_tutorials_generate_
messages_cpp)
target_link_libraries(chap2_example1_a ${catkin_LIBRARIES})
target_link_libraries(chap2_example1_b ${catkin_LIBRARIES})