Ask Your Question
0

ar_pose compilation issue on ros Indigo [closed]

asked 2015-04-23 08:36:10 -0600

Kassandra gravatar image

updated 2015-04-27 02:43:21 -0600

Procópio gravatar image

When I try to built ar_pose i get always the same error, also in the ar_multi.cpp.

CMakeFiles/ar_single.dir/src/ar_single.cpp.o: In Funktion `ar_pose::ARSinglePublisher::getTransformationCallback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)':
/home/benjamin/workspace_ck/src/ar_pose/src/ar_single.cpp:215: Nicht definierter Verweis auf `_IplImage::_IplImage(cv::Mat const&)'
collect2: error: ld returned 1 exit status

ar_single.cpp:

...
void ARSinglePublisher::getTransformationCallback (const sensor_msgs::ImageConstPtr & image_msg)
  {
    ARUint8 *dataPtr;
    ARMarkerInfo *marker_info;
    int marker_num;
    int i, k;

    /* Get the image from ROSTOPIC
     * NOTE: the dataPtr format is BGR because the ARToolKit library was
     * build with V4L, dataPtr format change according to the 
     * ARToolKit configure option (see config.h).*/
#if ROS_VERSION_MINIMUM(1, 9, 0)
    try
    {
      capture_ = cv_bridge::toCvCopy (image_msg, sensor_msgs::image_encodings::BGR8);
    }
    catch (cv_bridge::Exception& e)
    {
      ROS_ERROR("cv_bridge exception: %s", e.what());
    }

    //cvNamedWindow("MyWindow", CV_WINDOW_AUTOSIZE); // does opencv works? - yes


    //dataPtr = (ARUint8 *) ((IplImage) capture_->image).imageData;

    dataPtr = (ARUint8 *) ((IplImage) capture_->image).imageData;  //<- line 215
...

Hi thank you for your reply.

You're right, i had only ar_pose in my workspace. Now my workspace looks like src/ar_tools/ar_pose, artoolkit, artools and rosdep.yaml. Wenn i try to creat ar_tools, i still get the same error. Have tried all day.

This is what i get:

Linking CXX executable
/home/benjamin/workspace_ck/devel/lib/ar_pose/ar_single

Linking CXX executable
/home/benjamin/workspace_ck/devel/lib/ar_pose/ar_multi
CMakeFiles/ar_multi.dir/src/ar_multi.cpp.o:
In Funktion
ar_pose::ARMultiPublisher::getTransformationCallback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void>
> const> const&)': ar_multi.cpp:(.text+0x2244): Nicht
definierter Verweis
auf_IplImage::_IplImage(cv::Mat
const&)' collect2: error: ld returned
1 exit status make[2]: *
[/home/benjamin/workspace_ck/devel/lib/ar_pose/ar_multi]
Fehler 1

make[1]: *
[ar_tools/ar_pose/CMakeFiles/ar_multi.dir/all]
Fehler 2

make[1]: * Auf noch nicht beendete
Prozesse wird gewartet …

CMakeFiles/ar_single.dir/src/ar_single.cpp.o:
In Funktion
 ar_pose::ARSinglePublisher::getTransformationCallback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void>
> const> const&)': ar_single.cpp:(.text+0x2dac): Nicht
definierter Verweis
auf_IplImage::_IplImage(cv::Mat
const&)' collect2: error: ld returned
1 exit status make[2]: *
[/home/benjamin/workspace_ck/devel/lib/ar_pose/ar_single]
Fehler 1

make[1]: *
[ar_tools/ar_pose/CMakeFiles/ar_single.dir/all]
Fehler 2

make: * [all] Fehler 2 Invoking "make
-j2 -l2" failed

"Nicht definierter Verweis auf" means
"Undefined reference to"

I am grateful for any help!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Procópio
close date 2015-06-29 02:20:13.960678

Comments

I am not sure what is the error, I can compile without problems in indigo. I would suggest you to try cleaning your workspace (removing build and dev folders) and try again.

Procópio gravatar imageProcópio ( 2015-04-27 03:24:50 -0600 )edit

I'm experiencing the same problem. Could you fix that?

Leandro gravatar imageLeandro ( 2015-05-15 13:39:53 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-04-24 03:43:58 -0600

Procópio gravatar image

from your path (/home/benjamin/workspace_ck/src/ar_pose) I'm guessing that you only downloaded the ar_pose package and not the auxiliary ones. try checking out the whole ar_tools metapackage.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-04-23 08:34:36 -0600

Seen: 293 times

Last updated: Apr 27 '15