Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix WheelsSimulation parameter error with RoSys 0.11 #133

Closed
wants to merge 1 commit into from

Conversation

Johannes-Thiel
Copy link
Contributor

when openig the simulation the error

Traceback (most recent call last):
  File "/Users/johannes/Documents/Zauberzeug_repo/nicegui/nicegui/client.py", line 292, in safe_invoke
    result = func(self) if len(inspect.signature(func).parameters) == 1 else func()
                                                                             ^^^^^^
  File "/Users/johannes/Documents/Zauberzeug_repo/field_friend/main.py", line 29, in startup
    system = System()
             ^^^^^^^^
  File "/Users/johannes/Documents/Zauberzeug_repo/field_friend/field_friend/system.py", line 50, in __init__
    self.field_friend = FieldFriendSimulation(robot_id=self.version)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/johannes/Documents/Zauberzeug_repo/field_friend/field_friend/hardware/field_friend_simulation.py", line 40, in __init__
    wheels = rosys.hardware.WheelsSimulation(self.WHEEL_DISTANCE)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: WheelsSimulation.__init__() takes 1 positional argument but 2 were given
2024-07-23 16:25:05.785 [ERROR] rosys/persistence/registry.py:58: failed to restore <field_friend.system.System object at 0x12fcf44d0>
Traceback (most recent call last):
  File "/Users/johannes/Documents/Zauberzeug_repo/rosys/rosys/persistence/registry.py", line 56, in restore
    module.restore(json.loads(filepath.read_text()))
  File "/Users/johannes/Documents/Zauberzeug_repo/field_friend/field_friend/system.py", line 168, in restore
    implement = self.implements.get(data.get('implement', None), None)

is thrown.

This is fixed by giving the correct arguments for WheelsSimulation init.

@Johannes-Thiel Johannes-Thiel added this to the 0.2.0 milestone Jul 23, 2024
@rodja rodja changed the title fix expected parameter error fix WheelsSimulation parameter error with RoSys 0.11 Jul 24, 2024
@pascalzauberzeug
Copy link
Contributor

Actually this does not fix the simulation for 0.11.0, it does fix it for the previous version 0.10.11, because the width parameter of WheelsSimulation was introduced in 0.11.0 with #117.

When 0.11.0 is still listed in requirements.txt, we can't merge this one.
Currently 0.11.0 is not used on robots because we are waiting for zauberzeug/rosys#154 but this should not be an issue in simulation

@Johannes-Thiel Johannes-Thiel deleted the fix-WheelsSimulation branch August 20, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants