Ask Your Question
0

Error while loading nodelet [/velocity_multiplexer]

asked 2014-04-27 01:52:31 -0600

RB gravatar image

updated 2014-04-28 07:12:56 -0600

Hi, I am using ROS fuerte version on Ubuntu 10.04. I use the velocity multiplexer (sudo apt-get install ros-fuerte-yujin-ocs) designed by YujinRobot(http://wiki.ros.org/cmd_vel_mux). I modify the one header file and one cpp file in the installed package, to incorporate one more subsrciber (so that nodelet manager subcribes to amcl_pose topic).

I compile the code and it gets compiled perfectly.

root@ubuntu:/opt/ros/fuerte/stacks/yujin_ocs/cmd_vel_mux# make

But when I RUN following command:

roslaunch cmd_vel_mux standalone.launch

The errors can be found below::

http://pastebin.com/XnUkXRCZ

Some files that you may be interested are given below:::::

CMakeList.txthttp://pastebin.com/FfJaZF7v

nodelet_plugins.xmlhttp://pastebin.com/S1ZxgW9M

header filehttp://pastebin.com/PcuNaWYm

Source cpp filehttp://pastebin.com/gZUfqEu3

manifest.xmlhttp://pastebin.com/vS0w7Tiq

Question1:: why the error says "Make sure that you are calling the PLUGINLIB_REGISTER_CLASS macro in the library code, and that names are consistent between this macro and your XML."???

Question2:: why new function APPEARS to be UNDEFINED?? Even if it is included in Header File and there is no problem in compiling the new package.

Please HELP

NOTE In CMakeLists.txt ( http://pastebin.com/zCzZ7fG6 ), even if we link directories explicitly, still '.so' file can't figure it out where the cpp or header file

edit retag flag offensive close merge delete

Comments

Is the function that it can't find implemented with exactly the same name?

dornhege gravatar imagedornhege ( 2014-04-27 02:50:51 -0600 )edit

I have uploaded the 'source cpp file with highlighted portion.' There is no such mistakes, I think.

RB gravatar imageRB ( 2014-04-27 04:20:19 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-04-28 07:12:13 -0600

ahendrix gravatar image

You're implementing your new function in the global namespace, rather than within the class.

In you cpp file, you have a global function:

void currentPosCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)

But it should be namespaced to your class:

void CmdVelMux::currentPosCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
edit flag offensive delete link more

Comments

Yes, you are correct @ahendrix thank you once again............

RB gravatar imageRB ( 2014-04-28 07:24:43 -0600 )edit
0

answered 2014-04-28 04:49:18 -0600

joanpau gravatar image

You introduced a dependency on geometry_msgs(/PoseWithCovarianceStamped) that might not be declared in the package manifest file. The error message points out that the linker does not find the message definition (name is mangled):

undefined symbol: _ZN9CmdVelMux18currentPosCallbackERKN5boost10shared_ptrIKN13geometry_msgs26PoseWithCovarianceStamped_ISaIvEEEEE

edit flag offensive delete link more

Comments

Thanks for the answer, but the I have added the dependency in manifest.xml @joanpau

RB gravatar imageRB ( 2014-04-28 07:25:56 -0600 )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

1 follower

Stats

Asked: 2014-04-27 01:52:31 -0600

Seen: 617 times

Last updated: Apr 28 '14