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

[Solved] Nodelet does not seem to initialize correctly

asked 2018-08-02 16:09:29 -0500

chavi014 gravatar image

updated 2018-08-03 16:48:47 -0500

Hello, I'm trying to follow this tutorial on writing nodelets to run on the kobuki using ROS Kinetic and Ubuntu 16.04.4 LTS (Xenial Xerus), but I'm having issues with getting it to run. A nodelet seems to be created when running the launch file according to the rqt_graph, but it seems as though the initialization function is never called, therefore the node never subscribes or publishes to the necessary topics.

The code for nodelet.cpp, bump_blink_controller.hpp, nodelet_plugins.xml, and bump_blink_app.launch is identical to the linked tutorial, except for adding console output to the constructor and init methods of the nodelet (which were not displayed upon running).

Here is my CMakeLists.txt omitting the default comments from creating the package:

cmake_minimum_required(VERSION 2.8.3)

find_package(catkin REQUIRED COMPONENTS

#  INCLUDE_DIRS include
#  LIBRARIES kobuki_controller_tutorial
#  CATKIN_DEPENDS kobuki_msgs nodelet roscpp std_msgs yocs_controllers
#  DEPENDS system_lib



The package.xml (manifest?) file with comments removed:

<?xml version="1.0"?>
<package format="2">
  <description>The kobuki_controller_tutorial package</description>

  <maintainer email="user@todo.todo">turtlebot</maintainer>


  <build_depend>iostream</build_depend> #added only for additional debugging

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

Output from Launching the Nodelet (run alongside roslaunch kobuki_node minimal.launch) omitting info about the rosmaster and roslaunch server:

user@user:~/kobuki_ws$ roslaunch kobuki_controller_tutorial bump_blink_app.launch --screen

[ . . . ] 


 * /rosdistro: kinetic
 * /rosversion: 1.12.13

    bump_blink_controller (nodelet/nodelet)

[ . . . ]

process[bump_blink_controller-1]: started with pid [27818]
[ INFO] [1533240116.733278721]: Loading nodelet /bump_blink_controller of type kobuki_controller_tutorial/BumpBlinkControllerNodelet to manager mobile_base_nodelet_manager with the following remappings:
[ INFO] [1533240116.733416911]: /bump_blink_controller/commands/led1 -> /mobile_base/commands/led1
[ INFO] [1533240116.733471337]: /bump_blink_controller/events/bumper -> /mobile_base/events/bumper

Any help is appreciated as I'd like to use nodelets for other projects, and I can provide any additional information upon request. Hopefully the fix is simple though!

edit retag flag offensive close merge delete


I tried out (and got a properly named nodelet manager running) which looks to have followed the same tutorial, and it worked fine. Does that one work for you?

lucasw gravatar image lucasw  ( 2018-08-02 18:25:28 -0500 )edit

Hello @lucasw, I've downloaded he repo, ran catkin_make, and tried to launch the updated file only to get the same results. Here's an rqt_graph. Is it possible I'm building something incorrectly?

chavi014 gravatar image chavi014  ( 2018-08-03 13:37:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-03 16:46:37 -0500

chavi014 gravatar image

I fixed my problem. I forgot the nodelet needed to be activated via a message on a specific topic, so once I sent the message there everything worked out.

Also to note, rebuilding your nodelet and trying to re-launch it in the same manager only loads the old shared object -- you must restart the manager to see any changes.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-08-02 16:09:29 -0500

Seen: 871 times

Last updated: Aug 03 '18