You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a simulation with the newtonian simulator, the cars seem to not always get rendered on the location that they say they are. In the simulator, there is an if-else statement that draws a car if an object is a car and a polygon otherwise. I tried removing this statement and just drawing both, and the two do not overlap in the rendered simulation, see the screenshots.
I ran scenic examples/driving/badlyParkedCarPullingIn.scenic --2d --simulate --model scenic.simulators.newtonian.driving_model --time 200
Steps To Reproduce
Open Scenic\src\scenic\simulators\newtonian\simulator.py
Go to line 217
Replace the if-statement with:
# if hasattr(obj, "isCar") and obj.isCar:
self.rotated_car = pygame.transform.rotate(
self.car, math.degrees(obj.heading)
)
self.screen.blit(self.rotated_car, (rect_x, rect_y))
# else:
corners = [self.scenicToScreenVal(corner) for corner in obj._corners2D]
pygame.draw.polygon(self.screen, color, corners)
The only thing this should do is draw both a Polygon and a car, the logic of the location should not be changed.
4. In the terminal, run scenic examples/driving/badlyParkedCarPullingIn.scenic --2d --simulate --model scenic.simulators.newtonian.driving_model --time 200
6. See the resulting error
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
The text was updated successfully, but these errors were encountered:
System Details
Detailed Description
scenic examples/driving/badlyParkedCarPullingIn.scenic --2d --simulate --model scenic.simulators.newtonian.driving_model --time 200
Steps To Reproduce
Scenic\src\scenic\simulators\newtonian\simulator.py
The only thing this should do is draw both a Polygon and a car, the logic of the location should not be changed.
4. In the terminal, run
scenic examples/driving/badlyParkedCarPullingIn.scenic --2d --simulate --model scenic.simulators.newtonian.driving_model --time 200
6. See the resulting error
Issue Submission Checklist
The text was updated successfully, but these errors were encountered: