irsim.config.palette_param ========================== .. py:module:: irsim.config.palette_param .. autoapi-nested-parse:: Default colors of everything IR-SIM draws. The values are Okabe-Ito based (with a second green from Paul Tol's muted scheme), so they stay distinguishable under common forms of colour-vision deficiency and keep robots, sensors and obstacles apart in grayscale print. Any color given in YAML or code overrides them. They are read when an object or a plot is created, so changing them before ``irsim.make()`` restyles every following scene:: from irsim.config import palette_param palette_param.robot = "#0072B2" palette_param.cycle = ["#0072B2", "#D55E00", "#009E73"] :ivar robot: Robots with ``diff``, ``omni``, ``omni_angular`` or custom kinematics. :ivar robot_acker: Car-like (``acker``) robots. :ivar obstacle: Obstacles, grid maps and any object without a role color. :ivar pushable: Pushable objects (finite ``mass``, not static) without kinematics, which only move when ``collision_mode: contact`` pushes them, so they stand out from static obstacles. :ivar arrow: Heading arrow drawn on top of a body. :ivar fov: Field-of-view fill. :ivar fov_edge: Field-of-view outline. :ivar lidar: Lidar beams. :ivar laser_highlight: Beams singled out with ``set_laser_color``. :ivar fmcw_zero_velocity: FMCW beams with no radial velocity. :ivar fmcw_positive_velocity: FMCW beams moving away. :ivar fmcw_negative_velocity: FMCW beams moving closer. :ivar marker: Points drawn with ``env.draw_points``. :ivar path: Lines drawn with ``env.draw_trajectory`` and ``env.draw_box``. :ivar quiver: Arrows drawn with ``env.draw_quiver``. :ivar cycle: Colors handed out in turn to the objects of a group configured with ``color: 'cycle'``; it starts with the robot color so a single robot looks the same either way. Attributes ---------- .. autoapisummary:: irsim.config.palette_param.DEFAULT_CYCLE Classes ------- .. autoapisummary:: irsim.config.palette_param.PaletteParam Functions --------- .. autoapisummary:: irsim.config.palette_param.bind Module Contents --------------- .. py:data:: DEFAULT_CYCLE :value: ('#009E73', '#0072B2', '#E69F00', '#CC79A7', '#56B4E9', '#D55E00', '#F0E442', '#117733') .. py:class:: PaletteParam Default colors, one attribute per kind of drawing (see the module docstring). .. py:attribute:: robot :type: str :value: '#009E73' .. py:attribute:: robot_acker :type: str :value: '#117733' .. py:attribute:: obstacle :type: str :value: 'k' .. py:attribute:: pushable :type: str :value: '#E69F00' .. py:attribute:: arrow :type: str :value: '#F0E442' .. py:attribute:: fov :type: str :value: '#56B4E9' .. py:attribute:: fov_edge :type: str :value: '#0072B2' .. py:attribute:: lidar :type: str :value: '#CC3311' .. py:attribute:: laser_highlight :type: str :value: '#56B4E9' .. py:attribute:: fmcw_zero_velocity :type: str :value: '#56B4E9' .. py:attribute:: fmcw_positive_velocity :type: str :value: '#CC3311' .. py:attribute:: fmcw_negative_velocity :type: str :value: '#0072B2' .. py:attribute:: marker :type: str :value: '#CC79A7' .. py:attribute:: path :type: str :value: '#0072B2' .. py:attribute:: quiver :type: str :value: 'k' .. py:attribute:: cycle :type: list[str] :value: ['#009E73', '#0072B2', '#E69F00', '#CC79A7', '#56B4E9', '#D55E00', '#F0E442', '#117733'] .. py:method:: cycle_color(index: int) -> str Color of the ``index``-th object of a group drawn with ``color: 'cycle'``. .. py:function:: bind(instance: PaletteParam) -> None Bind instance to default index 0 and update current alias.