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

How to call tabletop_object_detector from my own node?

asked 2014-08-08 03:07:15 -0600

Haitham El-Hussieny gravatar image

Hi all, I am new in ROS. I need to call the tabletop_segmentation service from my client program in my ROS workspace. I call it from the terminal correctly. But when I add the service header file in my src, the following error appears after catkin_make:

"fatal error: tabletop_object_detector/TabletopSegmentation.h: No such file or directory" I know that the CMakeLists.txt and package.xml of my own package should be modified but I don't know how! I need the best practise to call the service from my client and get the position of the segmented objects.


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-08-11 05:09:55 -0600

Haitham El-Hussieny gravatar image

Thanks for your reply, Now it is running after do the following:

in my node code:

#include </opt/ros/groovy/stacks/pr2_object_manipulation/perception/tabletop_object_detector/srv_gen/cpp/include/tabletop_object_detector/TabletopSegmentation.h>

In the CMakeLists.txt:


edit flag offensive delete link more


dirty hack

BennyRe gravatar image BennyRe  ( 2014-08-11 06:57:57 -0600 )edit

Dirty but surely ;)

Haitham El-Hussieny gravatar image Haitham El-Hussieny  ( 2014-08-11 13:35:21 -0600 )edit

answered 2014-08-08 03:29:15 -0600

BennyRe gravatar image

updated 2014-08-11 01:55:55 -0600

Add tabletop_object_detector as build and run depend to your package.xml:


And in your CMakeLists.txt add it to find_package(catkin REQUIRED COMPONENTS ...


The tabletop_object_detector package is still using rosbuild. You are using catkin and unfortunately a catkin package can't depend on a rosbuild package.

Either you also use rosbuild or you port tabletop_object_detector to catkin.

edit flag offensive delete link more


Thanks for your reply But Now I have the following error after catkin_make: -- +++ processing catkin package: 'myTutorials' -- ==> add_subdirectory(myTutorials) CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package): Could not find a configuration file for package tabletop_object_detector.

Set tabletop_object_detector_DIR to the directory containing a CMake configuration file for tabletop_object_detector. The file will have one of the following names:


Call Stack (most recent call first): myTutorials/CMakeLists.txt:7 (find_package)

Haitham El-Hussieny gravatar image Haitham El-Hussieny  ( 2014-08-08 03:51:32 -0600 )edit

Do you have this package installed? Which ROS distro do you use?

BennyRe gravatar image BennyRe  ( 2014-08-08 04:14:36 -0600 )edit

Yes it is allready installed as I can call it from terminal:

roslaunch tabletop_object_detector tabletop_segmentation.launch

and also, can call the segmentation service from terminal as: rosservice call /tabletop_segmentation "table: {}"

and every things work fine. I am on ubuntu 12.04 32 bit, ROS groovy

Haitham El-Hussieny gravatar image Haitham El-Hussieny  ( 2014-08-08 04:34:09 -0600 )edit

Did you source the correct setup.bash in the terminal you run your node?

BennyRe gravatar image BennyRe  ( 2014-08-08 05:23:27 -0600 )edit

Yes. still the same error.

Haitham El-Hussieny gravatar image Haitham El-Hussieny  ( 2014-08-08 06:52:13 -0600 )edit

when I search for the tabletop_object_detector package, the path appears as follows. Is this matter ?

rospack find tabletop_object_detector


Haitham El-Hussieny gravatar image Haitham El-Hussieny  ( 2014-08-08 07:05:52 -0600 )edit

Question Tools


Asked: 2014-08-08 03:07:15 -0600

Seen: 165 times

Last updated: Aug 11 '14