ar_pose compilation issue on ros Indigo [closed]
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!
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.
I'm experiencing the same problem. Could you fix that?