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

Remove debugging prints from showimage. #358

Merged
merged 1 commit into from
May 29, 2019
Merged
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
9 changes: 0 additions & 9 deletions image_tools/src/showimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ int main(int argc, char * argv[])
// Pass command line arguments to rclcpp.
rclcpp::init(argc, argv);

std::cerr << "Right after init" << std::endl;

// Initialize default demo parameters
size_t depth = rmw_qos_profile_default.depth;
rmw_qos_reliability_policy_t reliability_policy = rmw_qos_profile_default.reliability;
Expand All @@ -108,18 +106,14 @@ int main(int argc, char * argv[])
}

if (show_camera) {
std::cerr << "Creating window" << std::endl;
// Initialize an OpenCV named window called "showimage".
cv::namedWindow("showimage", cv::WINDOW_AUTOSIZE);
cv::waitKey(1);
std::cerr << "After creating window" << std::endl;
}

// Initialize a ROS node.
auto node = rclcpp::Node::make_shared("showimage");

std::cerr << "AFter creating node" << std::endl;

// Set quality of service profile based on command line options.
auto qos = rclcpp::QoS(
rclcpp::QoSInitialization(
Expand All @@ -139,7 +133,6 @@ int main(int argc, char * argv[])
// makes no guarantees about the order or reliability of delivery.
qos.reliability(reliability_policy);

std::cerr << "Right before defining callback" << std::endl;
auto callback = [show_camera, &node](const sensor_msgs::msg::Image::SharedPtr msg)
{
show_image(msg, show_camera, node->get_logger());
Expand All @@ -151,10 +144,8 @@ int main(int argc, char * argv[])
auto sub = node->create_subscription<sensor_msgs::msg::Image>(
topic, qos, callback);

std::cerr << "Spinning" << std::endl;
rclcpp::spin(node);

std::cerr << "Shutdown" << std::endl;
rclcpp::shutdown();

return 0;
Expand Down