Ask Your Question
0

Errors importing old projects in eclipse

asked 2012-11-05 04:04:42 -0500

hisdudeness gravatar image

updated 2014-01-28 17:14:10 -0500

ngrennan gravatar image

Hi, I followed this wiki http://www.ros.org/wiki/IDEs to start using eclipse while developing my ros nodes. I started importing an old node I developed a couple of weeks ago but it seems that eclipse cannot resolve subscribe. Here's my code that fails:

  cmd_vel_sub_ = node_.subscribe <geometry_msgs::Twist>(sub_cmd_vel, 1, boost::bind(&RosListenNode::twist_pub, this, _1));

and here's the error I get:

Description Resource    Path    Location    Type
Invalid arguments '
Candidates are:
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(#0), #1 *, const ros::TransportHints &)
ros::Subscriber subscribe(ros::SubscribeOptions &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(#0)const, #1 *, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(const boost::shared_ptr<const #0> &), #1 *, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(const boost::shared_ptr<const #0> &)const, #1 *, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(#0), const boost::shared_ptr<#1> &, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(#0)const, const boost::shared_ptr<#1> &, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(const boost::shared_ptr<const #0> &), const boost::shared_ptr<#1> &, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (#1::*)(const boost::shared_ptr<const #0> &)const, const boost::shared_ptr<#1> &, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (*)(#0), const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, void (*)(const boost::shared_ptr<const #0> &), const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, const boost::function<void (const boost::shared_ptr<const #0> &)> &, const boost::shared_ptr<const void> &, const ros::TransportHints &)
ros::Subscriber subscribe(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int, const boost::function<void (#1)> &, const boost::shared_ptr<const void> &, const ros::TransportHints &)
'   bridge.cpp  /RosToPlatform-RelWithDebInfo@RosToPlatform/src line 134    Semantic Error

Any idea on how to solve this problem?

edit retag flag offensive close merge delete

Comments

A weird thing, if I remove the boost:bind call and substitute it with NULL I get no errors. So I thought it was a problem with boost but if I add

boost::bind(&RosListenNode::twist_pub, this, _1); it doesn't result as an error.It seems like eclipse is having problems with the templates

hisdudeness gravatar image hisdudeness  ( 2012-11-06 04:19:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-11-06 21:49:44 -0500

hisdudeness gravatar image

Problem solved! It was Eclipse Juno's fault. I downloaded Helios and it works just fine. I also tried Indigo but I get the same error.

edit flag offensive delete link more

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: 2012-11-05 04:04:42 -0500

Seen: 203 times

Last updated: Nov 06 '12