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

chavi014's profile - activity

2019-03-01 05:08:13 -0500 received badge  Famous Question (source)
2019-03-01 05:08:13 -0500 received badge  Notable Question (source)
2018-08-06 13:21:10 -0500 received badge  Popular Question (source)
2018-08-04 13:28:50 -0500 marked best answer [Solved] Nodelet does not seem to initialize correctly

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)
project(kobuki_controller_tutorial)

find_package(catkin REQUIRED COMPONENTS
  kobuki_msgs
  nodelet
  roscpp
  std_msgs
  yocs_controllers
)

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

include_directories(
  ${catkin_INCLUDE_DIRS}
  ./include/
)

add_library(bump_blink_controller_nodelet
  src/nodelet.cpp
)

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

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

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

  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>kobuki_msgs</build_depend>
  <build_depend>iostream</build_depend> #added only for additional debugging
  <build_depend>nodelet</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>yocs_controllers</build_depend>
  <build_export_depend>kobuki_msgs</build_export_depend>
  <build_export_depend>iostream</build_export_depend>
  <build_export_depend>nodelet</build_export_depend>
  <build_export_depend>roscpp</build_export_depend>
  <build_export_depend>std_msgs</build_export_depend>
  <build_export_depend>yocs_controllers</build_export_depend>
  <exec_depend>kobuki_msgs</exec_depend>
  <exec_depend>iostream</exec_depend>
  <exec_depend>nodelet</exec_depend>
  <exec_depend>roscpp</exec_depend>
  <exec_depend>std_msgs</exec_depend>
  <exec_depend>yocs_controllers</exec_depend>

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

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

[ . . . ] 

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES
  /
    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!

2018-08-03 16:48:47 -0500 edited question [Solved] Nodelet does not seem to initialize correctly

Nodelet does not seem to initialize correctly Hello, I'm trying to follow this tutorial on writing nodelets to run on th

2018-08-03 16:46:37 -0500 answered a question [Solved] Nodelet does not seem to initialize correctly

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

2018-08-03 13:37:19 -0500 commented question [Solved] Nodelet does not seem to initialize correctly

Hello @lucasw, I've downloaded he repo, ran catkin_make, and tried to launch the updated file only to get the same resul

2018-08-02 17:01:57 -0500 asked a question [Solved] Nodelet does not seem to initialize correctly

Nodelet does not seem to initialize correctly Hello, I'm trying to follow this tutorial on writing nodelets to run on th