A nodelet is blocking another nodelet
Hi, I have a package which contains 2 nodelets and I want to run these 2 nodelets in the same manager. The problem is, I can only run 1 nodelets at a time, when I run both of them only the one which get to run first is executed, the other one give me the following output:
[ INFO] [1634708917.097720708]: Loading nodelet /driver_nodelet of type driver_nodelet/Driver to manager nodelet_manager with the following remappings:
Seems like it is executed but it literally does nothing. Does this mean that the first one is blocking the second one from being loaded? And when I run both of them and terminate the manager, it also terminate the second-executed nodelet. Here is my packages files: plugins.xml:
<library path="lib/libdriver_nodelet">
<class name="driver_nodelet/Driver"
type="driver_nodelet::Driver"
base_class_type="nodelet::Nodelet">
<description>
Driver node
</description>
</class>
<class name="odometry/Odom"
type="odometry::Odom"
base_class_type="nodelet::Nodelet">
<description>
Odom node
</description>
</class>
</library>
my package.xml:
<?xml version="1.0"?>
<package format="2">
<name>driver_nodelet</name>
<version>0.0.0</version>
<description>The driver_nodelet package</description>
<maintainer email="sonpham@todo.todo">sonpham</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>nodelet</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>serial</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_export_depend>nodelet</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>serial</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>nodelet</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>serial</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>message_runtime</exec_depend>
<export>
<nodelet plugin="${prefix}/plugins.xml"/>
</export>
</package>
My CMakeLists.txt:
cmake_minimum_required(VERSION 3.0.2)
project(driver_nodelet)
find_package(catkin REQUIRED COMPONENTS
nodelet
roscpp
serial
std_msgs
message_generation
)
add_message_files(
FILES
channel_values.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES Driver_nodelet
CATKIN_DEPENDS nodelet roscpp serial std_msgs message_runtime
# DEPENDS system_lib
)
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
## Declare a C++ library
add_library(driver_nodelet
src/driver.cpp
)
add_library(odom
src/odom.cpp
)
target_link_libraries(driver_nodelet
${catkin_LIBRARIES}
)
target_link_libraries(odom
${catkin_LIBRARIES}
)