Skip to content

Existential connection dependency based on configuration #7

@pcanelas

Description

@pcanelas

Problem/Context

Connections only exist in components if a specific flag is set.
For instance, in the Loopback Simulator - Navigation Stack 2, the parameter publish_map_odom_tf defines if a broadcast from the content of map_frame_id to the content of odom_frame_id should happen.

In the Robotics Stack Exchange there is also an issue [34954] where the openni_node only publishes to camera/depth/points if the parameter depth_registration is set to true.

Proposed Solution

The proposed solution is to extend the current language syntax to add if expressions to connections.
For instance:


node type openni_node_type {
    optional param depth_frame_id: string = "/openni_depth_optical_frame";
    optional param rgb_frame_id: string = "/openni_rgb_optical_frame";
    optional param image_mode: Modes = VGA30Hz;
    optional param depth_mode: Modes = VGA30Hz;
    optional param use_indices: bool = false;
    optional param depth_registration: bool = false;
    optional param depth_time_offset: Second where {_ >= -1 and _ <= 1} = 0.0;
    optional param image_time_offset: Second where {_ >= -1 and _ <= 1} = 0.0;

    publishes to camera/depth/points: sensor_msgs/PointCloud2 where {count(publishers(_)) == 1} if {depth_registration};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions