Ask Your Question
0

How to call tabletop_object_detector from my own node?

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

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.

Regards,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

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

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:

include_directories(/opt/ros/groovy/stacks/pr2_object_manipulation/perception/tabletop_object_detector/srv_gen/cpp/include/

/opt/ros/groovy/stacks/pr2_object_manipulation/perception/tabletop_object_detector/msg_gen/cpp/include/)
edit flag offensive delete link more

Comments

dirty hack

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

Dirty but surely ;)

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

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

BennyRe gravatar image

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

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

<build_depend>tabletop_object_detector</build_depend>
<run_depend>tabletop_object_detector</run_depend>

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

Edit:

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

Comments

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:

tabletop_object_detectorConfig.cmake
tabletop_object_detector-config.cmake

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 -0500 )edit

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

BennyRe gravatar image BennyRe  ( 2014-08-08 04:14:36 -0500 )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 -0500 )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 -0500 )edit

Yes. still the same error.

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

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

rospack find tabletop_object_detector

/opt/ros/groovy/stacks/pr2_object_manipulation/perception/tabletop_object_detector

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 113 times

Last updated: Aug 11 '14