pyrobosim.core.hallway.Hallway.__init__
- Hallway.__init__(room_start=None, room_end=None, name=None, width=0.0, conn_method='auto', offset=0, conn_angle=0, conn_points=[], color=[0.4, 0.4, 0.4], wall_width=0.2, is_open=True, is_locked=False)
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:
room_start (
pyrobosim.core.room.Room) – Room object for the start of the hallway (required).room_end (
pyrobosim.core.room.Room) – Room object for the end of the hallway (required).name (str, optional) – Hallway name.
width (float) – Width of the hallway, in meters (required).
conn_method (str, optional) – Connection method (see description above).
offset (float, optional) – Perpendicular offset from centroid of start point (valid if using
"auto"or"angle"connection methods)conn_angle (float, optional) – If using
"angle"connection method, specifies the angle of the hallway in radians (0 points to the right).conn_points (list[(float, float)], optional) – If using “points” connection method, specifies the hallway points.
color (list[float] | tuple[float, float, float] | str) –
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 (float, optional) – Width of hallway walls, in meters.
is_open (bool, optional) – If True, the hallway is open, otherwise it is closed.
is_locked (bool, optional) – If True, the hallway is locked, meaning it cannot be opened or closed.