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

port to galactic #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/behavior_tree/BtAction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class BtAction : public BT::ActionNodeBase
rclcpp::spin_some(_node);
if (_goal_done) {
if (_result.code == rclcpp_action::ResultCode::CANCELED) {
RCLCPP_INFO(_node->get_logger(), "Goal canceled successfully");
RCLCPP_INFO(_node->get_logger(), "%s", "Goal canceled successfully");
}
return;
}
Expand All @@ -69,7 +69,7 @@ class BtAction : public BT::ActionNodeBase

/// Make sure the action server is available
if (!_action_client->wait_for_action_server(_server_timeout)) {
RCLCPP_ERROR(_node->get_logger(), "Action server not available after waiting");
RCLCPP_ERROR(_node->get_logger(), "%s", "Action server not available after waiting");
return BT::NodeStatus::FAILURE;
}

Expand All @@ -80,7 +80,7 @@ class BtAction : public BT::ActionNodeBase
&BtAction<ActionT>::feedback_callback, this, _1, _2);

send_goal_options.result_callback = std::bind(&BtAction<ActionT>::result_callback, this, _1);
RCLCPP_INFO(_node->get_logger(), "Sending goal to " + _server_name);
RCLCPP_INFO(_node->get_logger(), "%s %s", "Sending goal to ", _server_name.c_str());

auto goal_handle_future = _action_client->async_send_goal(goal, send_goal_options);
if (rclcpp::spin_until_future_complete(_node, goal_handle_future, _server_timeout) !=
Expand Down
2 changes: 1 addition & 1 deletion plugins/action/fibonacci_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Fibonacci : public BtService<FibonacciService>

BT::NodeStatus handle_response(FibonacciService::Response::SharedPtr response) override
{
RCLCPP_INFO(_node->get_logger(), "Service call complete: " + response->message);
RCLCPP_INFO(_node->get_logger(), "%s %s", "Service call complete: ", response->message.c_str());
return BT::NodeStatus::SUCCESS;
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/BtEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void BtEngine::load_tree()
auto blackboard = Blackboard::create();
blackboard->set<rclcpp::Node::SharedPtr>("node", std::make_shared<rclcpp::Node>("bt_node"));
// blackboard->set<std::shared_ptr<tf2_ros::Buffer>>("tf_buffer", tf_);
RCLCPP_INFO(this->get_logger(), "Loading tree from file: " + bt_file_path_);
RCLCPP_INFO(this->get_logger(), "%s %s", "Loading tree from file: ", bt_file_path_.c_str());
tree_ = std::make_shared<Tree>(factory_.createTreeFromFile(bt_file_path_, blackboard));
}

Expand Down Expand Up @@ -62,7 +62,7 @@ void BtEngine::add_groot_monitoring()
void BtEngine::load_plugins()
{
for (const auto & p : plugins_) {
RCLCPP_INFO(this->get_logger(), "Loading plugin: " + SharedLibrary::getOSName(p));
RCLCPP_INFO(this->get_logger(), "%s %s", "Loading plugin: @", SharedLibrary::getOSName(p).c_str());
factory_.registerFromPlugin(SharedLibrary::getOSName(p));
}
}
Expand Down