IMU failed to initialize

Error happens after sudo apt update and upgrade.

[ros2_control_node-2] [ERROR] [1759285189.386360786] [controller_manager]: Exception of type : St13runtime_error occurred while initializing hardware 'imu': Error in state! Internal state_handle is NULL.
[ros2_control_node-2] [WARN] [1759285189.386386405] [controller_manager]: Sensor hardware component 'imu' from plugin 'rosbot_hardware_interfaces/RosbotImuSensor' failed to initialize.

Confirmed that workspace was working prior to update/upgrade. Also updated repo, error persists. Confirmed that IMU is working outside of ROS2 by running minicom -D /dev/ttyUSB0 -b 115200.

Full log:

husarion@my-ROSbotXL:~/rosbot_ws_jazzy$ ros2 launch rosbot_bringup bringup.launch.py robot_model:=rosbot_xl
[INFO] [launch]: All log files can be found below /home/husarion/.ros/log/2025-10-01-11-49-48-806105-my-ROSbotXL-138167
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [138171]
[INFO] [ros2_control_node-2]: process started with pid [138172]
[INFO] [micro_ros_agent-3]: process started with pid [138173]
[INFO] [ekf_node-4]: process started with pid [138174]
[INFO] [scan_to_scan_filter_chain-5]: process started with pid [138175]
[INFO] [joy_node-6]: process started with pid [138176]
[INFO] [teleop_node-7]: process started with pid [138177]
[micro_ros_agent-3] [1759285189.270551] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[micro_ros_agent-3] [1759285189.270734] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[teleop_node-7] [INFO] [1759285189.300711617] [TeleopTwistJoy]: Teleop enable button 4.
[teleop_node-7] [INFO] [1759285189.300766175] [TeleopTwistJoy]: Turbo on button 5.
[teleop_node-7] [INFO] [1759285189.300773447] [TeleopTwistJoy]: Linear axis x on 1 at scale 0.700000.
[teleop_node-7] [INFO] [1759285189.300781999] [TeleopTwistJoy]: Turbo for linear axis x is scale 1.500000.
[teleop_node-7] [INFO] [1759285189.300787070] [TeleopTwistJoy]: Linear axis y on 0 at scale 0.700000.
[teleop_node-7] [INFO] [1759285189.300791246] [TeleopTwistJoy]: Turbo for linear axis y is scale 1.500000.
[teleop_node-7] [INFO] [1759285189.300795425] [TeleopTwistJoy]: Angular axis yaw on 3 at scale 1.000000.
[teleop_node-7] [INFO] [1759285189.300799657] [TeleopTwistJoy]: Turbo for angular axis yaw is scale 1.500000.
[scan_to_scan_filter_chain-5] [WARN] [1759285189.337086001] [rcl.logging_rosout]: Publisher already registered for node name: 'laser_filter'. If this is due to multiple nodes with the same name then all logs for the logger named 'laser_filter' will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[robot_state_publisher-1] [INFO] [1759285189.345767287] [robot_state_publisher]: Robot initialized
[ros2_control_node-2] [INFO] [1759285189.354817379] [controller_manager]: Using Steady (Monotonic) clock for triggering controller manager cycles.
[ros2_control_node-2] [INFO] [1759285189.363366182] [controller_manager]: Subscribing to '/robot_description' topic for robot description.
[ros2_control_node-2] [INFO] [1759285189.381197781] [controller_manager]: update rate is 100 Hz
[ros2_control_node-2] [INFO] [1759285189.381246872] [controller_manager]: Spawning controller_manager RT thread with scheduler priority: 50
[ros2_control_node-2] [WARN] [1759285189.381358438] [controller_manager]: Could not enable FIFO RT scheduling policy: with error number <1>(Operation not permitted). See [https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html] for details on how to enable realtime scheduling.
[ros2_control_node-2] [INFO] [1759285189.381665244] [controller_manager]: Received robot description from topic.
[ros2_control_node-2] [INFO] [1759285189.384019598] [controller_manager]: Loading hardware 'imu' 
[ros2_control_node-2] [INFO] [1759285189.386286603] [controller_manager]: Loaded hardware 'imu' from plugin 'rosbot_hardware_interfaces/RosbotImuSensor'
[ros2_control_node-2] [INFO] [1759285189.386336080] [controller_manager]: Initialize hardware 'imu' 
[ros2_control_node-2] [ERROR] [1759285189.386360786] [controller_manager]: Exception of type : St13runtime_error occurred while initializing hardware 'imu': Error in state! Internal state_handle is NULL.
[ros2_control_node-2] [WARN] [1759285189.386386405] [controller_manager]: Sensor hardware component 'imu' from plugin 'rosbot_hardware_interfaces/RosbotImuSensor' failed to initialize.
[ros2_control_node-2] [WARN] [1759285189.386549160] [controller_manager]: Could not load and initialize hardware. Please check previous output for more details. After you have corrected your URDF, try to publish robot description again.
[micro_ros_agent-3] [1759285189.677631] info     | Root.cpp           | create_client            | create                 | client_key: 0x49CF140C, session_id: 0x81
[micro_ros_agent-3] [1759285189.677702] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x49CF140C, address: 192.168.77.3:47138
[micro_ros_agent-3] [1759285189.679726] warning  | FastDDSMiddleware.cpp | create_participant_by_bin | Overriding Micro XRCE-DDS Client DOMAIN_ID | domain_id: 0
[micro_ros_agent-3] [1759285189.700737] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x49CF140C, participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.710129] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x49CF140C, topic_id: 0x000(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.712679] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x49CF140C, subscriber_id: 0x000(4), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.715574] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x49CF140C, datareader_id: 0x000(6), subscriber_id: 0x000(4)
[micro_ros_agent-3] [1759285189.719126] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x49CF140C, topic_id: 0x001(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.720463] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x49CF140C, publisher_id: 0x000(3), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.723858] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x49CF140C, datawriter_id: 0x000(5), publisher_id: 0x000(3)
[micro_ros_agent-3] [1759285189.726075] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x49CF140C, topic_id: 0x002(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.729036] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x49CF140C, publisher_id: 0x001(3), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.733571] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x49CF140C, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[micro_ros_agent-3] [1759285189.735656] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x49CF140C, topic_id: 0x003(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.739113] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x49CF140C, publisher_id: 0x002(3), participant_id: 0x000(1)
[micro_ros_agent-3] [1759285189.741202] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x49CF140C, datawriter_id: 0x002(5), publisher_id: 0x002(3)
[micro_ros_agent-3] [1759285189.746435] info     | ProxyClient.cpp    | create_replier           | replier created        | client_key: 0x49CF140C, requester_id: 0x000(7), participant_id: 0x000(1)
[scan_to_scan_filter_chain-5] [WARN] [1759285190.332634667] [laser_filter]: diagnostic_updater: No HW_ID was set. This is probably a bug. Please report it. For devices that do not have a HW_ID, set this value to 'none'. This warning only occurs once all diagnostics are OK. It is okay to wait until the device is open before calling setHardwareID.
[ros2_control_node-2] [WARN] [1759285190.362539105] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285191.362489951] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[INFO] [spawner-8]: process started with pid [138432]
[INFO] [spawner-9]: process started with pid [138433]
[INFO] [spawner-10]: process started with pid [138434]
[ros2_control_node-2] [WARN] [1759285192.362458875] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[spawner-9] [INFO] [1759285192.629365352] [spawner_imu_broadcaster]: waiting for service /controller_manager/list_controllers to become available...
[ros2_control_node-2] [WARN] [1759285193.362479857] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285194.362489287] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285195.362467901] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285196.362479766] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285197.362500587] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285198.362484523] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285199.362478830] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285200.362481839] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285201.362506735] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285202.362528969] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285203.362466311] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285204.365023510] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285205.362459903] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285206.362512310] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285207.362493208] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285208.362489390] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285209.362494716] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285210.362493145] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285211.362490913] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[ros2_control_node-2] [WARN] [1759285212.362484441] [controller_manager]: Waiting for data on 'robot_description' topic to finish initialization
[spawner-9] [FATAL] [1759285212.647340537] [spawner_imu_broadcaster]: Could not contact service /controller_manager/list_controllers
Fatal error: b'[FATAL] [1759285212.647340537] [spawner_imu_broadcaster]: Could not contact service /controller_manager/list_controllers\n'. Emitting shutdown...
[INFO] [spawner-10]: sending signal 'SIGINT' to process[spawner-10]
[INFO] [spawner-9]: sending signal 'SIGINT' to process[spawner-9]
[INFO] [spawner-8]: sending signal 'SIGINT' to process[spawner-8]
[INFO] [teleop_node-7]: sending signal 'SIGINT' to process[teleop_node-7]
[INFO] [joy_node-6]: sending signal 'SIGINT' to process[joy_node-6]
[INFO] [scan_to_scan_filter_chain-5]: sending signal 'SIGINT' to process[scan_to_scan_filter_chain-5]
[INFO] [ekf_node-4]: sending signal 'SIGINT' to process[ekf_node-4]
[INFO] [micro_ros_agent-3]: sending signal 'SIGINT' to process[micro_ros_agent-3]
[INFO] [ros2_control_node-2]: sending signal 'SIGINT' to process[ros2_control_node-2]
[INFO] [robot_state_publisher-1]: sending signal 'SIGINT' to process[robot_state_publisher-1]
[spawner-9] Traceback (most recent call last):
[spawner-9]   File "/opt/ros/jazzy/lib/controller_manager/spawner", line 33, in <module>
[spawner-9]     sys.exit(load_entry_point('controller-manager==4.37.0', 'console_scripts', 'spawner')())
[spawner-9]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[spawner-9]   File "/opt/ros/jazzy/lib/python3.12/site-packages/controller_manager/spawner.py", line 404, in main
[spawner-9]     node.destroy_node()
[spawner-9]   File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/node.py", line 1965, in destroy_node
[spawner-9]     self.__node.destroy_when_not_in_use()
[spawner-9] KeyboardInterrupt
[teleop_node-7] [INFO] [1759285212.667795440] [rclcpp]: signal_handler(signum=2)
[joy_node-6] [INFO] [1759285212.672144225] [rclcpp]: signal_handler(signum=2)
[scan_to_scan_filter_chain-5] [INFO] [1759285212.673638693] [rclcpp]: signal_handler(signum=2)
[ekf_node-4] [INFO] [1759285212.677923424] [rclcpp]: signal_handler(signum=2)
[spawner-8] [INFO] [1759285212.696659868] [ros2_control_controller_spawner_joint_state_broadcaster]: KeyboardInterrupt received! Exiting....
[robot_state_publisher-1] [INFO] [1759285212.703541796] [rclcpp]: signal_handler(signum=2)
[ros2_control_node-2] [INFO] [1759285212.708834840] [rclcpp]: signal_handler(signum=2)
[ros2_control_node-2] [INFO] [1759285212.709182035] [controller_manager]: Shutdown request received....
[ros2_control_node-2] [INFO] [1759285212.709413641] [controller_manager]: Shutting down all controllers in the controller manager.
[ros2_control_node-2] [INFO] [1759285212.709461186] [controller_manager]: Shutting down the controller manager.
[ERROR] [micro_ros_agent-3]: process has died [pid 138173, exit code -2, cmd '/home/husarion/rosbot_ws_jazzy2/install/micro_ros_agent/lib/micro_ros_agent/micro_ros_agent udp4 --port 8888 --ros-args -r __ns:=/ -p use_sim_time:=False -r /diagnostics:=diagnostics -r /tf:=tf -r /tf_static:=tf_static -r /tf:=tf -r /tf_static:=tf_static'].
[ros2_control_node-2] [ERROR] [1759285212.709834133] [controller_manager.pal_statistics]: Exception in publisher thread: context cannot be slept with because it's invalid!. Aborting!
[ros2_control_node-2] Failed to publish log message to rosout: publisher's context is invalid, at ./src/rcl/publisher.c:423
[ros2_control_node-2] [ERROR] [1759285212.710203384] [controller_manager.pal_statistics]: Exception in publisher thread: context cannot be slept with because it's invalid!. Aborting!
[ros2_control_node-2] Failed to publish log message to rosout: publisher's context is invalid, at ./src/rcl/publisher.c:423
[spawner-10] [INFO] [1759285212.717767928] [ros2_control_controller_spawner_rosbot_base_controller]: KeyboardInterrupt received! Exiting....
[ros2_control_node-2] [INFO] [1759285212.727316251] [controller_manager.pal_statistics]: Async messages lost 0
[ros2_control_node-2] [INFO] [1759285212.727347087] [controller_manager.pal_statistics]: publish_async_failures_ 0
[ros2_control_node-2] [INFO] [1759285212.732230901] [controller_manager.pal_statistics]: Async messages lost 0
[ros2_control_node-2] [INFO] [1759285212.732258732] [controller_manager.pal_statistics]: publish_async_failures_ 0
[ERROR] [spawner-9]: process has died [pid 138433, exit code -2, cmd '/opt/ros/jazzy/lib/controller_manager/spawner imu_broadcaster -c controller_manager --controller-manager-timeout 20 --ros-args -r __ns:=/ -p use_sim_time:=False -r /diagnostics:=diagnostics -r /tf:=tf -r /tf_static:=tf_static -r /tf:=tf -r /tf_static:=tf_static'].
[INFO] [spawner-8]: process has finished cleanly [pid 138432]
[INFO] [spawner-10]: process has finished cleanly [pid 138434]
[INFO] [teleop_node-7]: process has finished cleanly [pid 138177]
[INFO] [joy_node-6]: process has finished cleanly [pid 138176]
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 138171]
[INFO] [ros2_control_node-2]: process has finished cleanly [pid 138172]
[INFO] [ekf_node-4]: process has finished cleanly [pid 138174]
[INFO] [scan_to_scan_filter_chain-5]: process has finished cleanly [pid 138175]
husarion@my-ROSbotXL:~/rosbot_ws_jazzy$ 

Hello,

I am intrigued by your issue. I assume it’s an error with packages that have either been badly installed (corrupted) or are not compatible between them. The system32 error means the error is at runtime, so you wouldn’t have any error at compilation time.

Maybe some ros distro are updated/upgraded, but not all and your IMU package is referring to an older .so version before the update?

Take my advice with a bit of salt, as I am no expert. I would recommend doing a clean install of the ROS packages again (not ROS itself, mind you).
I assume the issue is in the paths ROS is using to get the correct package. And when that happens for me, I erase the build, install etc and redo a clean colcon build.
But to be safe i would re-install the rosbot from source as well (or whatever you did to install it)

Using upgrade in complex settings can lead to issues sometimes.

Basically : Clean your system as much as you can, then redo the update, then redo the installation and colcon build.

Best!

I’m also wondering if there are other devices on the LAN, for example, with different DDS configurations. You can check if the error persists by disabling other devices from ros2 or setting ‘export ROS_AUTOMATIC_DISCOVERY_RANGE=OFF’ if you’re using jazzy.
As @daria mentioned, it’s worth updating and rebuilding the workspace (thank you @daria).

Hi @RafalGorecki and @daria

I have started from scratch, cleaned workspaces, env variables, paths, etc.

I redid the installation, colcon build. I’m no longer getting that error but I’m getting another one which confuses me.

If I run using bringup.launch, I’m getting an error with the spawner_imu_broadcaster although the system indicates it’s up and running. I confirmed with ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/ -p stamped:=true; although, the behaviour of the motors is a bit weird. I notice a significant delay in the motor’s reaction from my input and it stops after a while from a continuous input (interruptively). Very weird.

husarion@my-ROSbotXL:~/rosbot_ws$ ros2 launch rosbot_bringup bringup.launch.py robot_model:=rosbot_xl
[INFO] [launch]: All log files can be found below /home/husarion/.ros/log/2025-10-15-11-14-04-771061-my-ROSbotXL-164636
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [164651]
[INFO] [ros2_control_node-2]: process started with pid [164652]
[INFO] [micro_ros_agent-3]: process started with pid [164653]
[INFO] [ekf_node-4]: process started with pid [164654]
[INFO] [scan_to_scan_filter_chain-5]: process started with pid [164655]
[INFO] [joy_node-6]: process started with pid [164656]
[INFO] [teleop_node-7]: process started with pid [164657]
[micro_ros_agent-3] [1760489045.224411] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[micro_ros_agent-3] [1760489045.225214] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[teleop_node-7] [INFO] [1760489045.257380278] [TeleopTwistJoy]: Teleop enable button 4.
[teleop_node-7] [INFO] [1760489045.257422884] [TeleopTwistJoy]: Turbo on button 5.
[teleop_node-7] [INFO] [1760489045.257426490] [TeleopTwistJoy]: Linear axis x on 1 at scale 0.700000.
[teleop_node-7] [INFO] [1760489045.257432911] [TeleopTwistJoy]: Turbo for linear axis x is scale 1.500000.
[teleop_node-7] [INFO] [1760489045.257435852] [TeleopTwistJoy]: Linear axis y on 0 at scale 0.700000.
[teleop_node-7] [INFO] [1760489045.257438577] [TeleopTwistJoy]: Turbo for linear axis y is scale 1.500000.
[teleop_node-7] [INFO] [1760489045.257441172] [TeleopTwistJoy]: Angular axis yaw on 3 at scale 1.000000.
[teleop_node-7] [INFO] [1760489045.257443629] [TeleopTwistJoy]: Turbo for angular axis yaw is scale 1.500000.
[ros2_control_node-2] [INFO] [1760489045.313256324] [controller_manager]: Using Steady (Monotonic) clock for triggering controller manager cycles.
[robot_state_publisher-1] [INFO] [1760489045.313405559] [robot_state_publisher]: Robot initialized
[ros2_control_node-2] [INFO] [1760489045.320387322] [controller_manager]: Subscribing to '/robot_description' topic for robot description.
[scan_to_scan_filter_chain-5] [WARN] [1760489045.324666127] [rcl.logging_rosout]: Publisher already registered for node name: 'laser_filter'. If this is due to multiple nodes with the same name then all logs for the logger named 'laser_filter' will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[ros2_control_node-2] [INFO] [1760489045.335008757] [controller_manager]: update rate is 100 Hz
[ros2_control_node-2] [INFO] [1760489045.335056355] [controller_manager]: Spawning controller_manager RT thread with scheduler priority: 50
[ros2_control_node-2] [WARN] [1760489045.335207941] [controller_manager]: Could not enable FIFO RT scheduling policy: with error number <1>(Operation not permitted). See [https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html] for details on how to enable realtime scheduling.
[ros2_control_node-2] [INFO] [1760489045.335867653] [controller_manager]: Received robot description from topic.
[ros2_control_node-2] [INFO] [1760489045.339468365] [controller_manager]: Loading hardware 'imu' 
[ros2_control_node-2] [INFO] [1760489045.341974860] [controller_manager]: Loaded hardware 'imu' from plugin 'rosbot_hardware_interfaces/RosbotImuSensor'
[ros2_control_node-2] [INFO] [1760489045.342067302] [controller_manager]: Initialize hardware 'imu' 
[ros2_control_node-2] [INFO] [1760489045.350212886] [RosbotImuSensor]: Initializing
[ros2_control_node-2] [INFO] [1760489045.360639800] [controller_manager]: Successful initialization of hardware 'imu'
[ros2_control_node-2] [INFO] [1760489045.360818460] [controller_manager]: Loading hardware 'rosbot_system' 
[ros2_control_node-2] [INFO] [1760489045.361065725] [controller_manager]: Loaded hardware 'rosbot_system' from plugin 'rosbot_hardware_interfaces/RosbotSystem'
[ros2_control_node-2] [INFO] [1760489045.361103474] [controller_manager]: Initialize hardware 'rosbot_system' 
[ros2_control_node-2] [INFO] [1760489045.374293985] [RosbotSystem]: Initializing
[ros2_control_node-2] [INFO] [1760489045.374375465] [RosbotSystem]: Joint 'fl_wheel_joint' found
[ros2_control_node-2] [INFO] [1760489045.374405776] [RosbotSystem]: Joint 'fr_wheel_joint' found
[ros2_control_node-2] [INFO] [1760489045.374408711] [RosbotSystem]: Joint 'rl_wheel_joint' found
[ros2_control_node-2] [INFO] [1760489045.374411292] [RosbotSystem]: Joint 'rr_wheel_joint' found
[ros2_control_node-2] [INFO] [1760489045.387263940] [controller_manager]: Successful initialization of hardware 'rosbot_system'
[ros2_control_node-2] [INFO] [1760489045.387479437] [resource_manager]: 'configure' hardware 'rosbot_system' 
[ros2_control_node-2] [INFO] [1760489045.387487647] [RosbotSystem]: Configuring
[ros2_control_node-2] [INFO] [1760489045.387491552] [resource_manager]: Successful 'configure' of hardware 'rosbot_system'
[ros2_control_node-2] [INFO] [1760489045.387496051] [resource_manager]: 'activate' hardware 'rosbot_system' 
[ros2_control_node-2] [INFO] [1760489045.387499760] [RosbotSystem]: Activating
[ros2_control_node-2] [WARN] [1760489045.393151617] [RosbotSystem]: Feedback message from motors wasn't received yet
[scan_to_scan_filter_chain-5] [WARN] [1760489046.320163916] [laser_filter]: diagnostic_updater: No HW_ID was set. This is probably a bug. Please report it. For devices that do not have a HW_ID, set this value to 'none'. This warning only occurs once all diagnostics are OK. It is okay to wait until the device is open before calling setHardwareID.
[ros2_control_node-2] [WARN] [1760489046.393278408] [RosbotSystem]: Feedback message from motors wasn't received yet
[ros2_control_node-2] [WARN] [1760489047.393380355] [RosbotSystem]: Feedback message from motors wasn't received yet
[INFO] [spawner-8]: process started with pid [164856]
[INFO] [spawner-9]: process started with pid [164857]
[INFO] [spawner-10]: process started with pid [164858]
[ros2_control_node-2] [WARN] [1760489048.393491282] [RosbotSystem]: Feedback message from motors wasn't received yet
[spawner-10] [INFO] [1760489048.568462172] [spawner_drive_controller]: waiting for service /controller_manager/list_controllers to become available...
[micro_ros_agent-3] [1760489048.957373] info     | Root.cpp           | create_client            | create                 | client_key: 0x0597EB19, session_id: 0x81
[micro_ros_agent-3] [1760489048.957426] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x0597EB19, address: 192.168.77.3:47138
[micro_ros_agent-3] [1760489048.959454] warning  | FastDDSMiddleware.cpp | create_participant_by_bin | Overriding Micro XRCE-DDS Client DOMAIN_ID | domain_id: 0
[micro_ros_agent-3] [1760489048.987377] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x0597EB19, participant_id: 0x000(1)
[micro_ros_agent-3] [1760489048.991215] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x0597EB19, topic_id: 0x000(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489048.992574] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x0597EB19, subscriber_id: 0x000(4), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489048.995897] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x0597EB19, datareader_id: 0x000(6), subscriber_id: 0x000(4)
[micro_ros_agent-3] [1760489049.000862] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x0597EB19, topic_id: 0x001(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489049.236443] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x0597EB19, publisher_id: 0x000(3), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489049.248438] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x0597EB19, datawriter_id: 0x000(5), publisher_id: 0x000(3)
[micro_ros_agent-3] [1760489049.252027] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x0597EB19, topic_id: 0x002(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489049.255460] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x0597EB19, publisher_id: 0x001(3), participant_id: 0x000(1)
[spawner-10] [WARN] [1760489049.320532851] [spawner_drive_controller]: Controller already loaded, skipping load_controller
[spawner-10] [ERROR] [1760489049.326433565] [spawner_drive_controller]: Failed to configure controller
[ros2_control_node-2] [WARN] [1760489049.393603298] [RosbotSystem]: Feedback message from motors wasn't received yet
[spawner-9] [INFO] [1760489049.479447519] [spawner_imu_broadcaster]: waiting for service /controller_manager/list_controllers to become available...
[ERROR] [spawner-10]: process has died [pid 164858, exit code 1, cmd '/opt/ros/jazzy/lib/controller_manager/spawner drive_controller -c controller_manager --controller-manager-timeout 20 --ros-args -r __ns:=/ -p use_sim_time:=False -r /diagnostics:=diagnostics -r /tf:=tf -r /tf_static:=tf_static -r /tf:=tf -r /tf_static:=tf_static'].
[micro_ros_agent-3] [1760489049.630795] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x0597EB19, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[micro_ros_agent-3] [1760489049.632400] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x0597EB19, topic_id: 0x003(2), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489049.635478] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x0597EB19, publisher_id: 0x002(3), participant_id: 0x000(1)
[micro_ros_agent-3] [1760489049.644729] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x0597EB19, datawriter_id: 0x002(5), publisher_id: 0x002(3)
[micro_ros_agent-3] [1760489049.653493] info     | ProxyClient.cpp    | create_replier           | replier created        | client_key: 0x0597EB19, requester_id: 0x000(7), participant_id: 0x000(1)
[ros2_control_node-2] [WARN] [1760489050.393762504] [RosbotSystem]: Feedback message from motors wasn't received yet
[ros2_control_node-2] [WARN] [1760489051.393880296] [RosbotSystem]: Feedback message from motors wasn't received yet
[ros2_control_node-2] [WARN] [1760489052.394010355] [RosbotSystem]: Feedback message from motors wasn't received yet
[ros2_control_node-2] [INFO] [1760489052.394089870] [resource_manager]: Successful 'activate' of hardware 'rosbot_system'
[ros2_control_node-2] [INFO] [1760489052.394323697] [resource_manager]: 'configure' hardware 'imu' 
[ros2_control_node-2] [INFO] [1760489052.394342388] [RosbotImuSensor]: Configuring
[ros2_control_node-2] [INFO] [1760489052.394353748] [resource_manager]: Successful 'configure' of hardware 'imu'
[ros2_control_node-2] [INFO] [1760489052.394367243] [resource_manager]: 'activate' hardware 'imu' 
[ros2_control_node-2] [INFO] [1760489052.394378137] [RosbotImuSensor]: Activating
[ros2_control_node-2] [WARN] [1760489052.400692411] [RosbotImuSensor]: Feedback message from imu wasn't received yet
[spawner-9] [WARN] [1760489052.484382617] [spawner_imu_broadcaster]: Controller already loaded, skipping load_controller
[spawner-9] [ERROR] [1760489052.491253888] [spawner_imu_broadcaster]: Failed to configure controller
[spawner-8] [INFO] [1760489052.643678182] [spawner_joint_state_broadcaster]: waiting for service /controller_manager/list_controllers to become available...
[ERROR] [spawner-9]: process has died [pid 164857, exit code 1, cmd '/opt/ros/jazzy/lib/controller_manager/spawner imu_broadcaster -c controller_manager --controller-manager-timeout 20 --ros-args -r __ns:=/ -p use_sim_time:=False -r /diagnostics:=diagnostics -r /tf:=tf -r /tf_static:=tf_static -r /tf:=tf -r /tf_static:=tf_static'].
[ros2_control_node-2] [WARN] [1760489053.400812893] [RosbotImuSensor]: Feedback message from imu wasn't received yet
[ros2_control_node-2] [INFO] [1760489053.400846800] [resource_manager]: Successful 'activate' of hardware 'imu'
[ros2_control_node-2] [INFO] [1760489053.400925134] [controller_manager]: Registering statistics for : rosbot_system
[ros2_control_node-2] [INFO] [1760489053.401051467] [controller_manager]: Registering statistics for : imu
[ros2_control_node-2] [INFO] [1760489053.401123530] [controller_manager]: Resource Manager has been successfully initialized. Starting Controller Manager services...
[ros2_control_node-2] [INFO] [1760489053.452294761] [controller_manager]: Received robot description from topic.
[ros2_control_node-2] [WARN] [1760489053.452353910] [controller_manager]: ResourceManager has already loaded a urdf. Ignoring attempt to reload a robot description.
[ros2_control_node-2] [INFO] [1760489055.150884591] [controller_manager]: Loading controller : 'joint_state_broadcaster' of type 'joint_state_broadcaster/JointStateBroadcaster'
[ros2_control_node-2] [INFO] [1760489055.150966665] [controller_manager]: Loading controller 'joint_state_broadcaster'
[ros2_control_node-2] [WARN] [1760489055.158821047] [controller_manager]: The use of remapping arguments to the controller_manager node is deprecated. Please use the '--controller-ros-args' argument of the spawner to pass remapping arguments to the controller node.
[ros2_control_node-2] [INFO] [1760489055.158914768] [controller_manager]: Controller 'joint_state_broadcaster' node arguments: --ros-args -p use_sim_time:=False --params-file /tmp/tmp6m4b4mr2 -r /diagnostics:=diagnostics -r /tf:=tf -r /tf_static:=tf_static -r /tf:=tf -r /tf_static:=tf_static -r drive_controller/cmd_vel:=cmd_vel -r drive_controller/odom:=odometry/wheels -r drive_controller/transition_event:=_drive_controller/transition_event -r imu_sensor_node/imu:=/_imu/data_raw -r imu_broadcaster/transition_event:=_imu_broadcaster/transition_event -r joint_state_broadcaster/transition_event:=_joint_state_broadcaster/transition_event -r ~/motors_cmd:=/_motors_cmd -r ~/motors_response:=/_motors_response 
[spawner-8] [INFO] [1760489055.248703783] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ros2_control_node-2] [INFO] [1760489055.251607319] [controller_manager]: Configuring controller: 'joint_state_broadcaster'
[ros2_control_node-2] [INFO] [1760489055.251870425] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[ros2_control_node-2] [INFO] [1760489055.269023476] [controller_manager]: Activating controllers: [ joint_state_broadcaster ]
[ros2_control_node-2] [INFO] [1760489055.276058943] [controller_manager]: Successfully switched controllers!
[spawner-8] [INFO] [1760489055.287975131] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[INFO] [spawner-8]: process has finished cleanly [pid 164856]
[INFO] [launch.user]: All systems are up and running!

Now, I tried to enable components manually. I first run microros.

husarion@my-ROSbotXL:~/rosbot_ws$ ros2 launch rosbot_bringup microros.launch.py robot_model:=rosbot_xl port:=8888
[INFO] [launch]: All log files can be found below /home/husarion/.ros/log/2025-10-15-11-20-32-625645-my-ROSbotXL-178410
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [micro_ros_agent-1]: process started with pid [178413]
[micro_ros_agent-1] [1760489432.686473] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[micro_ros_agent-1] [1760489432.686740] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[micro_ros_agent-1] [1760489434.742888] info     | Root.cpp           | create_client            | create                 | client_key: 0x07D6F7AE, session_id: 0x81
[micro_ros_agent-1] [1760489434.742939] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x07D6F7AE, address: 192.168.77.3:47138
[micro_ros_agent-1] [1760489434.745055] warning  | FastDDSMiddleware.cpp | create_participant_by_bin | Overriding Micro XRCE-DDS Client DOMAIN_ID | domain_id: 0
[micro_ros_agent-1] [1760489434.756992] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x07D6F7AE, participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.758926] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x07D6F7AE, topic_id: 0x000(2), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.760862] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x07D6F7AE, subscriber_id: 0x000(4), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.765806] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x07D6F7AE, datareader_id: 0x000(6), subscriber_id: 0x000(4)
[micro_ros_agent-1] [1760489434.768452] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x07D6F7AE, topic_id: 0x001(2), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.771997] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x07D6F7AE, publisher_id: 0x000(3), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.774802] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x07D6F7AE, datawriter_id: 0x000(5), publisher_id: 0x000(3)
[micro_ros_agent-1] [1760489434.779517] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x07D6F7AE, topic_id: 0x002(2), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.780891] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x07D6F7AE, publisher_id: 0x001(3), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.784093] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x07D6F7AE, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[micro_ros_agent-1] [1760489434.786204] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x07D6F7AE, topic_id: 0x003(2), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.788053] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x07D6F7AE, publisher_id: 0x002(3), participant_id: 0x000(1)
[micro_ros_agent-1] [1760489434.791888] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x07D6F7AE, datawriter_id: 0x002(5), publisher_id: 0x002(3)
[micro_ros_agent-1] [1760489434.795027] info     | ProxyClient.cpp    | create_replier           | replier created        | client_key: 0x07D6F7AE, requester_id: 0x000(7), participant_id: 0x000(1)

And surprisingly, all controllers are showing to be active! I’m not sure why since microros launch, as far as I can tell, don’t activate them, or does it? It’s also interesting because when I ran keyboard teleop, it’s working perfectly without the issues I observed (delay and interruption) when I used the bringup launch file.

husarion@my-ROSbotXL:~/rosbot_ws$ ros2 control list_controllers
[INFO] [1760489466.168320381] [_ros2cli_179609]: waiting for service /controller_manager/list_controllers to become available...
imu_broadcaster         imu_sensor_broadcaster/IMUSensorBroadcaster      active
joint_state_broadcaster joint_state_broadcaster/JointStateBroadcaster    active
drive_controller        mecanum_drive_controller/MecanumDriveController  active
husarion@my-ROSbotXL:~/rosbot_ws$ 

I tried to manually activate the controllers and I’m getting the same problem as when I used the bringup! It seems to me that microros is activating the controllers and bringup is doing it the second time hence the error? Can you shed light on this?

husarion@my-ROSbotXL:~/rosbot_ws$ ros2 control load_controller --set-state active imu_broadcaster
Controller : imu_broadcaster already loaded, skipping load_controller!
Error configuring controller : imu_broadcaster
husarion@my-ROSbotXL:~/rosbot_ws$ 
husarion@my-ROSbotXL:~/rosbot_ws$ ros2 control load_controller --set-state active joint_state_broadcaster
[INFO] [1760489680.318158335] [_ros2cli_187222]: waiting for service /controller_manager/list_controllers to become available...
Controller : joint_state_broadcaster already loaded, skipping load_controller!
Error configuring controller : joint_state_broadcaster
husarion@my-ROSbotXL:~/rosbot_ws$ 
husarion@my-ROSbotXL:~/rosbot_ws$ 
husarion@my-ROSbotXL:~/rosbot_ws$ ros2 control load_controller --set-state active drive_controller
Controller : drive_controller already loaded, skipping load_controller!
Error configuring controller : drive_controller
husarion@my-ROSbotXL:~/rosbot_ws$ 
husarion@my-ROSbotXL:~/rosbot_ws$ 

Update: I tried checking if controllers are active before even starting microros, and they are. Could there be some services running in the background at startup?

Most recent update: I tried disabling snap rosbot service and it’s now working!

husarion@my-ROSbotXL:~/rosbot_ws$ sudo snap disable rosbot
rosbot disabled
husarion@my-ROSbotXL:~/rosbot_ws$ 
husarion@my-ROSbotXL:~/rosbot_ws$ 
husarion@my-ROSbotXL:~/rosbot_ws$ snap services
Service                                              Startup   Current   Notes
firmware-updater.firmware-notifier                   enabled   inactive  user,timer-activated
firmware-updater.firmware-updater-app                enabled   inactive  user,dbus-activated
husarion-depthai.daemon                              disabled  inactive  -
husarion-rplidar.daemon                              disabled  inactive  -
husarion-webui.web-ui                                enabled   active    -
husarion-webui.web-ws                                enabled   active    -
rosbot.daemon                                        disabled  inactive  -
rosbot.db-server                                     disabled  inactive  -
rosbot-xl.daemon                                     disabled  inactive  -
rosbot-xl.db-server                                  disabled  inactive  -
rosbot-xl.joy                                        disabled  inactive  -
snapd-desktop-integration.snapd-desktop-integration  enabled   inactive  user
husarion@my-ROSbotXL:~/rosbot_ws$ 

I’m glad you managed to diagnose the problem yourself and thank you for sharing your observations.

1 Like