Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in bt ports of type float #256

Closed
SteveMacenski opened this issue Feb 1, 2021 · 2 comments
Closed

Bug in bt ports of type float #256

SteveMacenski opened this issue Feb 1, 2021 · 2 comments

Comments

@SteveMacenski
Copy link
Contributor

SteveMacenski commented Feb 1, 2021

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"),
    };
  }


@facontidavide
Copy link
Collaborator

Fixed. The weird thing is that it should throw, as shown here:

https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/include/behaviortree_cpp_v3/basic_types.h#L68

facontidavide added a commit that referenced this issue Feb 3, 2021
@SteveMacenski
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants