我已经制作了一个 ROS 节点,它使用 python 的扭曲协议与客户端建立连接。该程序按预期工作,但是当我尝试使用 Ctrl+c 终止该程序时,它显示以下错误消息:
[server_send_command_ver3-4] 升级到 SIGTERM
我在下面包含了我的一部分代码:
if __name__ == '__main__':
try:
#node initialization
rospy.init_node('listen', anonymous = True)
#publisher to publish message to clientconnection to display connection status on GUI
connect = rospy.Publisher("status", String, queue_size = 10)
connect.publish(" Lost Connection")
#twisted protocol and listen at port 80
factory = Factory()
factory.protocol = NewFactory
factory.clients = []
reactor.listenTCP(80, factory)
reactor.run()
except rospy.ROSInterruptException:
pass