irsim.config.palette_param#
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_angularor 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 whencollision_mode: contactpushes 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_trajectoryandenv.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#
Classes#
Default colors, one attribute per kind of drawing (see the module docstring). |
Functions#
|
Bind instance to default index 0 and update current alias. |
Module Contents#
- irsim.config.palette_param.DEFAULT_CYCLE = ('#009E73', '#0072B2', '#E69F00', '#CC79A7', '#56B4E9', '#D55E00', '#F0E442', '#117733')#
- class irsim.config.palette_param.PaletteParam[源代码]#
Default colors, one attribute per kind of drawing (see the module docstring).
- robot: str = '#009E73'#
- robot_acker: str = '#117733'#
- obstacle: str = 'k'#
- pushable: str = '#E69F00'#
- arrow: str = '#F0E442'#
- fov: str = '#56B4E9'#
- fov_edge: str = '#0072B2'#
- lidar: str = '#CC3311'#
- laser_highlight: str = '#56B4E9'#
- fmcw_zero_velocity: str = '#56B4E9'#
- fmcw_positive_velocity: str = '#CC3311'#
- fmcw_negative_velocity: str = '#0072B2'#
- marker: str = '#CC79A7'#
- path: str = '#0072B2'#
- quiver: str = 'k'#
- cycle: list[str] = ['#009E73', '#0072B2', '#E69F00', '#CC79A7', '#56B4E9', '#D55E00', '#F0E442', '#117733']#
- irsim.config.palette_param.bind(instance: PaletteParam) None[源代码]#
Bind instance to default index 0 and update current alias.