Ask Your Question
2

convert fuerte package to groovy

asked 2013-04-03 00:25:25 -0500

ZoltanS gravatar image

updated 2014-04-20 14:09:26 -0500

ngrennan gravatar image

Hi! I found a line-following package (https://github.com/robotictang/eddiebot_line_follower) that was originally made for fuerte, and I would like to use it groovy. The rosmake compilation generates errors probably due to the incompatibilities between groovy and fuerte. What can I do, is there any description or tutorial that helps to convert between the different ROS versions?

edit retag flag offensive close merge delete

Comments

I guess ROS Packages are not forward compatible.

freadx gravatar image freadx  ( 2013-04-03 01:00:50 -0500 )edit
1

I don't think that is quite a fair assertion. Most ROS packages work on multiple versions with no changes. I'm unsure exactly what error @ZoltanS is encountering, but looking into the new catkin build tools would be a good place to start. The eddiebot package doesn't even have a package.xml

jarvisschultz gravatar image jarvisschultz  ( 2013-04-03 01:39:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-03 05:07:18 -0500

In this case, the issue is that eddiebot_line_follower uses CvBridge.h, which was marked as deprecated in fuerte and removed in groovy.

To get the package to work in groovy, you'll need to update eddiebot_line_follower to work with the current cv_bridge API. The following changes get the code to compile on my machine (under groovy):

 40 //#include <cv_bridge/CvBridge.h>

103 cv::Mat imgMat = cv_bridge::toCvCopy(msg, "rgb8")->image;
104 IplImage* img = new IplImage(imgMat);

238 cv_bridge::CvImage tmpImg(std_msgs::Header(), "rgb8", cv::Mat(img));
239 sensor_msgs::ImagePtr out = tmpImg.toImageMsg();

NOTE: this trivial mod introduces a small memory leak (IplImage header). You should add the appropriate de-allocation call later to release the memory, if you intend to use this for anything other than testing purposes

edit flag offensive delete link more

Comments

Hi Jeremy, thanks it worked! Finally, it can be compiled.

ZoltanS gravatar image ZoltanS  ( 2013-04-05 08:49:41 -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: 2013-04-03 00:25:25 -0500

Seen: 484 times

Last updated: Apr 03 '13