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

actionlib and rqt

asked 2017-09-28 10:42:25 -0500

Fulin gravatar image

updated 2017-09-28 10:59:31 -0500

gvdhoorn gravatar image

Hello,

I'm learning ROS now and trying to create an action client in my rqt plugin.

No problem to catkin build the plugin. But when load the plugin, I got error as below:

undefined symbol: _ZN9actionlib17ConnectionMonitor21cancelConnectCallbackERKN3ros25SingleSubscriberPublisherE)

Unmangled:

actionlib::ConnectionMonitor::cancelConnectCallback(ros::SingleSubscriberPublisher const&)

My code is similar to the following. Is it a rqt bug, or is there anything wrong in my code?

Thank you for your help!

class MyPlugin : public rqt_gui_cpp::Plugin
    {
      Q_OBJECT
    public:
      MyPlugin();
      virtual void initPlugin(qt_gui_cpp::PluginContext& context);
      virtual void shutdownPlugin();
    private
      Ui::MyPluginWidget ui_;
      QWidget* widget_;
    actionlib::SimpleActionClient<my_msgs::MyAction> aClient;
    }

MyPlugin::MypPlugin()
: rqt_gui_cpp::Plugin()
, widget_(0)
, aClient("some action")
{
setObjectName("Plugin");
}
edit retag flag offensive close merge delete

Comments

I've added the unmangled version of the missing symbol to your question text.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-28 10:59:46 -0500 )edit

Hi Gvdhoom,

By the way, where should I use

actionlib::ConnectionMonitor::cancelConnectCallback(ros::SingleSubscriberPublisher const&)

in shutdownPlugin()?

Thank you!

Fulin gravatar image Fulin  ( 2017-09-29 02:13:27 -0500 )edit

That is a different issue, so I advise you to post that as a new question. We try to maintain a 1 question - 1 answer ratio here on ROS Answers.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-29 02:17:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-28 11:12:45 -0500

gvdhoorn gravatar image

Are you linking all required libraries? Can you show your CMakeLists.txt? The fact that CMake currently does not complain is expected: plugins don't need all symbols present at compile time, as it is assumed that at runtime those will be resolved by the plugin host.

edit flag offensive delete link more

Comments

Hi Gvdhoom,

You are right,

I missed the actionlib related depends in CMakeLists.txt and package.xml files. Might be the boost also? After adding them, now it works fine.

Thank you!

Fulin gravatar image Fulin  ( 2017-09-29 01:14:40 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-28 10:42:25 -0500

Seen: 319 times

Last updated: Sep 28 '17