srobo / sr-robot3-j5

Python 3 API for Student Robotics Kit - Built with j5
MIT License
4 stars 1 forks source link

ConsoleEnvironment fails to read on robots #20

Closed raccube closed 3 years ago

raccube commented 3 years ago

Log output:

0:00:00.000086 WARNING: Running on DEVELOPMENT BUILD
0:00:00.009990 === LOG STARTED ===
0:00:01.409813 sr.robot3.robot INFO - sr.robot3 version 2021.0.0a1.dev1
0:00:01.439031 PowerBoard(SERIAL): Setting output 0 to True
0:00:01.440734 PowerBoard(SERIAL): Setting output 1 to True
0:00:01.442008 PowerBoard(SERIAL): Setting output 2 to True
0:00:01.445206 PowerBoard(SERIAL): Setting output 3 to True
0:00:01.446494 PowerBoard(SERIAL): Setting output 4 to True
0:00:01.447693 PowerBoard(SERIAL): Setting output 5 to True
0:00:01.448844 sr.robot3.robot INFO - Found Student Robotics v4 Power Board - SERIAL
0:00:01.450035 sr.robot3.robot INFO - Found Student Robotics v4 Servo Board - SERIAL
0:00:01.451381 sr.robot3.robot INFO - Found Student Robotics v4 Motor Board - SERIAL
0:00:01.452784 Hello World!
0:00:01.454277 sr.robot3.robot INFO - Waiting for start signal
0:00:01.467343 PowerBoard(SERIAL): Buzzing at 1760.0Hz for 100ms
0:00:01.468829 PowerBoard(SERIAL): Start button state [true/false]: asyncio ERROR - Task exception was never retrieved
0:00:01.470469 future: <Task finished name='Task-31' coro=<Robot.wait_start.<locals>.wait_for_physical_start() done, defined at /usr/lib/python3.9/site-packages/sr/robot3/robot.py:200> exception=EOFError('EOF when reading a line')>
0:00:01.471757 Traceback (most recent call last):
0:00:01.473054 File "/usr/lib/python3.9/site-packages/sr/robot3/robot.py", line 204, in wait_for_physical_start
0:00:01.474342 while not self.power_board.start_button.is_pressed and flash_loop:
0:00:01.475662 File "/usr/lib/python3.9/site-packages/j5/components/button.py", line 43, in is_pressed
0:00:01.477064 return self._backend.get_button_state(self._identifier)
0:00:01.478345 File "/usr/lib/python3.9/site-packages/j5/backends/backend.py", line 33, in new_method
0:00:01.479646 retval = old_method(*args, **kwargs)
0:00:01.480928 File "/usr/lib/python3.9/site-packages/j5/backends/console/sr/v4/power_board.py", line 109, in get_button_state
0:00:01.482184 return self._console.read("Start button state [true/false]", bool)
0:00:01.483429 File "/usr/lib/python3.9/site-packages/j5/backends/console/console.py", line 36, in read
0:00:01.484641 response = self._input(f"{self._descriptor}: {prompt}: ")
0:00:01.485819 EOFError: EOF when reading a line
0:00:01.516326 sr.robot3.robot INFO - Start signal received; continuing.
0:00:01.517519 count: 0
0:00:11.505134 count: 1
0:00:21.515976 count: 2
0:00:31.526188 count: 3
0:00:41.536557 count: 4
0:00:51.546977 count: 5
0:01:01.557327 count: 6
0:01:11.567691 count: 7
0:01:21.578100 count: 8
0:01:31.588545 count: 9
0:01:41.599849 End
0:01:41.605727 PowerBoard(SERIAL): Setting output 0 to False
0:01:41.615113 PowerBoard(SERIAL): Setting output 1 to False
0:01:41.619838 PowerBoard(SERIAL): Setting output 2 to False
0:01:41.624743 PowerBoard(SERIAL): Setting output 3 to False
0:01:41.629488 PowerBoard(SERIAL): Setting output 4 to False
0:01:41.634093 PowerBoard(SERIAL): Setting output 5 to False
0:01:41.638892 MotorBoard(SERIAL): Setting motor 0 to BRAKE.
0:01:41.643726 MotorBoard(SERIAL): Setting motor 1 to BRAKE.
0:01:41.643726 === LOG FINISHED ===

robot.zip

raccube commented 3 years ago

This will be fixed with the next j5 release.