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

city_intersection worlds city_intersection.wbt file is broken when loaded into Webots #261

Closed
3 tasks done
abanuelo opened this issue May 9, 2024 · 1 comment · Fixed by #279
Closed
3 tasks done
Assignees
Labels
status: valid Issue is valid and will be worked on type: bug Something isn't working

Comments

@abanuelo
Copy link
Contributor

abanuelo commented May 9, 2024

System Details

  1. Python version: 3.10.12
  2. Scenic Version: 3.0.0b2
  3. Operating System: Linux
  4. Simulator Version: Webots 2023a

Detailed Description

  1. When you load the city_intersection.wbt file into Webots, it generates the stack trace below
  2. scenic runs when you load the city_intersection.wbt file
  3. Error log:
INFO: scenic_supervisor: Starting controller: /home/ubuntu/Scenic/venv/bin/python -u scenic_supervisor.py
WARNING: autonomous_vehicle: Could not find controller file:
WARNING: autonomous_vehicle: Expected either: autonomous_vehicle, autonomous_vehicle.jar, autonomous_vehicle.class, autonomous_vehicle.py, autonomous_vehicle.m  or Dockerfile
INFO: autonomous_vehicle: Try to compile the C/C++ source code, to get a new executable file.
WARNING: autonomous_vehicle: Starts the <generic> controller instead.
INFO: <generic>: Starting controller: /software/webotsR2023a/resources/projects/controllers/generic/generic
WARNING: autonomous_vehicle: Could not find controller file:
WARNING: autonomous_vehicle: Expected either: autonomous_vehicle, autonomous_vehicle.jar, autonomous_vehicle.class, autonomous_vehicle.py, autonomous_vehicle.m  or Dockerfile
INFO: autonomous_vehicle: Try to compile the C/C++ source code, to get a new executable file.
WARNING: autonomous_vehicle: Starts the <generic> controller instead.
INFO: <generic>: Starting controller: /software/webotsR2023a/resources/projects/controllers/generic/generic
Traceback (most recent call last; use -b to show Scenic internals):
  File "/home/ubuntu/actions/Scenic/examples/webots/city_intersection/controllers/scenic_supervisor/scenic_supervisor.py", line 26, in <module>
    sim_results = simulator.simulate(scene, timestep=0.5, 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/actions/Scenic/examples/webots/city_intersection/city_intersection.scenic", line 55, in applyTo
    target_path = self.path + "/"
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
Loading Scenic scenario ../../city_intersection.scenic
Starting new simulation...
  Starting simulation 1...
Other Car Visible: False
WARNING: 'scenic_supervisor' controller exited with status: 1.

Steps To Reproduce

  1. Open up webots
  2. Load in world file city_intersection.wbt
  3. Click the run button
    ** Note make sure that the python path is pointing to the python installed within the venv created for Scenic related dependencies

Issue Submission Checklist

  • I am reporting an issue, not asking a question
  • I checked the open and closed issues, forum, etc. and have not found any solution
  • I have provided all necessary code, etc. to reproduce the issue
@abanuelo abanuelo added type: bug Something isn't working status: triage Issue needs to be assessed labels May 9, 2024
@abanuelo
Copy link
Contributor Author

abanuelo commented May 9, 2024

Following up on this example, I noticed that there were additional steps needed to run this example, namely: running make within the controllers directory. After that was done and I loaded up the city_intersection.wbt file within webots I faced this issue:

WARNING: scenic_supervisor: Forced termination (because process didn't terminate itself after 1 second).
INFO: scenic_supervisor: Starting controller: /home/ubuntu/Scenic/venv/bin/python -u scenic_supervisor.py
INFO: autonomous_vehicle: Starting controller: /home/ubuntu/Scenic/examples/webots/city_intersection/controllers/autonomous_vehicle/autonomous_vehicle
INFO: autonomous_vehicle: Starting controller: /home/ubuntu/Scenic/examples/webots/city_intersection/controllers/autonomous_vehicle/autonomous_vehicle
Traceback (most recent call last; use -b to show Scenic internals):
  File "/home/ubuntu/Scenic/examples/webots/city_intersection/controllers/scenic_supervisor/scenic_supervisor.py", line 26, in <module>
    sim_results = simulator.simulate(scene, timestep=0.5, 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/examples/webots/city_intersection/city_intersection.scenic", line 55, in applyTo
    target_path = self.path + "/"
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
Loading Scenic scenario ../../city_intersection.scenic
Starting new simulation...
  Starting simulation 1...
Other Car Visible: False
WARNING: 'scenic_supervisor' controller exited with status: 1.
Error: could not open "../../images/live_img.jpeg" for writing
Error: could not open "../../images/live_img.jpeg" for writing
Error: could not open "../../images/live_img.jpeg" for writing
Error: could not open "../../images/live_img.jpeg" for writing
Error: could not open "../../images/live_img.jpeg" for writing

@abanuelo abanuelo added status: valid Issue is valid and will be worked on and removed status: triage Issue needs to be assessed labels May 15, 2024
@Eric-Vin Eric-Vin mentioned this issue Jun 11, 2024
4 tasks
@Eric-Vin Eric-Vin linked a pull request Jun 11, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: valid Issue is valid and will be worked on type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants