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

Nodelet is not recognized as a plugin

asked 2013-06-14 08:23:05 -0500

kaoao gravatar image

updated 2013-11-14 11:15:35 -0500

tfoote gravatar image

I tried to do the plugin tutorial, but rospack plugin --attrib didn't recognize my plugin. So I decided to move on to nodelets with plugins and I get the same problem. Here is my nodelet class:

#include <pluginlib/class_list_macros.h>
#include <nodelet/nodelet.h>
#include <ros/ros.h>

namespace nodeletnamespace {

    class mynodelet : public nodelet::Nodelet {
            virtual void onInit();

    void mynodelet::onInit() {
        ROS_INFO("[%s] initialized.", getName().c_str());

PLUGINLIB_EXPORT_CLASS(nodeletnamespace::mynodelet, nodelet::Nodelet)

Here is mynodelet.xml:

<library path="lib/libmynodelet">
    <class name="nodelet_test/mynodelet"
        base_class_type ="nodelet::Nodelet"
    <description>My Nodelet class </description>

Here is the package.xml

<?xml version="1.0"?>
  <description>The nodelet_test package</description>

  <maintainer email="">jt</maintainer>



    <nodelet plugin="${prefix}/mynodelet.xml" />

and here is the Cmakelists.txt:

cmake_minimum_required(VERSION 2.8.3)

find_package(catkin REQUIRED COMPONENTS nodelet roscpp)

   INCLUDE_DIRS include
   LIBRARIES nodelet_test
   CATKIN_DEPENDS nodelet roscpp
#  DEPENDS system_lib


add_library(lib_mynodelete src/mynodelet.cpp)

any help is appreciated!

Here is the error I get: rosrun nodelet nodelet standalone /nodelet_test/nodeletnamespace __name:=bro type is /nodelet_test/nodeletnamespace

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-06-26 16:59:27 -0500

bit-pirate gravatar image

updated 2013-06-26 17:03:29 -0500

First, please add the full error message and put it in the right formatting.

Here are a few things I noticed in your problem description:

Does your library build at all? I see the missing dependency on pluginlib.

I see a spelling mistake in your CMakeLists.txt: add_library(lib_mynodelete src/mynodelet.cpp)

Finally, please make sure that the below really points to your xml file.

  <nodelet plugin="${prefix}/mynodelet.xml" />

Hope this helps!

PS: This is the command, which lists all the available nodelet plugins:

rospack plugins --attrib=plugin nodelet

edit flag offensive delete link more

Question Tools


Asked: 2013-06-14 08:23:05 -0500

Seen: 2,266 times

Last updated: Jun 26 '13