Troubleshooting
General
- Check that you don't have messages such
exception was not handled
.
- Add prints everywhere to find where the program hangs.
Executable not found
- Make sure to build and to source the environment with
tdde05-start
- Make sure your
setup.py
is well formed (in particular, there should be a ,
if you have two or more executable).
Topic, Service, Action not working
- Check the types and names are correct (they should match what you get from
ros2 topic
, ros2 service
and ros2 action
commands).
- Check the node is spinning, i.e., that it was added to an executor, that the executor is spinning.
- If making a service/action call from a callback, make sure you are using a
MultiThreadedExecutor
and that ReentrantGroup
are set correctly.
- Make sure that you are not that not using
rclpy.spin*
functions with a custom created executor.
Strange errors
- When calling
self.executor.add_node
you get the error Cannot call 'add_node' on object of type NoneType
. Try renaming self.executor
to self.executor_
. This might be caused by some conflicts with a base class.