How to automate the launch procedure of magni?

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!

Having not used that appraoch I cannot comment. Post back to here what you learn so that it may be of value to the forum. Everyone must keep in mind this is a ‘forum’. We do not claim to have all the answers so we quite encourage those who try things with succes to share their success back to this forum for the betterment of all Magni users. Let us know how it goes. Sounds exciting.