ros_sugar.ui_node.elements#
Module Contents#
Functions#
Deserialize additional elements and add them |
|
Creates a UI element for an input topic |
|
Creates main section for all the UI inputs |
|
Creates a styled grid for the number of inputs |
|
Creates a UI element for an output topic |
|
Creates main section for all the UI outputs |
|
Creates a styled grid for the number of outputs |
|
Creates a UI element based on the setting’s type and validators |
|
Creates a UI element for a component to show and update the config parameters |
|
Remove the last child in logging_card.children with a matching id. |
|
Update logging card |
API#
- ros_sugar.ui_node.elements.add_additional_ui_elements(input_elements: List[Tuple] | None, output_elements: List[Tuple] | None)#
Deserialize additional elements and add them
- ros_sugar.ui_node.elements.input_topic_card(topic_name: str, topic_type: str, column_class: str = '') FT#
Creates a UI element for an input topic
- Parameters:
topic_name (str) – Topic name
topic_type (str) – Topic message type
- Returns:
Input topic UI element
- ros_sugar.ui_node.elements.styled_main_inputs_container(inputs_grid_div_id: str) FT#
Creates main section for all the UI inputs
- Returns:
Main inputs card
- Return type:
FT Card
- ros_sugar.ui_node.elements.styled_inputs_grid(number_of_inputs: int) tuple#
Creates a styled grid for the number of inputs
- Parameters:
number_of_inputs (int) – Number of input cards
- Returns:
Styled Grid, Style class to use for each element in the grid
- Return type:
tuple
- ros_sugar.ui_node.elements.output_topic_card(topic_name: str, topic_type: str, column_class: str = '') FT#
Creates a UI element for an output topic
- Parameters:
topic_name (str) – Topic name
topic_type (str) – Topic message type
- Returns:
Output topic UI element
- ros_sugar.ui_node.elements.styled_main_outputs_container(outputs_grid_div_id: str) FT#
Creates main section for all the UI outputs
- Returns:
Main outputs card
- Return type:
FT Card
- ros_sugar.ui_node.elements.styled_outputs_grid(number_of_outputs: int) tuple#
Creates a styled grid for the number of outputs
- Parameters:
number_of_outputs (int) – Number of output cards
- Returns:
Styled Grid, Style class to use for each element in the grid
- Return type:
tuple
- ros_sugar.ui_node.elements.settings_ui_element(setting_name: str, setting_details: dict, field_type, type_args, input_name=None)#
Creates a UI element based on the setting’s type and validators
- Parameters:
setting_name (str) – Config parameter name
setting_details (dict) – Details of the parsed config
- Returns:
Setting parameter UI element
- ros_sugar.ui_node.elements.component_settings_div(component_name: str, settings_col_cls: str, ui_elements, nested_ui_elements)#
Creates a UI element for a component to show and update the config parameters
- Parameters:
component_name (str) – Name of the component (ROS2 node name)
settings_col_cls (str) – UI Div columns span in the display grid
ui_elements (List) – A set ot UI elements for each parameter in the component config
- Returns:
Component config UI element
- ros_sugar.ui_node.elements.remove_child_from_logging_card(logging_card, target_id='loading-dots')#
Remove the last child in logging_card.children with a matching id.
- ros_sugar.ui_node.elements.update_logging_card_with_loading(logging_card)#
Update logging card