agents.components.imagestovideo
#
Module Contents#
Classes#
This component generates ROS video messages from input image messages. A video message is a collection of image messages that have a perceivable motion. I.e. the primary task of this component is to make intentionality decisions about what sequence of consecutive images should be treated as one coherent temporal sequence. The motion estimation method used for selecting images for a video can be configured in component config. |
API#
- class agents.components.imagestovideo.VideoMessageMaker(*, inputs: List[agents.ros.Topic], outputs: List[agents.ros.Topic], config: Optional[agents.config.VideoMessageMakerConfig] = None, trigger: Union[agents.ros.Topic, List[agents.ros.Topic]], component_name: str, **kwargs)#
Bases:
agents.components.component_base.Component
This component generates ROS video messages from input image messages. A video message is a collection of image messages that have a perceivable motion. I.e. the primary task of this component is to make intentionality decisions about what sequence of consecutive images should be treated as one coherent temporal sequence. The motion estimation method used for selecting images for a video can be configured in component config.
- Parameters:
inputs (list[Topic]) – The input topics for the object detection. This should be a list of Topic objects or FixedInput objects, limited to Image type.
outputs (list[Topic]) – The output topics for the object detection. This should be a list of Topic objects, Video type.
config (VideoMessageMakerConfig) – The configuration for the video message generation. This should be an instance of VideoMessageMakerConfig.
trigger (Union[Topic, list[Topic]]) – The trigger value or topic for the object detection. This can be a single Topic object or a list of Topic objects.
component_name (str) – The name of the video message generation component. This should be a string.
Example usage:
image_topic = Topic(name="image", msg_type="Image") video_topic = Topic(name="video", msg_type="Video") config = VideoMessageMakerConfig() video_message_maker = VideoMessageMaker( inputs=[image_topic], outputs=[video_topic], config=config, component_name="video_message_maker", )
- custom_on_activate()#
Custom configuration for creating triggers.
- create_all_subscribers()#
Override to handle trigger topics and fixed inputs. Called by parent BaseComponent
- activate_all_triggers() None #
Activates component triggers by attaching execution step to callbacks
- destroy_all_subscribers() None #
Destroys all node subscribers
- trigger(trigger: Union[agents.ros.Topic, List[agents.ros.Topic], float]) None #
Set component trigger
- validate_topics(topics: Sequence[Union[agents.ros.Topic, agents.ros.FixedInput]], allowed_topic_types: Optional[Dict[str, List[Union[Type[agents.ros.SupportedType], List[Type[agents.ros.SupportedType]]]]]] = None, topics_direction: str = 'Topics')#
Verify component specific inputs or outputs using allowed topics if provided