c64-dev / Cozmo.AI

Adding AI chat and voice command functionality to Cozmo robot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After the installation?

snaildos opened this issue · comments

What do i do after the installation?

In my efforts to simplify the user installation procedure, I tried to package the program and upload to the PyPi archive. However, while it was uploading & installing ok, I failed to check whether it would run properly.

After your comment I did some further testing and saw that the program fails to execute.
As a result, I reworked the installation procedure completely.
It is still user friendly but now there are detailed instructions on how to install, use and update Cozmo.AI.

Please have a look at the new instructions and let me know how you get on.
Also don't forget to delete the incorrect PyPi version by issuing:
pip3 uninstall CozmoAI

Thanks for the heads up!

Uhm. Now i finished all the instructions, Ran the command, And attempted to exit freeplay mode. This happened:

= Entering FreePlay Mode =

Cozmo is now in full autonomous mode.
He will freely explore his environment until he hears the wakeup command 'Cozmo listen'
Listening for wakeup command now.
Found. Exiting FreePlay mode. Please wait...
2020-01-29 10:59:00,143 cozmo.general INFO Sending abort request for all actions
2020-01-29 10:59:00,143 cozmo.general INFO Sending abort request for all actions
2020-01-29 10:59:03,059 cozmo.general INFO Shutting down connection
2020-01-29 10:59:03,059 cozmo.general INFO Shutting down connection
2020-01-29 10:59:03,063 cozmo.general INFO Android serial=R58M70G6CHX disconnected.
2020-01-29 10:59:03,063 cozmo.general INFO Android serial=R58M70G6CHX disconnected.
2020-01-29 10:59:03,227 cozmo.general INFO App connection established. sdk_version=1.4.10 cozmoclad_version=3.4.0 app_build_version=00003.00004.00000
2020-01-29 10:59:03,227 cozmo.general INFO App connection established. sdk_version=1.4.10 cozmoclad_version=3.4.0 app_build_version=00003.00004.00000
2020-01-29 10:59:03,227 cozmo.general INFO App connection established. sdk_version=1.4.10 cozmoclad_version=3.4.0 app_build_version=00003.00004.00000
2020-01-29 10:59:03,232 cozmo.general INFO Found robot id=1
2020-01-29 10:59:03,232 cozmo.general INFO Found robot id=1
2020-01-29 10:59:03,232 cozmo.general INFO Found robot id=1
2020-01-29 10:59:03,245 cozmo.general INFO Connected to Android device serial=R58M70G6CHX
2020-01-29 10:59:03,245 cozmo.general INFO Connected to Android device serial=R58M70G6CHX
2020-01-29 10:59:03,245 cozmo.general INFO Connected to Android device serial=R58M70G6CHX
2020-01-29 10:59:03,452 cozmo.general INFO Robot id=1 serial=02e2c160 initialized OK
2020-01-29 10:59:03,452 cozmo.general INFO Robot id=1 serial=02e2c160 initialized OK
2020-01-29 10:59:03,452 cozmo.general INFO Robot id=1 serial=02e2c160 initialized OK
2020-01-29 10:59:06,515 cozmo.general INFO Shutting down connection
2020-01-29 10:59:06,515 cozmo.general INFO Shutting down connection
2020-01-29 10:59:06,515 cozmo.general INFO Shutting down connection
2020-01-29 10:59:06,519 cozmo.general INFO Android serial=R58M70G6CHX disconnected.
2020-01-29 10:59:06,519 cozmo.general INFO Android serial=R58M70G6CHX disconnected.
2020-01-29 10:59:06,519 cozmo.general INFO Android serial=R58M70G6CHX disconnected.
Traceback (most recent call last):
File "main.py", line 885, in
initCozmo()
File "main.py", line 111, in initCozmo
cozmo.run_program(mainLoop) # ALT: (mainLoop, use_viewer=True, force_viewer_on_top=True)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\cozmo\run.py", line 849, in run_program
connect(wrapper, conn_factory=conn_factory, connector=connector)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\cozmo\run.py", line 605, in connect
return _connect_sync(f, conn_factory, connector)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\cozmo\run.py", line 530, in _connect_sync
f(base._SyncProxy(coz_conn))
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\cozmo\run.py", line 835, in wrapper
f(robot)
File "main.py", line 129, in mainLoop
pb = AIBot()
File "main.py", line 818, in init
self.browser = webdriver.Firefox(options=self.opts)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in init
keep_alive=True)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\zaras\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

I'm sorry for the late response, but I didn't get the original notification for the issue.

Looking at the error log, Cozmo seems to succesfully recognize the wakeup word and tries to FreePlay mode. Everytime Cozmo exits the FreePlay mode, it tries to run the AI Chatbot module in order to talk with the user.

This requires an up-to-date Firefox installation together with the latest Selenium version.

From the log though, Selenium is exiting noting that "Session is not created" because it's unable to find a matching set of capabilities. This typically happens either because the user is running an older Firefox, Selenium or Geckodriver.

I would suggest the following:

  1. Update your Firefox installation to the latest version.
  2. Check that you are running the latest Selenium and Geckodriver versions and reinstall/update as needed.

After that CozmoAI should run just fine. Let me know if this solves the problem.

The error still continues.

Hi, to get started can you let me know what versions you have for the following items?
Operating System =
Selenium =
Firefox =
Geckodriver =