pyrobosim.core.hallway.Hallway.__init__
- Hallway.__init__(*, name: str, room_start: Room, room_end: Room, width: float = 0.0, conn_method: str = 'auto', offset: float = 0.0, conn_angle: float = 0.0, conn_points: Sequence[Sequence[float]] = [], color: Sequence[float] = [0.4, 0.4, 0.4], wall_width: float = 0.2, is_open: bool = True, is_locked: bool = False) None
Creates a Hallway instance between two rooms.
- Hallways can be connected with a few different connection methods. These are:
"auto": Draws straight line between room centroids (default)"angle": Directly specifies an angle leaving the centroid of the start room."points": Specify an explicit list of points defining the hallway.
- Parameters:
name – Hallway name.
room_start – Room object for the start of the hallway (required).
room_end – Room object for the end of the hallway (required).
width – Width of the hallway, in meters (required).
conn_method – Connection method (see description above).
offset – Perpendicular offset from centroid of start point (valid if using
"auto"or"angle"connection methods)conn_angle – If using
"angle"connection method, specifies the angle of the hallway in radians (0 points to the right).conn_points – If using “points” connection method, specifies the hallway points.
color –
Visualization color. Input can be:
an (R, G, B) tuple or list in the range (0.0, 1.0).
a string (e.g., “red”).
a hexadecimal string (e.g., “#FF0000”).
wall_width – Width of hallway walls, in meters.
is_open – If True, the hallway is open, otherwise it is closed.
is_locked – If True, the hallway is locked, meaning it cannot be opened or closed.