Callback freezes when debugger hits breakpoint

asked 2021-08-11 06:33:31 -0500

Hakaishin gravatar image

updated 2021-08-25 03:00:00 -0500

I can use the clion debugger to run the binary of my node with adding following env vars:

FASTRTPS_DEFAULT_PROFILES_FILE=/home/usernam/ros2_rolling/src/projectname/config/default.xml;RMW_IMPLEMENTATION=rmw_fastrtps_cpp

Now my node is a lifecycle node. I start it up in the debugger turn it to active and everything works fine. I have a callback retrieving sensor data. Now I have a breakpoint to debug a difficult edge case. When I reach the breakpoint everything works as expected and I can use the debugger as normal. Though when I continue now the callback seems to be broken. Somehow the debugger fails to give back or ros fails to take back process control and the callback is just frozen. I see the sensor sending data in rviz, but the callback is never executed. Anybody experiences something similar and has an idea how to fix it? Especially for complicated issues the debugger is priceless and often a problem doesn't occur after the first breakpoint but the second one. To be precise I can set multiple breakpoints in the same callback call and they all get hit. But I would like to set a breakpoint and stop execution in callback number 1 with some sensor data x and then also stop execution in the next callback number 2 with some other sensor data y, this is what is not working.

edit retag flag offensive close merge delete