Ctrl +C can't kill the node
However , I wrote a UDP_server to keep receive massage ,and the receive funcion is in the while(ros::ok()),but when I press ctrl +C , the process doesn't shut down . what's going wrong ?
please post the code, it's hard to help debugging without any..
thank you,it has been sloved
hi! I meet the same problem with you , can i have chance to know how you solved this problem? thank you a lot !
施佳伟? 程序阻塞了,用select函数可以解决。
@Tomas yuan: could you please only use English on ROS Answers? Thanks.
您好! 没想到你也是中国人啊 呵呵。 我叫贾士伟。 根据你的指点,没找到select函数啊,你是在哪找的呢? 我用的是boost 里的udp
Hi,nice to meet you .Boost library may not contain the
select
function,you can useasync_read()
to work in asynchronous way for data reading .Here is boost::ASIO的异步方式 .And if you donnot use the boost class , you can directly use socket for udp