From 0e6c961dc97c092bc69f25de475f6bb6db6eb0f6 Mon Sep 17 00:00:00 2001 From: joanvallve <jvallve@iri.upc.edu> Date: Thu, 26 Mar 2020 12:34:43 +0100 Subject: [PATCH] working --- src/wolf_subscriber_gnss_ublox.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/wolf_subscriber_gnss_ublox.cpp b/src/wolf_subscriber_gnss_ublox.cpp index c0755c8..58d304b 100644 --- a/src/wolf_subscriber_gnss_ublox.cpp +++ b/src/wolf_subscriber_gnss_ublox.cpp @@ -11,25 +11,24 @@ WolfSubscriberGnssUblox::WolfSubscriberGnssUblox(const SensorBasePtr& sensor_ptr void WolfSubscriberGnssUblox::initSubscriber(ros::NodeHandle& nh, const std::string& topic) { - sub_ = nh.subscribe(topic, 1, &WolfSubscriberGnssUblox::callback, this); + sub_ = nh.subscribe(topic, 10, &WolfSubscriberGnssUblox::callback, this); } void WolfSubscriberGnssUblox::callback(const std_msgs::UInt8MultiArray& msg) { - ROS_INFO("Ublox data stream callback!"); - GNSSUtils::RawDataType res = ublox_raw_.addDataStream(msg.data); + //std::cout << "res = " << (int) res << std::endl; + // only create capture if observation is received if (res == GNSSUtils::OBS) { - ROS_INFO("Observation received!"); - + //ROS_INFO("Observation received!"); GNSSUtils::ObservationsPtr obs_ptr = std::make_shared<GNSSUtils::Observations>(ublox_raw_.getObservations()); - ROS_INFO("Observations copied!"); + //ROS_INFO("Observations copied!"); GNSSUtils::NavigationPtr nav_ptr = std::make_shared<GNSSUtils::Navigation>(ublox_raw_.getNavigation()); - ROS_INFO("Navigation copied!"); + //ROS_INFO("Navigation copied!"); ros::Time now = ros::Time::now(); @@ -38,9 +37,9 @@ void WolfSubscriberGnssUblox::callback(const std_msgs::UInt8MultiArray& msg) obs_ptr, nav_ptr); - ROS_INFO("Capture GNSS created!"); + //ROS_INFO("Capture GNSS created!"); cap_gnss_ptr->process(); - ROS_INFO("Capture GNSS processed!"); + //ROS_INFO("Capture GNSS processed!"); } } std::shared_ptr<WolfSubscriber> WolfSubscriberGnssUblox::create(const std::string& _unique_name, const ParamsServer& _params, const SensorBasePtr _sensor_ptr) -- GitLab