Source code for scenic.simulators.webots.mars.model

"""Scenic model for Mars rover scenarios in Webots."""

import math

# Set up workspace
width = 5
height = 5
workspace = Workspace(RectangularRegion(0 @ 0, 0, width, height))

# types of objects

[docs]class Goal: """Flag indicating the goal location.""" width: 0.3 height: 0.3 webotsType: 'GOAL'
[docs]class Rover: """Mars rover.""" width: 0.5 height: 0.7 webotsType: 'ROVER'
[docs]class Debris: """Abstract class for debris scattered randomly in the workspace.""" position: Point in workspace heading: (-math.pi, math.pi)
[docs]class BigRock(Debris): """Large rock.""" width: 0.17 height: 0.17 webotsType: 'ROCK_BIG'
[docs]class Rock(Debris): """Small rock.""" width: 0.10 height: 0.10 webotsType: 'ROCK_SMALL'
[docs]class Pipe(Debris): """Pipe with variable length.""" width: 0.2 height: (0.5, 1.5) webotsType: 'PIPE'