Hi
I would like to automate the launch procedure of magni robot. Therefore I use 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 control of the robot was going well (a little bit slow). At the during the exit of the code I receive the following error, attached to the message:
Could you please help me to resolve this problem if you have an experience with pexpect. The main goal is to develop a GUI for control of the robot. Thank you!