I have just gotten my first diffdrive hardware interface to run, connected to a RPi Pico running Micro-ROS. My launch file is pretty much identical to the demo:

ROS2 Control diffbot demo launch file

, except for package name, logging levels etc.

My problem is that in most launch attempts

ros2 launch diffbot_pico diffbot.launch.py 

, the launch process "hangs" until Ctrl+C at the joint_state_broadcaster node:

[spawner-3] [DEBUG] [1696274031.543300764] [spawner_joint_state_broadcaster]: requester: making request: controller_manager_msgs.srv.SwitchController_Request(activate_controllers=['joint_state_broadcaster'], deactivate_controllers=[], start_controllers=[], stop_controllers=[], strictness=2, start_asap=False, activate_asap=True, timeout=builtin_interfaces.msg.Duration(sec=5, nanosec=0))
[spawner-3] [DEBUG] [1696274031.543453746] [rcl]: Client sending service request
[spawner-3] [DEBUG] [1696274031.544023770] [rcl]: Initializing wait set with '0' subscriptions, '2' guard conditions, '0' timers, '4' clients, '6' services

After n launch attempts, the broadcaster activation suddenly succeeds, and the launch procedure goes on to activate the diffbot_base_controller etc. On those occasions, RVIZ is opened as expected, and all communication to Micro-ROS/ microcontroller is OK.

[spawner-3] [DEBUG] [1696274031.720523369] [rcl]: Client taking service response
[spawner-3] [DEBUG] [1696274031.720603413] [rcl]: Client take response succeeded: true
[spawner-3] [INFO] [1696274031.722087080] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster

I'm not sure if this is relevant, but these errors show up early in the launch log:

[spawner-3] [DEBUG] [1696274031.151595044] [rcl]: Couldn't parse arg 0 (/opt/ros/humble/lib/controller_manager/spawner) as a remap rule in its deprecated form. Error: Expected lexeme type (19) not found, search ended at index 46, at ./src/rcl/lexer_lookahead.c:239
[spawner-3] [DEBUG] [1696274031.151611839] [rcl]: Couldn't parse arg 1 (joint_state_broadcaster) as a remap rule in its deprecated form. Error: Expected lexeme type (19) not found, search ended at index 23, at ./src/rcl/lexer_lookahead.c:239
[spawner-3] [DEBUG] [1696274031.151615583] [rcl]: Couldn't parse arg 2 (--controller-manager) as a remap rule in its deprecated form. Error: Expecting token or wildcard, at ./src/rcl/arguments.c:1170
[spawner-3] [DEBUG] [1696274031.151618769] [rcl]: Couldn't parse arg 3 (/controller_manager) as a remap rule in its deprecated form. Error: Expected lexeme type (19) not found, search ended at index 19, at ./src/rcl/lexer_lookahead.c:239

I also got the debugger module connected to the Pico, and when the launch file hangs, there is NO TX/RX indication (LED). On succesful attempts, the TX/RX indicators immediately indicate traffic.

Anyone having related experience in this kind of arbitrary launch error?

  • $\begingroup$ Hi. Could you please add information on which release you are using? You link to the master branch of the demos, do you use iron or rolling? $\endgroup$ Oct 3, 2023 at 8:31
  • $\begingroup$ Sorry, I forgot. I am using Humble $\endgroup$ Oct 3, 2023 at 18:54
  • $\begingroup$ ok, that should not change anything regarding the controller_manager or spawner. $\endgroup$ Oct 3, 2023 at 20:21
  • $\begingroup$ can you explain your architecture more in detail? I never worked with micro-ROS, where do you launch the controller_node of ros2_control? Where is the data transferred from your PC to micro-ROS? $\endgroup$ Oct 3, 2023 at 20:30
  • $\begingroup$ I took inspiration from the ROSCON 22 workshop code, and the work of Josh Newman, and have a separate comms header file. In there, I initialize some ROS2 publishers, and a ROS2 client, using the custom interfaces installed both on the ROS2 workspace, and in the micro-ROS workspace on the Pico. It's more or less the same code as found in the ROS2 tutorials, for writing custom publisher and custom client. The communication is managed via a micro-ROS agent, running in a Docker container on the client/ host PC. Happy to share my work, when it's less buggy :) $\endgroup$ Oct 7, 2023 at 19:11

1 Answer 1


I don't use the debug log-level a lot, normally I was able to solve such problems with the standard Info/Warn/Error messages.

I suggest the following:

  • Change your launch file to a minimum, i.e., do not activate any controllers (outcomment the spawners) and launch it.
  • Use the ros2_control CLI to introspect the controller manager's state. The CLI commands are only python wrappers for the services provided by the controller manager. If there is a problem, you will also see this with the CLI commands.
  • Follow the points from literal 6 of RRbot example_1 (load controller, configure, activate) and see if you can reproduce and isolate your issue.
  • $\begingroup$ thanks for taking the time to answer, I will look at your suggestions tomorrow $\endgroup$ Oct 7, 2023 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.