cmake error catkin package
I am following the tutorials in order and have been asked to configure the catkin environment at stage 5 of this web page: link text
The error I am receiving is as follows (bold below):
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
## Generate messages in the 'msg' folder
add_message_files(
FILES
Num.msg
)
## Generate services in the 'srv' folder
add_service_files(
FILES
AddTwoInts.srv
)
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
...
CATKIN_DEPENDS message_runtime ...
...)
include_directories(
${catkin_INCLUDE_DIRS}
)
Everything above is copied exactly from the CMakeLists.txt file
this is the actual error, the rest is normal output.
Please edit your question and include the contents of your
CMakeLists.txt
. Please remove all comments from it, we don't need those.The sourcing is fine. You need to source both, ROS's setup script in
/opt/ros/kinetic
directory and your catkin ws as well.No, that is actually not necessary. By default,
source
-ing onesetup.bash
after another will actually make the secondsetup.bash
overwrite whatever the firstsetup.bash
configured. So sourcing your workspace after/opt/ros/$distro
does not work the way you imply.Don't you have to source all your own created packages for ROS to be able to find them?
no, you have to
source
your own workspaces. As you cannot compile your workspace withoutsource
-ing/opt/ros/$distro
, and doing that will result in/opt/ros/$distro
being extended by your workspace,source
-ing your workspace will automatically alsosource /opt/ros/$distro
(in a way).Oh, I didn't know that. Thanks for clarification.
Thanks for the directory sourcing comments. I know everything is okay there now!
I have added the CMakeLists.txt file and have deleted the other comments. However the action files comment is still in there. I'm not sure if this is the reason why there were unused arguments in the original problem.
Seeing as the error is actually in this bit, please copy-paste those lines from your
CMakeLists.txt
into your question verbatim. Don't leave anything out.