Open abanuelo opened 2 months ago
In this case it's the Webots world files themselves that are incompatible with < Webots 2022b, so it's entirely Webots that broke backwards compatibility and Scenic is completely unrelated. Regardless I don't think there's a pressing need to spend time adding support for old Webots versions unless there's a compelling reason, though it would be good to maintain support for any versions we currently support as long as it's not too much additional work.
Will follow up with documentation updates and .wbt file updates!
Version of Webots 2022b isn't entirely backward compatible with some of the working examples in the repo. Namely if you run the adhoc.wbt
file it throws:
./webots --stdout --stderr
WARNING: '/home/ubuntu/Scenic/examples/webots/generic/webots_data/worlds/adhoc.wbt': This file was created by Webots R2023a while you are using Webots R2022b. Forward compatibility may not work.
WARNING: '/home/ubuntu/Scenic/examples/webots/generic/webots_data/worlds/adhoc.wbt': This file was created by Webots R2023a while you are using Webots R2022b. Forward compatibility may not work.
WARNING: '/home/ubuntu/.cache/Cyberbotics/Webots/assets/0dcadc7dae2ab58631659c60077ade08949c5518': This file was created by Webots R2023a while you are using Webots R2022b. Forward compatibility may not work.
WARNING: '/home/ubuntu/.cache/Cyberbotics/Webots/assets/1d3a23272010fb5f44e231f939f3d35fd911f51e': This file was created by Webots R2023a while you are using Webots R2022b. Forward compatibility may not work.
INFO: scenic_supervisor: Starting controller: python3 -u scenic_supervisor.py
WARNING: '/home/ubuntu/Scenic/examples/webots/generic/webots_data/protos/ScenicObjectWithPhysics.proto': This file was created by Webots R2023a while you are using Webots R2022b. Forward compatibility may not work.
Traceback (most recent call last; use -b to show Scenic internals):
File "/home/ubuntu/Scenic/examples/webots/generic/webots_data/controllers/scenic_supervisor/scenic_supervisor.py", line 16, in <module>
simulator.simulate(scene, verbosity=2)
File "/home/ubuntu/Scenic/src/scenic/simulators/webots/simulator.py", line 56, in createSimulation
return WebotsSimulation(
File "/home/ubuntu/Scenic/src/scenic/simulators/webots/simulator.py", line 82, in __init__
super().__init__(scene, timestep=timestep, **kwargs)
File "/home/ubuntu/Scenic/src/scenic/simulators/webots/simulator.py", line 85, in setup
super().setup()
File "/home/ubuntu/Scenic/src/scenic/simulators/webots/simulator.py", line 173, in createObjectInSimulator
densityField = getFieldSafe(webotsObj, "density")
File "/home/ubuntu/Scenic/src/scenic/simulators/webots/simulator.py", line 280, in getFieldSafe
if isinstance(field._ref, ctypes.c_void_p) and field._ref.value is not None:
AttributeError: 'Field' object has no attribute '_ref'
Loading Scenic scenario ../../../adhoc.scenic
Starting new simulation...
Starting simulation 1...
WARNING: 'scenic_supervisor' controller exited with status: 1.
./webots: line 102: 3757 Segmentation fault (core dumped) "$webots_home/bin/webots-bin" "$@"
I will add to the documentation that support for versions 2023a and above will be the defacto standard.
System Details
Detailed Description
examples/webots
folder with a version of Webots < 2022b, it throws an error:Steps To Reproduce
.wbt
into webots for any given example in theexamples/webots
folder.Question: Do we want to support older version of webots? My guess is no given there were many breaking changes to the interface as described here: https://cyberbotics.com/doc/guide/from-2022a-to-2022b
Issue Submission Checklist