ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Problems with Int32MultiArrays

asked 2012-11-18 16:14:49 -0600

sgwhack gravatar image

updated 2017-03-04 08:24:25 -0600

130s gravatar image

Hi,

I'm wondering if anyone knows what these errors mean:

My code is really long to post, so I was wondering if there was something general that these are getting at that I can look out for in my code.

I'm trying to pass std_msgs::Int32MultiArray::ConstPtr& arrays from a subscribed topic into a function to pull out the data.

Any help on this would be greatly appreciated!!

Edit: I am running ROS electric on Ubuntu 11.10.

Full Error Message:

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:570:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, const boost::shared_ptr<U>&, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:618:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(M), const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:663:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:706:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const VoidConstPtr&, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:752:14: note: template<class M, class C> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(C)>&, const VoidConstPtr&, const ros::TransportHints&)
  /home/gregory/ros_workspace/socbot/src/mainProcessing.cpp:111:133: error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [17], int, void (mainProcessing::*)(const ConstPtr&), mainProcessing* const)’
  /home/gregory/ros_workspace/socbot/src/mainProcessing.cpp:111:133: note: candidates are:
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:379:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:390:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M)const, T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:438:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&), T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:448:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:498:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), const boost::shared_ptr<U>&, const ros::TransportHints&)
  /opt ...
(more)
edit retag flag offensive close merge delete

Comments

Please read the support page. At least post the complete error output. You left out the important parts. From what I can see, the problem could be related to a call to subscribe, but without all error messages and the corresponding code it's impossible to say more.

Lorenz gravatar image Lorenz  ( 2012-11-18 19:33:27 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2012-11-19 13:32:04 -0600

sgwhack gravatar image

updated 2017-03-04 08:22:28 -0600

130s gravatar image

Okay, I have no idea what I was doing, but I changed the lines:

redTrackSUB = mainHUB.subscribe<std_msgs::Int32MultiArray::ConstPtr>("redTrack", 30, &mainProcessing::setCurrPosRED,this);

to

redTrackSUB = mainHUB.subscribe<std_msgs::Int32MultiArray>("redTrack", 30, &mainProcessing::setCurrPosRED,this);

...and it seems to work better now.

If anyone has an explanation, please do so in the comments. Thanks!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-18 16:14:49 -0600

Seen: 727 times

Last updated: Mar 04 '17