ros nodes not shutting down
i have a launch file which first launch another launch file and then it starts another node. When my another node terminates I expect nodes started by first launch file should also terminate. So I have
while (ros::ok())
in my first launch node so if my second node finishes, i want to terminate first node. but right now on console I get
"escalating to SIGTERM"
. How do I fix this issue?
Nodes not shutting down is typically caused by either not checking
ros::ok()
or not having a properros::Rate::sleep()
somewhere in yourwhile
loop. The first is probably not the case, but do please check the second.