Nodelet is not recognized as a plugin
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 {
public:
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"
type="nodeletnamespace::mynodelet">
<description>My Nodelet class </description>
</class>
</library>
Here is the package.xml
<?xml version="1.0"?>
<package>
<name>nodelet_test</name>
<version>0.0.0</version>
<description>The nodelet_test package</description>
<maintainer email="jzt0011@auburn.edu">jt</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>nodelet</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>nodelet</run_depend>
<export>
<nodelet plugin="${prefix}/mynodelet.xml" />
</export>
</package>
and here is the Cmakelists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(nodelet_test)
find_package(catkin REQUIRED COMPONENTS nodelet roscpp)
catkin_package(
INCLUDE_DIRS include
LIBRARIES nodelet_test
CATKIN_DEPENDS nodelet roscpp
# DEPENDS system_lib
)
include_directories(include
${catkin_INCLUDE_DIRS}
)
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