NickWaterton / Roomba980-Python

Python program and library to control iRobot Roomba 980 Vacuum Cleaner
MIT License
361 stars 103 forks source link

How do I access cd Roomba980-Python/roomba #89

Open campam0514 opened 3 years ago

campam0514 commented 3 years ago

When I type cd Roomba980-Python/roomba into python, this comes up

>>> cd Roomba980-Python/roomba
  File "<stdin>", line 1
    cd Roomba980-Python/roomba
       ^
SyntaxError: invalid syntax

How do you access that file on python?

NickWaterton commented 3 years ago

The cd command is not a Python command, it’s an OS command.

I think you need to learn some Linux basics, and some Python basics before you go any further.

This might be helpful: https://linuxize.com/post/basic-linux-commands/

campam0514 commented 3 years ago

Thank you for the info, I'm just learning about this

campam0514 commented 3 years ago

Is this what I am supposed to get or am I doing something wrong? I held the home button on the roomba before I ran the program. C:\Users\Carlos\Roomba980-Python\roomba>roomba_direct.py [2021-05-02 15:44:16,806][ INFO](Roomba ) ******************* [2021-05-02 15:44:16,806][ INFO](Roomba ) * Program Started * [2021-05-02 15:44:16,806][ INFO](Roomba ) ******************* [2021-05-02 15:44:16,806][ INFO](Roomba ) Roomba.py Version: 2.0f [2021-05-02 15:44:16,806][ INFO](Roomba ) Python Version: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] [2021-05-02 15:44:16,806][ INFO](Roomba ) Paho MQTT Version: 1.5.1 [2021-05-02 15:44:16,806][ INFO](Roomba ) CV Version: 4.5.1 [2021-05-02 15:44:16,806][ INFO](Roomba ) PIL Version: 8.2.0 [2021-05-02 15:44:16,806][ INFO](Roomba ) <CNTRL C> to Exit [2021-05-02 15:44:16,806][ INFO](Roomba ) Roomba MQTT data Interface [2021-05-02 15:44:16,806][ INFO](Roomba.Password ) Using Password version 2.0a [2021-05-02 15:44:16,806][ INFO](Roomba.Password ) reading/writing info from config file ./config.ini [2021-05-02 15:44:16,806][ INFO](Roomba.Password ) 1 Roombas Found [2021-05-02 15:44:16,806][ INFO](Roomba ) Creating Roomba object 192.168.10.1, Coco [2021-05-02 15:44:16,822][ INFO](Roomba.Password ) Using Password version 2.0a [2021-05-02 15:44:16,822][ INFO](Roomba.Coco ) Posting DECODED data [2021-05-02 15:44:16,822][ INFO](Roomba.Coco ) MAP: Maps Enabled [2021-05-02 15:44:16,822][ INFO](Roomba.Coco ) Connecting... [2021-05-02 15:44:16,822][ INFO](Roomba.Coco ) Setting TLS [2021-05-02 15:44:16,822][WARNI](Roomba.Coco ) error loading font: %s, loading default font [2021-05-02 15:44:16,822][ INFO](Roomba.Coco ) Setting TLS - OK [2021-05-02 15:44:16,868][ INFO](Roomba.Coco ) MAP: opening existing map_notext.png [2021-05-02 15:44:16,868][WARNI](Roomba.Coco ) MAP: unable to load map_notext.png: [Errno 2] No such file or directory: './Cocomap_notext.png': set to None [2021-05-02 15:44:16,868][ INFO](Roomba.Coco ) MAP: home_pos: (400,750) [2021-05-02 15:44:16,868][ INFO](Roomba.Coco ) MAP: Initialisation complete [2021-05-02 15:44:37,883][ERROR](Roomba.Coco ) Connection Error: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [2021-05-02 15:44:38,886][ERROR](Roomba.Coco ) Attempting retry Connection# 0 [2021-05-02 15:44:38,886][ INFO](Roomba.Coco ) Attempting to Reconnect... [2021-05-02 15:44:59,919][ERROR](Roomba.Coco ) Connection Error: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [2021-05-02 15:45:00,925][ERROR](Roomba.Coco ) Attempting retry Connection# 1 [2021-05-02 15:45:00,925][ INFO](Roomba.Coco ) Attempting to Reconnect... [2021-05-02 15:45:21,955][ERROR](Roomba.Coco ) Connection Error: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [2021-05-02 15:45:22,960][ERROR](Roomba.Coco ) Attempting retry Connection# 2 [2021-05-02 15:45:22,960][ INFO](Roomba.Coco ) Attempting to Reconnect... [2021-05-02 15:45:43,990][ERROR](Roomba.Coco ) Connection Error: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [2021-05-02 15:46:44,004][ERROR](Roomba.Coco ) Attempting retry Connection# 3 [2021-05-02 15:46:44,004][ INFO](Roomba.Coco ) Attempting to Reconnect... [2021-05-02 15:47:05,055][ERROR](Roomba.Coco ) Connection Error: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

NickWaterton commented 3 years ago

No, it’s not.

I suggest you follow the directions exactly.

ie run roomba_direct.py without pressing any buttons, and follow the on screen instructions.

You could run get_password.py instead, to get the connection info, but you need to follow the instructions exactly.

campam0514 commented 3 years ago

I followed the on screen instructions exactly as they said and it says that there is an error communicating with the robot

NickWaterton commented 3 years ago

Did you manage to get this to connect? did get_password.py work?

campam0514 commented 3 years ago

No, It says there was a problem with it. To get the live map do I have to have the password for the Roomba?

From: Nick Waterton @.> Sent: Wednesday, May 19, 2021 10:05 AM To: NickWaterton/Roomba980-Python @.> Cc: campam0514 @.>; Author @.> Subject: Re: [NickWaterton/Roomba980-Python] How do I access cd Roomba980-Python/roomba (#89)

Did you manage to get this to connect? did get_password.py work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NickWaterton/Roomba980-Python/issues/89#issuecomment-844193743 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AT5DNJKRQZVMTYNDEG6MG3LTOPHRJANCNFSM43636IYA . https://github.com/notifications/beacon/AT5DNJLVZTGMOLC4NR3KKQ3TOPHRJA5CNFSM43636IYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGJIV7TY.gif

NickWaterton commented 3 years ago

Yes,

The process is:

You get the blid and password by running get_password.py, and following the instructions. The blid and password are written to the file config.ini

When you run roomba_direct.py, it reads these values from config.ini.

If config.ini doesn’t exist, roomba_direct.py runs get_passwrd.py automatically.

Can you post the contents of your config.ini file and I’ll see if it looks OK.

I also haven’t tried roomba_direct.py on Windows with python 3.9, so there may be something going on with that.

campam0514 commented 3 years ago

I don’t have a config.ini yet but I will try the password.py tomorrow

From: Nick Waterton @.> Sent: Wednesday, May 19, 2021 6:15 PM To: NickWaterton/Roomba980-Python @.> Cc: campam0514 @.>; Author @.> Subject: Re: [NickWaterton/Roomba980-Python] How do I access cd Roomba980-Python/roomba (#89)

Yes,

The process is:

You get the blid and password by running get_password.py, and following the instructions. The blid and password are written to the file config.ini

When you run roomba_direct.py, it reads these values from config.ini.

If config.ini doesn’t exist, roomba_direct.py runs get_passwrd.py automatically.

Can you post the contents of your config.ini file and I’ll see if it looks OK.

I also haven’t tried roomba_direct.py on Windows with python 3.9, so there may be something going on with that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NickWaterton/Roomba980-Python/issues/89#issuecomment-844559035 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AT5DNJOTXK7WANTATUO3KILTORBARANCNFSM43636IYA . https://github.com/notifications/beacon/AT5DNJLXXG7SBBLF5BTW4PTTORBARA5CNFSM43636IYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGJLPFOY.gif