Oct-30-2021, 02:42 PM
(This post was last modified: Oct-30-2021, 02:44 PM by Yoriz.
Edit Reason: Added code tags
)
I would like to control a robot using pexpect. Here is my code:
#!/usr/bin/env python from pexpect import pxssh import pexpect s = pxssh.pxssh() s.login('ubiquityrobot.local', 'ubuntu', 'ubuntu') print 'Start' s.sendline('rosrun simple_nav control.py') s.prompt() print(s.before) s.expect('Load Path Name?', timeout=5) s.sendline('yes') s.prompt() print(s.before) s.expect('Enter the name of the Path:', timeout=5) s.sendline('4') s.prompt() print(s.before) s.expect('Load Path Name? ') s.sendline('no') s.prompt() print(s.before) s.logout()The script is working fine till the end. Finally the script is closing with an error related with the timeout and eof. How to resolve this error? Please, help!