Open KansaiUser opened 3 years ago
Is there any terminal output? What operating system and version are you using?
To fix this issue replace
old_attr = termios.tcgetattr(sys.stdin)
with old_attr = termios.tcgetattr(sys.stdin.fileno())
I just ran this on python2 and python3 and it seemed to work (?) what version of Python are you using, and what OS ?
I using Python 3.8.10 on Ubuntu 20.04 (btw, thanks for your impressive work!).
It's because rate.sleep() doesn't work properly. It hold system so that the while loop doesn't go around. If you terminate the program with Ctrl+C, the system doesn't receive the old terminal attribute. I don't know why rate.sleep() doesn't work, but I can go around it by using time.sleep(). If I want to use rate=rospy.Rate(10) # 10Hz, I use time.sleep(0.1) instead of rate.sleep(). It's not same but works.
The code related with key_publisher does not work. It has two issues