Skip to content

Commit

Permalink
Fix docs rendering for color parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar-sanjeeev committed Dec 7, 2024
1 parent a2711c5 commit c6431b2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 22 deletions.
10 changes: 6 additions & 4 deletions pyrobosim/pyrobosim/core/hallway.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ def __init__(
:type conn_angle: float, optional
:param conn_points: If using "points" connection method, specifies the hallway points.
:type conn_points: list[(float, float)], optional
:param color: Visualization color. Input can be
- an (R, G, B) tuple, list in the range (0.0, 1.0),
- a string (e.g., "red")
- a hexadecimal (e.g., "#FF0000").
:param 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").
:type color: list[float] | tuple[float, float, float] | str
:param wall_width: Width of hallway walls, in meters.
:type wall_width: float, optional
Expand Down
12 changes: 7 additions & 5 deletions pyrobosim/pyrobosim/core/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ def __init__(
:type pose: :class:`pyrobosim.utils.pose.Pose`
:param parent: Parent of the location (typically a :class:`pyrobosim.core.room.Room`)
:type parent: Entity
:param color: Visualization color. Input can be
- an (R, G, B) tuple, list in the range (0.0, 1.0),
- a string (e.g., "red")
- a hexadecimal (e.g., "#FF0000").
If using a category with a defined color, this parameter overrides the category color.
:param 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").
If using a category with a defined color, this parameter overrides the category color.
:type color: list[float] | tuple[float, float, float] | str
:param is_open: If True, the location is open, otherwise it is closed.
:type is_open: bool, optional
Expand Down
12 changes: 7 additions & 5 deletions pyrobosim/pyrobosim/core/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ def __init__(
:type pose: :class:`pyrobosim.utils.pose.Pose`
:param inflation_radius: Inflation radius for polygon collision checks.
:type inflation_radius: float, optional
:param color: Visualization color. Input can be
- an (R, G, B) tuple, list in the range (0.0, 1.0),
- a string (e.g., "red")
- a hexadecimal (e.g., "#FF0000").
If using a category with a defined color, this parameter overrides the category color.
:param 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").
If using a category with a defined color, this parameter overrides the category color.
:type color: list[float] | tuple[float, float, float] | str
"""
self.category = category
Expand Down
10 changes: 6 additions & 4 deletions pyrobosim/pyrobosim/core/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ def __init__(
:type radius: float, optional
:param height: Robot height, in meters.
:type height: float, optional
:param color: Visualization color. Input can be
- an (R, G, B) tuple, list in the range (0.0, 1.0),
- a string (e.g., "red")
- a hexadecimal (e.g., "#FF0000").
:param 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").
:type color: list[float] | tuple[float, float, float] | str
:param max_linear_velocity: The maximum linear velocity magnitude, in m/s.
:type max_linear_velocity: float
Expand Down
10 changes: 6 additions & 4 deletions pyrobosim/pyrobosim/core/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ def __init__(
:type name: str, optional
:param footprint: Point list or Shapely polygon describing the room 2D footprint (required).
:type footprint: :class:`shapely.geometry.Polygon`/list[:class:`pyrobosim.utils.pose.Pose`]
:param color: Visualization color. Input can be
- an (R, G, B) tuple, list in the range (0.0, 1.0),
- a string (e.g., "red")
- a hexadecimal (e.g., "#FF0000").
:param 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").
:type color: list[float] | tuple[float, float, float] | str
:param wall_width: Width of room walls, in meters.
:type wall_width: float, optional
Expand Down

0 comments on commit c6431b2

Please sign in to comment.