Advertisement
Guest User

Untitled

a guest
Nov 24th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import paramiko
  2.  
  3. local_ip=*********
  4. name=******
  5. pwd=*******
  6.  
  7. ssh = paramiko.SSHClient()
  8. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  9. ssh.connect(local_ip,username=name,password=pwd)
  10.  
  11. command="rostopic pub -1 /ardrone/takeoff std_msgs/Empty"
  12. stdin, stdout, stderr = ssh.exec_command(command)
  13.  
  14. print stdout.read()
  15.  
  16. ******@*****:~$ rostopic pub -1 /ardrone/takeoff std_msgs/Empty
  17. publishing and latching message for 3.0 seconds
  18. ******@*****:~$
  19.  
  20. command="ls"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement