Skip to content

Ports in Condition Node #123

@Sarath18

Description

@Sarath18

I am unable to find a way to use input ports in the condition node. The documentation has examples on the same, only for action nodes and not condition nodes. The only workaround I can think of now is to use convert the condition node to the action node. There must be a proper solution to this as the documentation also states:

ConditionNodes are equivalent to ActionNodes, but they are always atomic and synchronous, i.e. they must not return RUNNING.

My behaviour tree structure is as follows:

<root main_tree_to_execute="BehaviorTree">
    <!-- ////////// -->
    <BehaviorTree ID="BehaviorTree">
        <Sequence>
            <Condition ID="WaypointReached" threshold_distance="2"/>
            <Action ID="PublishNextWaypoint"/>
        </Sequence>
    </BehaviorTree>
    <!-- ////////// -->
    <TreeNodesModel>
        <Action ID="PublishNextWaypoint"/>
        <Condition ID="WaypointReached">
            <input_port name="threshold_distance" default="2">Threshold distance to waypoint</input_port>
        </Condition>
    </TreeNodesModel>
    <!-- ////////// -->
</root>

I want to use threshold_distance input port in the WaypointReached condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions