Skip to content

Commit

Permalink
print action config with rest
Browse files Browse the repository at this point in the history
  • Loading branch information
cmraaron committed May 10, 2023
1 parent 88553d2 commit bf82feb
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/nav_to_anywhere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,6 @@ int main(int argc, char * argv[])

const auto node = std::make_shared<rclcpp::Node>("nav_to_anywhere");

const auto bt_actions = get_action_details(node);
RCLCPP_INFO(node->get_logger(), "Action config:");
for (const auto & detail : bt_actions) {
RCLCPP_INFO_STREAM(
node->get_logger(),
" name: " << detail.name << ", regex: '" << detail.regex <<
"', type: " << detail.type << ", duration: " << detail.duration
);
}

const Params params {
.topic_footprint =
node->declare_parameter<std::string>("topic_footprint", "local_costmap/published_footprint"),
Expand All @@ -159,6 +149,16 @@ int main(int argc, char * argv[])
.nav_start_time = node->get_clock()->now(),
};

const auto bt_actions = get_action_details(node);
std::stringstream ss;
for (const auto & detail : bt_actions) {
ss <<
"\n Name: " << detail.name <<
"\n Regex: '" << detail.regex << "'" <<
"\n Type: " << detail.type <<
"\n Duration: " << detail.duration;
}

RCLCPP_INFO_STREAM(
node->get_logger(), "nav_to_anywhere config:" <<
"\n Params: " <<
Expand All @@ -168,7 +168,8 @@ int main(int argc, char * argv[])
"\n Config: " <<
"\n fp loaded points: " << config.footprint_loaded.size() <<
"\n fp unloaded points: " << config.footprint_unloaded.size() <<
"\n interval (seconds): " << config.interval
"\n interval (seconds): " << config.interval <<
"\n Action Config: " << ss.str()
);
tf2_ros::TransformBroadcaster tf_broadcaster(*node);
const auto local_footprint_pub = node->create_publisher<geometry_msgs::msg::PolygonStamped>(
Expand Down

0 comments on commit bf82feb

Please sign in to comment.