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

Hi , i want to install catkin_make , but i have an error , so i want to know could i change package.xml?

asked 2015-12-05 10:06:37 -0500

fatima gravatar image

updated 2015-12-05 12:53:10 -0500

its my error when i run catkin_make :

Base path: /home/fatima/catkin_ws1
Source space: /home/fatima/catkin_ws1/src
Build space: /home/fatima/catkin_ws1/build
Devel space: /home/fatima/catkin_ws1/devel
Install space: /home/fatima/catkin_ws1/install
####
#### Running command: "make cmake_check_build_system" in "/home/fatima/catkin_ws1/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/fatima/catkin_ws1/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/fatima/catkin_ws1/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.16
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner2_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner2_tutorials'
-- ==> add_subdirectory(beginner2_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
-- beginner2_tutorials: 1 messages, 1 services
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:217 (message):
  **catkin_package() DEPENDS on the catkin package 'message_runtime' which must
  therefore be listed as a run dependency in the package.xml**
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  beginner2_tutorials/CMakeLists.txt:13 (catkin_package)

-- Configuring incomplete, errors occurred!
See also "/home/fatima/catkin_ws1/build/CMakeFiles/CMakeOutput.log".
See also "/home/fatima/catkin_ws1/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

and this is my CMakeList.txt

cmake_minimum_required(VERSION 2.8.3)
project(beginner2_tutorials)

## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg message_generation)

## Declare ROS messages and services
add_message_files(FILES Num.msg )
add_service_files(FILES AddTwoInts.srv)

## Generate added messages and services
generate_messages(DEPENDENCIES std_msgs)
catkin_package( INCLUDE_DIRS include
 LIBRARIES ${beginner2_tutorials} CATKIN_DEPENDS message_runtime roscpp nodelet)

  ## DEPENDS eigen opencv )
## Declare a catkin package
##catkin_package(CATKIN_DEPENDS message_runtime std_msgs sensor_msgs)
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
  INCLUDE_DIRS include
  LIBRARIES beginner2_tutorials
  CATKIN_DEPENDS message_runtime roscpp rospy std_msgs
  DEPENDS system_lib
DEPENDS message_runtime
)
catkin_package()

## Build talker and listener
include_directories(include ${catkin_INCLUDE_DIRS})

add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner2_tutorials_generate_messages_cpp)

add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner2_tutorials_generate_messages_cpp)

ofcourse i change this line to solve this problem but it hasnt been solved :

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES beginner2_tutorials
  CATKIN_DEPENDS message_runtime roscpp rospy std_msgs
  DEPENDS system_lib
DEPENDS message_runtime
)

its package.xml content :

<package><name>beginner2_tutorials</name><version>0.0.0</version><description>The beginner2_tutorials package</description><!-- One maintainer tag required, multiple allowed, one person per tag 
--><!-- Example:  -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> 
--><maintainer email="fatima@todo.todo">fatima</maintainer><!-- One license tag required, multiple allowed, one license per tag 
--><!-- Commonly used license strings: -->
<!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 
--><license>TODO</license><!-- Url tags are optional, but mutiple are allowed, one per tag 
--><!-- Optional attribute type can be: website, bugtracker, or repository 
--><!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/beginner2_tutorials</url> 
--><!-- Author tags are optional, mutiple are allowed, one per tag 
--><!-- Authors do not have to be ...
(more)
edit retag flag offensive close merge delete

Comments

Hi , i want to install catkin_make but i couldnt because of an error, i want to know could i change package.xml or not and if not how could i fix this problem? please help

fatima gravatar image fatima  ( 2015-12-05 10:09:34 -0500 )edit

Please edit your question, adding your CMakeLists.txt and package.xml contents. The error says you are missing a dependency on message_runtime. Does that make sense?

joq gravatar image joq  ( 2015-12-05 11:17:13 -0500 )edit

thank you for reply , i edited my question as you told please help me

fatima gravatar image fatima  ( 2015-12-05 11:40:25 -0500 )edit

The error says that the message_runtime dependency is missing from your package.xml. Please list its contents, too.

joq gravatar image joq  ( 2015-12-05 12:06:41 -0500 )edit

If you are following a tutorial, please provide a link to it.

joq gravatar image joq  ( 2015-12-05 12:07:13 -0500 )edit

this that link :http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29

fatima gravatar image fatima  ( 2015-12-05 12:15:29 -0500 )edit

at first i wanted to run 11.Writing a Simple Publisher and Subscriber (C++) , i have done every thing but when i want to run catkin_make i had many errors i solved them but at last this error with message_runtime couldnt be solved

fatima gravatar image fatima  ( 2015-12-05 12:18:57 -0500 )edit

i think so , but i dont know how to change package.xml and add message_runtime?

fatima gravatar image fatima  ( 2015-12-05 12:56:59 -0500 )edit

4 Answers

Sort by » oldest newest most voted
5

answered 2015-12-05 12:55:45 -0500

Akif gravatar image

You should add message_runtime to your package.xml file as run dependency. Like;

<run_depend>message_runtime</run_depend>
edit flag offensive delete link more

Comments

That's what I suspected from the error message. But, apparently it's no longer part of that tutorial.

joq gravatar image joq  ( 2015-12-05 13:09:05 -0500 )edit

thank you so much Akif and joq i did <run_depend>message_runtime</run_depend>but now i have another problem with nodelet like previous problem.

fatima gravatar image fatima  ( 2015-12-05 13:34:03 -0500 )edit
1

You need to update your question so it lists exactly what you currently have in both those files, then paste in the exact error message.

joq gravatar image joq  ( 2015-12-05 13:45:01 -0500 )edit

ok , this is the new link for previous question : http://answers.ros.org/question/22202...

fatima gravatar image fatima  ( 2015-12-05 14:14:52 -0500 )edit

thank you for help

fatima gravatar image fatima  ( 2015-12-05 14:15:23 -0500 )edit
1

answered 2018-02-07 10:50:07 -0500

bhristov gravatar image

I had to add the following two lines to make it work in their respective sections of the package.xml file:

<build_depend>message_runtime</build_depend>
<exec_depend>message_runtime</exec_depend>

Also working on the same tutorial. Hope this helps!

edit flag offensive delete link more

Comments

The build depend should have been message_generation.

joq gravatar image joq  ( 2018-02-07 11:09:32 -0500 )edit
0

answered 2017-01-11 17:09:52 -0500

Erik4 gravatar image

I had the same problem and solved it with adding: <run_depend>message_generation</run_depend> in the package.xml-file.

There was only a <build_depend> of message_generation.

edit flag offensive delete link more
0

answered 2015-12-05 13:07:24 -0500

joq gravatar image

updated 2015-12-05 13:11:10 -0500

That tutorial appears to be somewhat mangled. No telling how it got that way. Maybe at one time it was also demonstrating how to define your own messages and not all of those parts were removed correctly.

As best I can tell, you should comment out all the message generation stuff in lines 5, 8, 9, and 12 of CMakeLists.txt and return line 15 to its original contents: catkin_package(). The catkin_package stuff you added is wrong; that's what was generating that bogus error message.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-05 10:06:37 -0500

Seen: 8,068 times

Last updated: Dec 05 '15