GithubHelp home page GithubHelp logo

zauberzeug / field_friend Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 2.0 3.64 MB

A Development Platform for Mechanical Weeding.

Home Page: https://feldfreund.de

License: MIT License

Python 98.60% Shell 0.92% Dockerfile 0.48%
farming feldfreund robotics rosys weeding

field_friend's Issues

Adapt Docker-compose and Jetson Version for Different L4T Versions

Due to the variations in L4T (Linux 4 Tegra) versions present on Orin and Nano devices, it's essential to pull different detector images tailored for each. This requires specific adjustments and the creation of distinct docker-compose.yml files suited for different systems.

To-Dos:

  • Create separate docker-compose.yml files for different Jetson systems (Orin, Nano, etc.) ensuring compatibility with their respective L4T versions.

  • Integrate a mechanism within the docker.sh script to accurately detect the Jetson system in use. This detection is crucial for pulling the correct detector images and for ensuring the system operates with the appropriate docker-compose configuration.

This adjustment will allow our project to be more versatile and compatible across different Jetson platforms, enhancing usability and reliability.

GNSS position update delay

Hello,

we have issues concerning the GNSS position update.

Problem description:
tl;dr: The GNSS position takes up to a few (1-5) minutes to get updated so the robot is not even close to where he should be.

After planning a flield with two rows, we want the robot to simply follow them using the weeding automation in monitoring only mode. The rows doesn't exist in real life, they are are only defined per GPS locations, so there are no plants to detect or something like that. After starting the automation the robot moves towards the row. We can see the robot moving inside the simulation in the UI, cause it's proably using the prediction from the Odometer. The real robot however is not on the depicted position, cause it's not getting new GNSS information. It takes up to a few minutes to get updated and we get the following warning:

[WARNING] field_friend/navigation/gnss.py:236: GNSS distance to prediction to high: 35.18m!!

We get a similar problem when trying to add a new field using the field planner page. We tried to use the robot to add the corner points of the field. After finishing the field planning, we saw that all points where exactly the same.
So the problem is not based on an automation.

It seems like the position update is buffered and gets released with delay.

What we also checked so far:

  • RTK fix is given at all times
  • the GNSS device (Septentrio) is updating and publishing the correct position in real time

Problem with Keyboard Control

There is an issue with the keyboard control for driving the Fieldfriend manually. The issue occured on multiple systems and on multiple robots (U1 and U4). Driving back and turning right (Shift + Arrow Down, Shift + Arrow Right) work as expected but left and forward is not possible. When sending multiple commands at once (e.g. letf and forward by pushing Shift + Arrow Left + Arrow Up) works. Also using the joystick or the mobile application works as expected.

Interior Flashlight E-Stop Error

We used the U4 only with smartphone-app controlling. Steering, starting and stopping the demo automation worked well but there was one issue that occurred consistently:

When triggering one of the E-Stop buttons the interior flashlight turns off and does not turn on when starting the automation again. We had to restart the robot to get the light on.

[RB26] antenna_offset Parameter missing

Hello,

The parameter antenna_offset is missing in the parameter.py of the rb26. I locally added the parameter by myself with the same value of the rb27 in the corresponding parameter.py so far.

Without this fix the Webinterface of the nicegui would only load a white page and the logger would output the following:

rosys_1         | 2024-05-07 10:52:38.128 [ERROR] nicegui/app/app.py:118: 'antenna_offset'
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/nicegui/client.py", line 287, in safe_invoke
rosys_1         |     result = func(self) if len(inspect.signature(func).parameters) == 1 else func()
rosys_1         |                                                                              ^^^^^^
rosys_1         |   File "/app/main.py", line 16, in startup
rosys_1         |     system = System()
rosys_1         |              ^^^^^^^^
rosys_1         |   File "/app/field_friend/system.py", line 27, in __init__
rosys_1         |     self.field_friend = FieldFriendHardware()
rosys_1         |                         ^^^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/app/field_friend/hardware/field_friend_hardware.py", line 40, in __init__
rosys_1         |     self.ANTENNA_OFFSET: float = config_params['antenna_offset']
rosys_1         |                                  ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
rosys_1         | KeyError: 'antenna_offset'

[RB26] Linear Axes not referenced

Hello,

I am having trouble with the linear axes of the tool guide.

When pressing the Reference Button on either the Y-Axis or the X-Axis, the logging output is:
For the Y-Axis:

rosys_1         | 2024-05-15 15:17:35.933 [INFO] rosys/rosys.py:69: automation started
rosys_1         | 2024-05-15 15:17:35.953 [INFO] field_friend/hardware/y_axis_stepper_hardware.py:100: moving to end_r stop

For the Z-Axis:

rosys_1         | 2024-05-15 11:18:41.782 [INFO] rosys/rosys.py:69: automation started
rosys_1         | 2024-05-15 11:18:41.800 [INFO] field_friend/hardware/z_axis_stepper_hardware.py:92: zaxis referencing...
rosys_1         | 2024-05-15 11:18:41.801 [INFO] field_friend/hardware/z_axis_stepper_hardware.py:113: moving out of end t stop

After this, however, pressing any of the other buttons, e.g. Move to Middle for the Y-Axis nothing moves and the logger has the following output:

rosys_1         | 2024-05-15 11:11:11.230 [INFO] rosys/rosys.py:69: automation started
rosys_1         | 2024-05-15 11:11:11.234 [INFO] field_friend/hardware/y_axis_stepper_hardware.py:68: could not move yaxis to 0 because of yaxis is not referenced, reference first
rosys_1         | 2024-05-15 11:11:11.239 [ERROR] rosys/automation/automation.py:68: automation failed
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/field_friend/hardware/y_axis_stepper_hardware.py", line 66, in move_to
rosys_1         |     await super().move_to(position, speed)
rosys_1         |   File "/app/field_friend/hardware/y_axis.py", line 41, in move_to
rosys_1         |     raise RuntimeError('yaxis is not referenced, reference first')
rosys_1         | RuntimeError: yaxis is not referenced, reference first
rosys_1         | 
rosys_1         | During handling of the above exception, another exception occurred:
rosys_1         | 
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/rosys/automation/automation.py", line 56, in __await__
rosys_1         |     signal = send(message)
rosys_1         |              ^^^^^^^^^^^^^
rosys_1         |   File "/app/field_friend/hardware/y_axis_stepper_hardware.py", line 69, in move_to
rosys_1         |     raise Exception(f'could not move yaxis to {position} because of {error}')
rosys_1         | Exception: could not move yaxis to 0 because of yaxis is not referenced, reference first
rosys_1         | 2024-05-15 11:11:11.276 [INFO] rosys/rosys.py:69: automation stopped because an exception occurred in an automation
rosys_1         | 2024-05-15 11:11:11.277 [INFO] rosys/rosys.py:69: automation failed
rosys_1         | 2024-05-15 11:11:11.291 [ERROR] nicegui/app/app.py:118: could not move yaxis to 0 because of yaxis is not referenced, reference first
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/field_friend/hardware/y_axis_stepper_hardware.py", line 66, in move_to
rosys_1         |     await super().move_to(position, speed)
rosys_1         |   File "/app/field_friend/hardware/y_axis.py", line 41, in move_to
rosys_1         |     raise RuntimeError('yaxis is not referenced, reference first')
rosys_1         | RuntimeError: yaxis is not referenced, reference first
rosys_1         | 
rosys_1         | During handling of the above exception, another exception occurred:
rosys_1         | 
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/nicegui/background_tasks.py", line 52, in _handle_task_result
rosys_1         |     task.result()
rosys_1         |   File "/app/rosys/automation/automation.py", line 56, in __await__
rosys_1         |     signal = send(message)
rosys_1         |              ^^^^^^^^^^^^^
rosys_1         |   File "/app/field_friend/hardware/y_axis_stepper_hardware.py", line 69, in move_to
rosys_1         |     raise Exception(f'could not move yaxis to {position} because of {error}')
rosys_1         | Exception: could not move yaxis to 0 because of yaxis is not referenced, reference first

It is the same with the Z-Axis, e.g. Move to Min:

rosys_1         | 2024-05-15 11:17:35.351 [INFO] rosys/rosys.py:69: automation started
rosys_1         | 2024-05-15 11:17:35.355 [ERROR] field_friend/hardware/z_axis_stepper_hardware.py:70: could not move zaxis to -0.197 because of zaxis is not referenced, reference first
rosys_1         | 2024-05-15 11:17:35.361 [ERROR] rosys/automation/automation.py:68: automation failed
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/field_friend/hardware/z_axis_stepper_hardware.py", line 68, in move_to
rosys_1         |     await super().move_to(position, speed)
rosys_1         |   File "/app/field_friend/hardware/z_axis.py", line 46, in move_to
rosys_1         |     raise RuntimeError('zaxis is not referenced, reference first')
rosys_1         | RuntimeError: zaxis is not referenced, reference first
rosys_1         | 
rosys_1         | The above exception was the direct cause of the following exception:
rosys_1         | 
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/rosys/automation/automation.py", line 56, in __await__
rosys_1         |     signal = send(message)
rosys_1         |              ^^^^^^^^^^^^^
rosys_1         |   File "/app/field_friend/hardware/z_axis_stepper_hardware.py", line 71, in move_to
rosys_1         |     raise Exception(f'could not move zaxis to {position} because of {error}') from error
rosys_1         | Exception: could not move zaxis to -0.197 because of zaxis is not referenced, reference first
rosys_1         | 2024-05-15 11:17:35.374 [INFO] rosys/rosys.py:69: automation stopped because an exception occurred in an automation
rosys_1         | 2024-05-15 11:17:35.377 [INFO] rosys/rosys.py:69: automation failed
rosys_1         | 2024-05-15 11:17:35.417 [ERROR] nicegui/app/app.py:118: could not move zaxis to -0.197 because of zaxis is not referenced, reference first
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/field_friend/hardware/z_axis_stepper_hardware.py", line 68, in move_to
rosys_1         |     await super().move_to(position, speed)
rosys_1         |   File "/app/field_friend/hardware/z_axis.py", line 46, in move_to
rosys_1         |     raise RuntimeError('zaxis is not referenced, reference first')
rosys_1         | RuntimeError: zaxis is not referenced, reference first
rosys_1         | 
rosys_1         | The above exception was the direct cause of the following exception:
rosys_1         | 
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/app/nicegui/background_tasks.py", line 52, in _handle_task_result
rosys_1         |     task.result()
rosys_1         |   File "/app/rosys/automation/automation.py", line 56, in __await__
rosys_1         |     signal = send(message)
rosys_1         |              ^^^^^^^^^^^^^
rosys_1         |   File "/app/field_friend/hardware/z_axis_stepper_hardware.py", line 71, in move_to
rosys_1         |     raise Exception(f'could not move zaxis to {position} because of {error}') from error
rosys_1         | Exception: could not move zaxis to -0.197 because of zaxis is not referenced, reference first

Is this a bug, or am I missing something to set these functions up correctly?

Cannot initizalize ESP

Hello.

In order to initialize the ESP, the robot brain has to configure some of its GPIO pins. (rosys/hardware/robot_brain.py enable_esp)
Since the container runs rosys as user "zauberzeug", it does not have the permissions to write to /sys/class/gpio/export or /sys/class/gpio/unexport.
image
image

Mowing: not selecting new field once a mowing was already executed

I have marked out a test area using the U4 and set the corner points by recording with the robot. Then I started mowing this area which worked fine.
Once the mowing was done I deleted the boundary of this test area and set a new one.
When starting the mowing automation on this new test area, the automation still calculated on the old field.

FieldFriend rb26 not working as intended - Input delay when steered manually

Hello,

When working on a FieldFriend robot of an older version - Not sure if its a version label, but it says zauberzeug@rb26 in the terminal - the robots manual steering is very delayed.
I.e. the robot starts driving after having released Shift+ArrowUp. It drives at a fixed speed that is not affected by changing the speed value in the nicegui. It also does not seem to brake and instead rolls for about another meter slowing down to a stand still.
When using the Joystick it is also very delayed.
When I first had this issue I was able to control the robot through the android App, which worked perfectly fine.
After a while, though, the device could not be found anymore and the driving directions forward/backward have inverted. So it drives backwards when it should drive forwards.

Issues are:
- Delayed and faulty reaction to Movement Inputs
- Not able to find the robot via Bluetooth in the Android App
- The whole NiceGui is quite slow to react to any button presses
- No image detected where the output of the camera looking down at the ground should

I can print you multiple outputs of ./docker.sh l rosys, because I had another issue with the nicegui not working until commented out a few lines of code.

The first Error Output:

Details

rosys_1         | AttributeError: 'NoneType' object has no attribute 'name'
rosys_1         | 2024-04-15 15:36:48.277 [INFO] rosys/vision/detector_hardware.py:45: trying reconnect 26e999ba-9ee4-4940-af33-31dff177bf09
rosys_1         | 2024-04-15 15:36:48.277 [INFO] rosys/vision/detector_hardware.py:57: connecting to detector at ws://localhost:8004
rosys_1         | 2024-04-15 15:36:48.280 [INFO] rosys/vision/detector_hardware.py:45: trying reconnect 20792983-3cd7-4178-9f15-ec1925bec868
rosys_1         | 2024-04-15 15:36:48.281 [INFO] rosys/vision/detector_hardware.py:57: connecting to detector at ws://localhost:8005
rosys_1         | 2024-04-15 15:36:48.402 [INFO] rosys/vision/detector_hardware.py:59: connected successfully
rosys_1         | 2024-04-15 15:36:48.403 [INFO] rosys/vision/detector_hardware.py:59: connected successfully
rosys_1         | 2024-04-15 15:36:48.457 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:48.861 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:49.462 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:49.866 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:50.303 [INFO] field_friend/navigation/gnss.py:123: Found port: /dev/ttyACM1 - Septentrio USB Device - CDC Abstract Control Model (ACM)
rosys_1         | 2024-04-15 15:36:50.304 [INFO] field_friend/navigation/gnss.py:125: Found GNSS device: /dev/ttyACM1
rosys_1         | 2024-04-15 15:36:50.305 [INFO] field_friend/navigation/gnss.py:133: Connecting to GNSS device "/dev/ttyACM1"...
rosys_1         | 2024-04-15 15:36:50.306 [INFO] field_friend/navigation/gnss.py:139: Connected to GNSS device "/dev/ttyACM1"
rosys_1         | 2024-04-15 15:36:50.711 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:50.974 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:51.002 [INFO] rosys/rosys.py:69: Enabling ESP: done
rosys_1         | 2024-04-15 15:36:51.819 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:52.280 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:52.860 [INFO] field_friend/vision/camera_configurator.py:26: updating camera config
rosys_1         | 2024-04-15 15:36:52.869 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:53.293 [WARNING] rosys/hardware/lizard_firmware.py:69: Could not read Lizard version from P0
rosys_1         | 2024-04-15 15:36:53.864 [ERROR] nicegui/nicegui.py:159: 'NoneType' object has no attribute 'name'
rosys_1         |   + Exception Group Traceback (most recent call last):
rosys_1         |   |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
rosys_1         |   |     yield
rosys_1         |   |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
rosys_1         |   |     async with anyio.create_task_group() as task_group:
rosys_1         |   |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
rosys_1         |   |     raise BaseExceptionGroup(
rosys_1         |   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
rosys_1         |   +-+---------------- 1 ----------------
rosys_1         |     | Traceback (most recent call last):
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
rosys_1         |     |     await self.app(scope, receive, _send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
rosys_1         |     |     with collapse_excgroups():
rosys_1         |     |   File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
rosys_1         |     |     self.gen.throw(typ, value, traceback)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
rosys_1         |     |     raise exc
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
rosys_1         |     |     response = await self.dispatch_func(request, call_next)
rosys_1         |     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |     |   File "/app/nicegui/middlewares.py", line 10, in dispatch
rosys_1         |     |     response = await call_next(request)
rosys_1         |     |                ^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
rosys_1         |     |     raise app_exc
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
rosys_1         |     |     await self.app(scope, receive_or_disconnect, send_no_error)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 24, in __call__
rosys_1         |     |     await responder(scope, receive, send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 44, in __call__
rosys_1         |     |     await self.app(scope, receive, self.send_with_gzip)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
rosys_1         |     |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
rosys_1         |     |     raise exc
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
rosys_1         |     |     await app(scope, receive, sender)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
rosys_1         |     |     await self.middleware_stack(scope, receive, send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
rosys_1         |     |     await route.handle(scope, receive, send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
rosys_1         |     |     await self.app(scope, receive, send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
rosys_1         |     |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
rosys_1         |     |     raise exc
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
rosys_1         |     |     await app(scope, receive, sender)
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
rosys_1         |     |     response = await func(request)
rosys_1         |     |                ^^^^^^^^^^^^^^^^^^^
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
rosys_1         |     |     raise e
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
rosys_1         |     |     raw_response = await run_endpoint_function(
rosys_1         |     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |     |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
rosys_1         |     |     return await dependant.call(**values)
rosys_1         |     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |     |   File "/app/nicegui/page.py", line 104, in decorated
rosys_1         |     |     result = func(*dec_args, **dec_kwargs)
rosys_1         |     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |     |   File "/app/field_friend/interface/pages/main_page.py", line 19, in page
rosys_1         |     |     self.content(devmode=False)
rosys_1         |     |   File "/app/field_friend/interface/pages/main_page.py", line 34, in content
rosys_1         |     |     operation(self.system, leaflet_map_landing)
rosys_1         |     |   File "/app/field_friend/interface/components/operation.py", line 134, in __init__
rosys_1         |     |     ui.label(f'Do you want to continue the canceled {"mowing"  if self.automations_toggle.value == "mowing" else f"weeding on {self.system.weeding.current_row.name}"}?').classes(
rosys_1         |     |                                                                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |     | AttributeError: 'NoneType' object has no attribute 'name'
rosys_1         |     +------------------------------------
rosys_1         | 
rosys_1         | During handling of the above exception, another exception occurred:
rosys_1         | 
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
rosys_1         |     await self.app(scope, receive, _send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
rosys_1         |     with collapse_excgroups():
rosys_1         |   File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
rosys_1         |     self.gen.throw(typ, value, traceback)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
rosys_1         |     raise exc
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
rosys_1         |     response = await self.dispatch_func(request, call_next)
rosys_1         |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/app/nicegui/middlewares.py", line 10, in dispatch
rosys_1         |     response = await call_next(request)
rosys_1         |                ^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
rosys_1         |     raise app_exc
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
rosys_1         |     await self.app(scope, receive_or_disconnect, send_no_error)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 24, in __call__
rosys_1         |     await responder(scope, receive, send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 44, in __call__
rosys_1         |     await self.app(scope, receive, self.send_with_gzip)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
rosys_1         |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
rosys_1         |     raise exc
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
rosys_1         |     await app(scope, receive, sender)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
rosys_1         |     await self.middleware_stack(scope, receive, send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
rosys_1         |     await route.handle(scope, receive, send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
rosys_1         |     await self.app(scope, receive, send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
rosys_1         |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
rosys_1         |     raise exc
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
rosys_1         |     await app(scope, receive, sender)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
rosys_1         |     response = await func(request)
rosys_1         |                ^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
rosys_1         |     raise e
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
rosys_1         |     raw_response = await run_endpoint_function(
rosys_1         |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
rosys_1         |     return await dependant.call(**values)
rosys_1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/app/nicegui/page.py", line 104, in decorated
rosys_1         |     result = func(*dec_args, **dec_kwargs)
rosys_1         |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rosys_1         |   File "/app/field_friend/interface/pages/main_page.py", line 19, in page
rosys_1         |     self.content(devmode=False)
rosys_1         |   File "/app/field_friend/interface/pages/main_page.py", line 34, in content
rosys_1         |     operation(self.system, leaflet_map_landing)
rosys_1         |   File "/app/field_friend/interface/components/operation.py", line 134, in __init__
rosys_1         |     ui.label(f'Do you want to continue the canceled {"mowing"  if self.automations_toggle.value == "mowing" else f"weeding on {self.system.weeding.current_row.name}"}?').classes(
rosys_1

After commenting out the following code in field_friend/components/operation.py lines 133-139, the nicegui was working.

        # with ui.dialog() as self.dialog, ui.card():
        #     ui.label(f'Do you want to continue the canceled {"mowing"  if self.automations_toggle.value == "mowing" else f"weeding on {self.system.weeding.current_row.name}"}?').classes(
        #         'text-lg')
        #     with ui.row():
        #         ui.button('Yes', on_click=lambda: self.dialog.submit('Yes'))
        #         ui.button('No', on_click=lambda: self.dialog.submit('No'))
        #         ui.button('Cancel', on_click=lambda: self.dialog.submit('Cancel'))

Second Error output:

Details

rosys_1         | IndexError: pop from empty list
rosys_1         | 2024-04-15 16:48:16.741 [ERROR] rosys/rosys.py:206: error in "RobotHardware.update"
rosys_1         | Traceback (most recent call last):
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/rosys/rosys.py", line 200, in _repeat_one_handler
rosys_1         |     await invoke(handler)
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/rosys/helpers.py", line 18, in invoke
rosys_1         |     result = await result
rosys_1         |              ^^^^^^^^^^^^
rosys_1         |   File "/home/zauberzeug/.local/lib/python3.11/site-packages/rosys/hardware/robot.py", line 66, in update
rosys_1         |     cast(ModuleHardware, module).handle_core_output(time, words)
rosys_1         |   File "/app/field_friend/hardware/y_axis.py", line 201, in handle_core_output
rosys_1         |     self.end_l = int(words.pop(0)) == 0
rosys_1         |                      ^^^^^^^^^^^^
rosys_1         | Error grabbing logs: unexpected EOF

So far i tried removing the rosys and nicegui folders in the field_friend directory and starting the dockers with ./docker.sh U.
As well as going around in the code lines indicated in the error outputs, which did not help so I reset my own changes to the code.

I was not able to figure out why this delay is happening or how to fix it. If anyone could help me with this it would be highly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.