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

Simple client node error

asked 2012-04-30 00:04:04 -0600

Newbee gravatar image

updated 2017-04-22 03:48:45 -0600

NEngelhard gravatar image

Hello there, I have created rospackage "add" and client.cpp file. when I compile the cpp file header file "add/AddTwoInts.h" gives this error.No such file or directory,,, Do you have any idea for this error?

edit retag flag offensive close merge delete

Comments

Your makefile can't locate the AddTwoInts.h file. It's either not in your path or the make file's not quite right

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-30 01:43:23 -0600 )edit

Please copy and paste the error from the console, and relevant snippets of what files generated the problem. http://www.ros.org/wiki/Support

tfoote gravatar image tfoote  ( 2012-04-30 10:19:50 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
4

answered 2012-04-30 03:36:01 -0600

DimitriProsser gravatar image

If you're following the tutorials, I'm fairly certain that your client.cpp file is trying to subscribe to a topic of type AddTwoInts from the tutorials. If this is the case, it means that your package cannot find the necessary message description. In order to access this information, you must either re-define the message type in your package as per the tutorials, or add the beginner_tutorials package as a dependency in your package. Do this by adding the following to your manifest.xml:

<depend package="beginner_tutorials" />
edit flag offensive delete link more
2

answered 2012-04-30 04:56:15 -0600

Bence Magyar gravatar image

You might forgot to uncomment rosbuild_gensrv() in CMakeLists.txt so you don't have the generated service message type.

edit flag offensive delete link more
0

answered 2017-04-22 01:59:13 -0600

Gourav_Kumar gravatar image

Please check the package name is consistent everywhere, i.e. in header files and include directories because if you are following the ros tutorial : http://wiki.ros.org/ROS/Tutorials/Wri... then there is an inconsistency in there package name. It starts with making a "beginners_tutorial" package while in the example code it includes : #include "beginner_tutorials/AddTwoInts.h" which throws a make error on catkin_make.

edit flag offensive delete link more
0

answered 2012-04-30 23:20:39 -0600

Newbee gravatar image

updated 2012-05-01 00:09:14 -0600

ahendrix gravatar image

thanks guys for comment here is my console error of above client.cpp

/usr/bin/make all 
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
Re-run cmake no build system arguments
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
[rosbuild] Building package add
Failed to invoke /opt/ros/diamondback/ros/bin/rospack deps-manifests add
-- Configuring incomplete, errors occurred!
[rospack] package [add] depends on itself (/home/f/workspace/add/manifest.xml).
[rospack] self-dependency


CMake Error at /opt/ros/diamondback/ros/core/rosbuild/public.cmake:113 (message):


  Failed to invoke rospack to get compile flags for package 'add'.  Look
  above for errors from rospack itself.  Aborting.  Please fix the broken
  dependency!

Call Stack (most recent call first):
  /opt/ros/diamondback/ros/core/rosbuild/public.cmake:183 (rosbuild_invoke_rospack)
  CMakeLists.txt:12 (rosbuild_init)


make: *** [all] Error 1
edit flag offensive delete link more

Comments

Do you see the part where it says "-- Configuring incomplete, errors occurred! [rospack] package [add] depends on itself (/home/f/workspace/add/manifest.xml). [rospack] self-dependency"?

You have your package listed as a dependency in its manifest.xml, and that isn't allowed.

ahendrix gravatar image ahendrix  ( 2012-05-01 00:12:08 -0600 )edit

so how to fix this problem?

Newbee gravatar image Newbee  ( 2012-05-01 00:24:56 -0600 )edit

Remove the '<depend package="add" />' from your manifest.xml

ahendrix gravatar image ahendrix  ( 2012-05-01 08:39:47 -0600 )edit

there isn't '<depend package="add" />' line on my manifest.xml

Newbee gravatar image Newbee  ( 2012-05-01 16:00:54 -0600 )edit

Question Tools

Stats

Asked: 2012-04-30 00:04:04 -0600

Seen: 919 times

Last updated: Apr 22 '17