Skip to content

Bug in bt ports of type float #256

Closed
@SteveMacenski

Description

@SteveMacenski

Moving ticket from Nav2 on BT.CPP: ros-navigation/navigation2#2148

When changing a custom node, the ports aren't working properly it appears from @KvE-sax report:

<TemplateCondition port_test_value="0.60"/>

BT::NodeStatus TemplateCondition::tick()
{
  std::lock_guard<std::mutex> lock(mutex_);

  float port_test_value;
  getInput("port_test_value", port_test_value);
  RCLCPP_INFO(node_->get_logger(), 
    "[Template Condition][tick] port_test_value: %f ", port_test_value);
}
  }

static BT::PortsList providedPorts()
  {
    return { 
      BT::InputPort<float>("port_test_value", 1, "Discription of value"),
    };
  }


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions