diff --git a/object_analytics_node/include/object_analytics_node/util/logger.hpp b/object_analytics_node/include/object_analytics_node/util/logger.hpp index ede41c3..0f20e8c 100644 --- a/object_analytics_node/include/object_analytics_node/util/logger.hpp +++ b/object_analytics_node/include/object_analytics_node/util/logger.hpp @@ -46,8 +46,25 @@ log->log(__VA_ARGS__); \ } \ } + +#define TRACE_FUNC(...) \ + { \ + auto log = diag::loggerFarm::getLogger("consoleLogger"); \ + if (log != nullptr) { \ + struct timespec tp; \ + clock_gettime (CLOCK_REALTIME, &tp); \ + std::uint64_t microsec; \ + microsec = tp.tv_sec*1000000 + tp.tv_nsec/1000; \ + std::string header = __FUNCTION__; \ + header += "("; \ + header += std::to_string(microsec); \ + header += ")"; \ + log->log(header); \ + } \ + } #else #define TRACE_INFO(...) +#define TRACE_FUNC(...) #endif #define TRACE_ERR(...) \ diff --git a/object_analytics_node/src/visualizer/control/control.cpp b/object_analytics_node/src/visualizer/control/control.cpp index 4ceed36..b4e5d5c 100644 --- a/object_analytics_node/src/visualizer/control/control.cpp +++ b/object_analytics_node/src/visualizer/control/control.cpp @@ -14,13 +14,13 @@ #include "control.hpp" -Control::Control() {TRACE_INFO();} +Control::Control() {TRACE_FUNC();} -Control::~Control() {TRACE_INFO();} +Control::~Control() {TRACE_FUNC();} bool Control::Initial(View::Ptr view, stream_device::Ptr stream_device) { - TRACE_INFO(); + TRACE_FUNC(); DataView_ = view; StreamDev_ = stream_device; diff --git a/object_analytics_node/src/visualizer/control/control_ds.cpp b/object_analytics_node/src/visualizer/control/control_ds.cpp index a522f1c..3e6d893 100644 --- a/object_analytics_node/src/visualizer/control/control_ds.cpp +++ b/object_analytics_node/src/visualizer/control/control_ds.cpp @@ -21,13 +21,13 @@ #include "render_lines.hpp" #include "render_rect.hpp" -ControlDS::ControlDS() {TRACE_INFO();} +ControlDS::ControlDS() {TRACE_FUNC();} -ControlDS::~ControlDS() {TRACE_INFO();} +ControlDS::~ControlDS() {TRACE_FUNC();} bool ControlDS::CreateContext() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; std::shared_ptr im; @@ -59,20 +59,20 @@ bool ControlDS::CreateContext() void ControlDS::StepIn() { - TRACE_INFO(); + TRACE_FUNC(); StepMode_ = true; PauseMode_ = false; } void ControlDS::PlayMode() { - TRACE_INFO(); + TRACE_FUNC(); PauseMode_ = !PauseMode_; } void ControlDS::Run() { - TRACE_INFO(); + TRACE_FUNC(); while (!pangolin::ShouldQuit()) { DataView_->Reset(); diff --git a/object_analytics_node/src/visualizer/device/stream_cap.cpp b/object_analytics_node/src/visualizer/device/stream_cap.cpp index 318765d..426b0ff 100644 --- a/object_analytics_node/src/visualizer/device/stream_cap.cpp +++ b/object_analytics_node/src/visualizer/device/stream_cap.cpp @@ -17,13 +17,13 @@ #include #include -stream_cap::stream_cap() {TRACE_INFO();} +stream_cap::stream_cap() {TRACE_FUNC();} -stream_cap::~stream_cap() {TRACE_INFO();} +stream_cap::~stream_cap() {TRACE_FUNC();} bool stream_cap::init_stream(int stream_name) { - TRACE_INFO(); + TRACE_FUNC(); // stream_name_ = stream_name; cap_ = std::make_shared(stream_name); @@ -35,7 +35,7 @@ bool stream_cap::init_stream(int stream_name) bool stream_cap::init_stream(std::string & stream_name) { - TRACE_INFO(); + TRACE_FUNC(); // stream_name_ = stream_name; cap_ = std::make_shared(stream_name, cv::CAP_FFMPEG); @@ -47,7 +47,7 @@ bool stream_cap::init_stream(std::string & stream_name) bool stream_cap::reset_stream() { - TRACE_INFO(); + TRACE_FUNC(); return true; if (cap_ != nullptr) { @@ -63,7 +63,7 @@ bool stream_cap::reset_stream() bool stream_cap::fetch_frame(std::shared_ptr & frame) { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if (cap_ == nullptr || !cap_->isOpened()) { diff --git a/object_analytics_node/src/visualizer/device/stream_device.cpp b/object_analytics_node/src/visualizer/device/stream_device.cpp index 2bfddcf..849a9ff 100644 --- a/object_analytics_node/src/visualizer/device/stream_device.cpp +++ b/object_analytics_node/src/visualizer/device/stream_device.cpp @@ -21,18 +21,18 @@ #include "stream_ds.hpp" #include "stream_vid.hpp" -stream_device::stream_device() {TRACE_INFO();} +stream_device::stream_device() {TRACE_FUNC();} stream_device::~stream_device() { - TRACE_INFO(); + TRACE_FUNC(); release_stream(); } stream_device::Ptr stream_device::create(int stream_name) { - TRACE_INFO(); + TRACE_FUNC(); stream_device::Ptr stream_dev = nullptr; @@ -52,7 +52,7 @@ stream_device::Ptr stream_device::create(int stream_name) stream_device::Ptr stream_device::create(std::string & stream_name) { - TRACE_INFO(); + TRACE_FUNC(); stream_device::Ptr stream_dev = nullptr; @@ -85,7 +85,7 @@ stream_device::Ptr stream_device::create(std::string & stream_name) void stream_device::release_stream() { - TRACE_INFO(); + TRACE_FUNC(); if (isAsync) { terminate = true; @@ -99,7 +99,7 @@ void stream_device::release_stream() bool stream_device::process() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if (initialized_ && isAsync) { @@ -147,7 +147,7 @@ bool stream_device::process() bool stream_device::read(std::shared_ptr & frame) { - TRACE_INFO(); + TRACE_FUNC(); if (isAsync) { size_t count = 0; bool res = false; @@ -172,7 +172,7 @@ bool stream_device::read(std::shared_ptr & frame) bool stream_device::query(std::shared_ptr & frame) { - TRACE_INFO(); + TRACE_FUNC(); if (isAsync) { size_t count = 0; bool res = false; diff --git a/object_analytics_node/src/visualizer/device/stream_ds.cpp b/object_analytics_node/src/visualizer/device/stream_ds.cpp index e123e11..9b8cff6 100644 --- a/object_analytics_node/src/visualizer/device/stream_ds.cpp +++ b/object_analytics_node/src/visualizer/device/stream_ds.cpp @@ -20,25 +20,25 @@ #include "common/frame_obj.hpp" #include "common/object.hpp" -stream_ds::stream_ds() {TRACE_INFO();} +stream_ds::stream_ds() {TRACE_FUNC();} stream_ds::~stream_ds() { - TRACE_INFO(); + TRACE_FUNC(); stream_device::release_stream(); } bool stream_ds::init_stream(int stream_name) { - TRACE_INFO(); + TRACE_FUNC(); return false; } bool stream_ds::init_stream(std::string & stream_name) { - TRACE_INFO(); + TRACE_FUNC(); int slashIndex = stream_name.find_last_of('/'); @@ -58,18 +58,18 @@ bool stream_ds::init_stream(std::string & stream_name) return false; } -void stream_ds::release_stream() {TRACE_INFO();} +void stream_ds::release_stream() {TRACE_FUNC();} bool stream_ds::reset_stream() { - TRACE_INFO(); + TRACE_FUNC(); return false; } bool stream_ds::fetch_frame(std::shared_ptr & frame) { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; diff --git a/object_analytics_node/src/visualizer/device/stream_vid.cpp b/object_analytics_node/src/visualizer/device/stream_vid.cpp index 4573ff5..e0a4151 100644 --- a/object_analytics_node/src/visualizer/device/stream_vid.cpp +++ b/object_analytics_node/src/visualizer/device/stream_vid.cpp @@ -17,20 +17,20 @@ #include #include -stream_vid::stream_vid() {TRACE_INFO();} +stream_vid::stream_vid() {TRACE_FUNC();} -stream_vid::~stream_vid() {TRACE_INFO();} +stream_vid::~stream_vid() {TRACE_FUNC();} bool stream_vid::init_stream(int stream_name) { - TRACE_INFO(); + TRACE_FUNC(); return false; // for fake test } bool stream_vid::init_stream(std::string & stream_name) { - TRACE_INFO(); + TRACE_FUNC(); cap_ = std::make_shared(stream_name); @@ -43,7 +43,7 @@ bool stream_vid::init_stream(std::string & stream_name) void stream_vid::release_stream() { - TRACE_INFO(); + TRACE_FUNC(); stream_device::release_stream(); @@ -57,7 +57,7 @@ void stream_vid::release_stream() bool stream_vid::reset_stream() { - TRACE_INFO(); + TRACE_FUNC(); if (cap_->isOpened()) { return cap_->set(cv::CAP_PROP_POS_FRAMES, 1); @@ -68,7 +68,7 @@ bool stream_vid::reset_stream() bool stream_vid::fetch_frame(std::shared_ptr & frame) { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if (cap_ == nullptr || !cap_->isOpened()) { diff --git a/object_analytics_node/src/visualizer/model/math_model.cpp b/object_analytics_node/src/visualizer/model/math_model.cpp index 536fa70..a3ad961 100644 --- a/object_analytics_node/src/visualizer/model/math_model.cpp +++ b/object_analytics_node/src/visualizer/model/math_model.cpp @@ -14,6 +14,6 @@ #include "math_model.hpp" -MathModel::MathModel() {TRACE_INFO();} +MathModel::MathModel() {TRACE_FUNC();} -MathModel::~MathModel() {TRACE_INFO();} +MathModel::~MathModel() {TRACE_FUNC();} diff --git a/object_analytics_node/src/visualizer/model/math_sample.cpp b/object_analytics_node/src/visualizer/model/math_sample.cpp index c037a3f..5619548 100644 --- a/object_analytics_node/src/visualizer/model/math_sample.cpp +++ b/object_analytics_node/src/visualizer/model/math_sample.cpp @@ -17,13 +17,13 @@ #include #include -MathSample::MathSample() {TRACE_INFO();} +MathSample::MathSample() {TRACE_FUNC();} -MathSample::~MathSample() {TRACE_INFO();} +MathSample::~MathSample() {TRACE_FUNC();} bool MathSample::Initial(std::string model, std::string sampler) { - TRACE_INFO(); + TRACE_FUNC(); if (model == "Gaussian") { MathModel_ = std::make_shared(); @@ -48,7 +48,7 @@ bool MathSample::SetMeanAndCovariance( cv::Mat & mean, cv::Mat & covariance, uint32_t counts) { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; MathModel_->SetMeanAndCovariance(mean, covariance); @@ -76,7 +76,7 @@ bool MathSample::SetMeanAndCovariance( bool MathSample::GetMeanAndCovariance(cv::Mat & mean, cv::Mat & covariance) { - TRACE_INFO(); + TRACE_FUNC(); MathModel_->GetMeanAndCovariance(mean, covariance); @@ -85,7 +85,7 @@ bool MathSample::GetMeanAndCovariance(cv::Mat & mean, cv::Mat & covariance) bool MathSample::SetSampleCounts(uint32_t counts) { - TRACE_INFO(); + TRACE_FUNC(); Counts_ = counts; @@ -94,14 +94,14 @@ bool MathSample::SetSampleCounts(uint32_t counts) bool MathSample::GenSamples() { - TRACE_INFO(); + TRACE_FUNC(); return SampleModel_->GenSamples(); } bool MathSample::FetchSamples(cv::Mat & samples) { - TRACE_INFO(); + TRACE_FUNC(); SampleModel_->FetchSamples(samples); @@ -110,7 +110,7 @@ bool MathSample::FetchSamples(cv::Mat & samples) cv::RotatedRect MathSample::GetCovEllipse() { - TRACE_INFO(); + TRACE_FUNC(); return MathModel_->GetCovEllipse(); } diff --git a/object_analytics_node/src/visualizer/model/sample/rw_sample.cpp b/object_analytics_node/src/visualizer/model/sample/rw_sample.cpp index b1b3fa8..bfc3649 100644 --- a/object_analytics_node/src/visualizer/model/sample/rw_sample.cpp +++ b/object_analytics_node/src/visualizer/model/sample/rw_sample.cpp @@ -14,13 +14,13 @@ #include "rw_sample.hpp" -RWSample::RWSample() {TRACE_INFO();} +RWSample::RWSample() {TRACE_FUNC();} -RWSample::~RWSample() {TRACE_INFO();} +RWSample::~RWSample() {TRACE_FUNC();} bool RWSample::GenSamples() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if (Evaluator_Proc_ == nullptr || Ranges_.empty() || Intervals_.empty()) { @@ -86,7 +86,7 @@ bool RWSample::GenSamples() bool RWSample::FetchSamples(cv::Mat & samples) { - TRACE_INFO(); + TRACE_FUNC(); samples = Samples_; return true; } diff --git a/object_analytics_node/src/visualizer/model/sample/sample_model.cpp b/object_analytics_node/src/visualizer/model/sample/sample_model.cpp index 7987e24..a0e67a2 100644 --- a/object_analytics_node/src/visualizer/model/sample/sample_model.cpp +++ b/object_analytics_node/src/visualizer/model/sample/sample_model.cpp @@ -14,13 +14,13 @@ #include "sample_model.hpp" -SampleModel::SampleModel() {TRACE_INFO();} +SampleModel::SampleModel() {TRACE_FUNC();} -SampleModel::~SampleModel() {TRACE_INFO();} +SampleModel::~SampleModel() {TRACE_FUNC();} bool SampleModel::RegisterEvaluator(CBPtr evaluator) { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if (Evaluator_Proc_ == nullptr) { @@ -38,7 +38,7 @@ bool SampleModel::RegisterEvaluator(CBPtr evaluator) bool SampleModel::SetRanges(cv::Mat ranges, cv::Mat intervals) { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if ((ranges.type() != CV_64FC1) || (intervals.type() != CV_64FC1)) { diff --git a/object_analytics_node/src/visualizer/model/sample/uniform_sample.cpp b/object_analytics_node/src/visualizer/model/sample/uniform_sample.cpp index 292cde0..e8e8f3f 100644 --- a/object_analytics_node/src/visualizer/model/sample/uniform_sample.cpp +++ b/object_analytics_node/src/visualizer/model/sample/uniform_sample.cpp @@ -14,15 +14,15 @@ #include "uniform_sample.hpp" -UniformSample::UniformSample() {TRACE_INFO();} +UniformSample::UniformSample() {TRACE_FUNC();} -UniformSample::~UniformSample() {TRACE_INFO();} +UniformSample::~UniformSample() {TRACE_FUNC();} void UniformSample::RecursiveSampling( cv::Mat & start, cv::Mat & interval, cv::Mat & counts, int l_offset) { - // TRACE_INFO(); + // TRACE_FUNC(); uint16_t count = counts.at(l_offset); uint16_t idx = 0; static uint16_t sample_idx = 0; @@ -47,7 +47,7 @@ void UniformSample::RecursiveSampling( bool UniformSample::GenSamples() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; if (Evaluator_Proc_ == nullptr || Ranges_.empty() || Intervals_.empty()) { @@ -72,7 +72,7 @@ bool UniformSample::GenSamples() bool UniformSample::FetchSamples(cv::Mat & samples) { - TRACE_INFO(); + TRACE_FUNC(); samples = Samples_; return true; } diff --git a/object_analytics_node/src/visualizer/model/stat/gaussian_model.cpp b/object_analytics_node/src/visualizer/model/stat/gaussian_model.cpp index 5bdfcd9..e035901 100644 --- a/object_analytics_node/src/visualizer/model/stat/gaussian_model.cpp +++ b/object_analytics_node/src/visualizer/model/stat/gaussian_model.cpp @@ -14,15 +14,15 @@ #include "gaussian_model.hpp" -GaussianModel::GaussianModel() {TRACE_INFO();} +GaussianModel::GaussianModel() {TRACE_FUNC();} -GaussianModel::~GaussianModel() {TRACE_INFO();} +GaussianModel::~GaussianModel() {TRACE_FUNC();} -bool GaussianModel::Settle() {TRACE_INFO();} +bool GaussianModel::Settle() {TRACE_FUNC();} double GaussianModel::Evaluate(cv::Mat & coordinate) { - // TRACE_INFO(); + // TRACE_FUNC(); double ret = .0f; if (coordinate.cols != 1) { diff --git a/object_analytics_node/src/visualizer/model/stat/stat_model.cpp b/object_analytics_node/src/visualizer/model/stat/stat_model.cpp index f6d88d1..4e2afa9 100644 --- a/object_analytics_node/src/visualizer/model/stat/stat_model.cpp +++ b/object_analytics_node/src/visualizer/model/stat/stat_model.cpp @@ -14,13 +14,13 @@ #include "stat_model.hpp" -StatModel::StatModel() {TRACE_INFO();} +StatModel::StatModel() {TRACE_FUNC();} -StatModel::~StatModel() {TRACE_INFO();} +StatModel::~StatModel() {TRACE_FUNC();} void StatModel::SetMeanAndCovariance(cv::Mat & mean, cv::Mat & covariance) { - TRACE_INFO(); + TRACE_FUNC(); Mean_ = mean.clone(); Covariance_ = covariance.clone(); @@ -29,7 +29,7 @@ void StatModel::SetMeanAndCovariance(cv::Mat & mean, cv::Mat & covariance) void StatModel::GetMeanAndCovariance(cv::Mat & mean, cv::Mat & covariance) { - TRACE_INFO(); + TRACE_FUNC(); mean = Mean_.clone(); covariance = Covariance_.clone(); @@ -37,7 +37,7 @@ void StatModel::GetMeanAndCovariance(cv::Mat & mean, cv::Mat & covariance) cv::RotatedRect StatModel::GetCovEllipse() { - TRACE_INFO(); + TRACE_FUNC(); cv::RotatedRect box; cv::Mat U, S, Vt; diff --git a/object_analytics_node/src/visualizer/render_object/render_ellipse.cpp b/object_analytics_node/src/visualizer/render_object/render_ellipse.cpp index 2731c44..1c68e9a 100644 --- a/object_analytics_node/src/visualizer/render_object/render_ellipse.cpp +++ b/object_analytics_node/src/visualizer/render_object/render_ellipse.cpp @@ -17,21 +17,21 @@ RenderEllipse::RenderEllipse(float width, float height) : RenderObject(width, height) { - TRACE_INFO(); + TRACE_FUNC(); } RenderEllipse::RenderEllipse(cv::RotatedRect rect) { - TRACE_INFO(); + TRACE_FUNC(); Rect_ = rect; } -RenderEllipse::~RenderEllipse() {TRACE_INFO();} +RenderEllipse::~RenderEllipse() {TRACE_FUNC();} bool RenderEllipse::Load() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; @@ -44,17 +44,17 @@ bool RenderEllipse::Load() return ret; } -void RenderEllipse::SetVertices(cv::Mat & vertices) {TRACE_INFO();} +void RenderEllipse::SetVertices(cv::Mat & vertices) {TRACE_FUNC();} void RenderEllipse::SetEllipse(cv::RotatedRect rect) { - TRACE_INFO(); + TRACE_FUNC(); Rect_ = rect; } bool RenderEllipse::Validate() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = true; if (Rect_.boundingRect().area() <= 0) {return false;} @@ -66,7 +66,7 @@ bool RenderEllipse::Validate() void RenderEllipse::DrawObject() { - TRACE_INFO(); + TRACE_FUNC(); glPointSize(5); glLineWidth(3); diff --git a/object_analytics_node/src/visualizer/render_object/render_image.cpp b/object_analytics_node/src/visualizer/render_object/render_image.cpp index 30728eb..2bddd37 100644 --- a/object_analytics_node/src/visualizer/render_object/render_image.cpp +++ b/object_analytics_node/src/visualizer/render_object/render_image.cpp @@ -18,16 +18,16 @@ RenderImage::RenderImage(float width, float height) : RenderObject(width, height) { - TRACE_INFO(); + TRACE_FUNC(); VisibleGrid_ = true; CvCoordTransform_ = true; } -RenderImage::~RenderImage() {TRACE_INFO();} +RenderImage::~RenderImage() {TRACE_FUNC();} void RenderImage::SetTexture(cv::Mat & tex) { - TRACE_INFO(); + TRACE_FUNC(); Tex_ = tex; @@ -37,7 +37,7 @@ void RenderImage::SetTexture(cv::Mat & tex) void RenderImage::SetTexture(cv::Mat & tex, std::string id) { - TRACE_INFO(); + TRACE_FUNC(); Id_ = id; @@ -49,7 +49,7 @@ void RenderImage::SetTexture(cv::Mat & tex, std::string id) bool RenderImage::Load() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; @@ -65,7 +65,7 @@ bool RenderImage::Load() bool RenderImage::Validate() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = true; ret = Validate2DDim(); @@ -80,7 +80,7 @@ void RenderImage::SetVertices(cv::Mat & vertices) {} void RenderImage::DrawObject() { - TRACE_INFO(); + TRACE_FUNC(); // GLfloat sq_vert[] = { // -Width_ / 2, Height_ / 2, 0, -Width_ / 2, -Height_ / 2, 0, diff --git a/object_analytics_node/src/visualizer/render_object/render_lines.cpp b/object_analytics_node/src/visualizer/render_object/render_lines.cpp index 684d945..0db8110 100644 --- a/object_analytics_node/src/visualizer/render_object/render_lines.cpp +++ b/object_analytics_node/src/visualizer/render_object/render_lines.cpp @@ -17,14 +17,14 @@ RenderLines::RenderLines(float width, float height) : RenderObject(width, height) { - TRACE_INFO(); + TRACE_FUNC(); } -RenderLines::~RenderLines() {TRACE_INFO();} +RenderLines::~RenderLines() {TRACE_FUNC();} bool RenderLines::Load() { - TRACE_INFO(); + TRACE_FUNC(); VisibleID_ = false; bool ret = false; @@ -40,14 +40,14 @@ bool RenderLines::Load() void RenderLines::SetVertices(cv::Mat & vertices) { - TRACE_INFO(); + TRACE_FUNC(); Vertices_ = vertices; } bool RenderLines::Validate() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = true; ret = Validate2DDim(); @@ -62,7 +62,7 @@ bool RenderLines::Validate() void RenderLines::DrawObject() { - TRACE_INFO(); + TRACE_FUNC(); glEnable(GL_LINE_SMOOTH); // Turn Blending On diff --git a/object_analytics_node/src/visualizer/render_object/render_object.cpp b/object_analytics_node/src/visualizer/render_object/render_object.cpp index a6176d1..d4104d5 100644 --- a/object_analytics_node/src/visualizer/render_object/render_object.cpp +++ b/object_analytics_node/src/visualizer/render_object/render_object.cpp @@ -19,7 +19,7 @@ RenderObject::RenderObject() { - TRACE_INFO(); + TRACE_FUNC(); Tcw_.SetIdentity(); CvTransform_.SetIdentity(); @@ -27,7 +27,7 @@ RenderObject::RenderObject() RenderObject::RenderObject(float width, float height) { - TRACE_INFO(); + TRACE_FUNC(); Width_ = width; Height_ = height; @@ -38,13 +38,13 @@ RenderObject::RenderObject(float width, float height) RenderObject::~RenderObject() { - TRACE_INFO(); + TRACE_FUNC(); if (SubObjs_.size() > 0) {SubObjs_.clear();} } void RenderObject::AddSubObj(Ptr obj) { - TRACE_INFO(); + TRACE_FUNC(); SubObjs_.push_back(obj); } @@ -66,7 +66,7 @@ std::string RenderObject::GetID() {return Id_;} void RenderObject::Set2DDim(int width, int height) { - TRACE_INFO(); + TRACE_FUNC(); Width_ = width; Height_ = height; @@ -74,7 +74,7 @@ void RenderObject::Set2DDim(int width, int height) bool RenderObject::Validate2DDim() { - TRACE_INFO(); + TRACE_FUNC(); if (Width_ == 0 || Height_ == 0) {return false;} @@ -83,7 +83,7 @@ bool RenderObject::Validate2DDim() void RenderObject::SetPose(pangolin::OpenGlMatrix Tcw) { - TRACE_INFO(); + TRACE_FUNC(); Tcw_ = Tcw.Transpose(); @@ -99,7 +99,7 @@ void RenderObject::SetPose(pangolin::OpenGlMatrix Tcw) void RenderObject::GetPose(pangolin::OpenGlMatrix & Tcw) { - TRACE_INFO(); + TRACE_FUNC(); Tcw = Tcw_; } @@ -151,7 +151,7 @@ void RenderObject::DrawID(float size) void RenderObject::DrawGrid(float step) { - TRACE_INFO(); + TRACE_FUNC(); glLineWidth(2); @@ -190,7 +190,7 @@ void RenderObject::DrawGrid(float step) bool RenderObject::Load() { - TRACE_INFO(); + TRACE_FUNC(); // Alpha:80% glColor4f(1.0f, 1.0f, 1.0f, 0.95f); @@ -213,7 +213,7 @@ bool RenderObject::Load() void RenderObject::Finish() { - TRACE_INFO(); + TRACE_FUNC(); glPopMatrix(); @@ -224,7 +224,7 @@ void RenderObject::Finish() void RenderObject::Render() { - TRACE_INFO(); + TRACE_FUNC(); if (Load()) { DrawObject(); @@ -246,6 +246,6 @@ void RenderObject::Render() void RenderObject::SetStipple(bool stipple) { - TRACE_INFO(); + TRACE_FUNC(); Stipple_ = stipple; } diff --git a/object_analytics_node/src/visualizer/render_object/render_rect.cpp b/object_analytics_node/src/visualizer/render_object/render_rect.cpp index 2fc2fca..2ca7bf2 100644 --- a/object_analytics_node/src/visualizer/render_object/render_rect.cpp +++ b/object_analytics_node/src/visualizer/render_object/render_rect.cpp @@ -17,20 +17,20 @@ RenderRect::RenderRect(float width, float height) : RenderObject(width, height) { - TRACE_INFO(); + TRACE_FUNC(); } RenderRect::RenderRect(cv::Rect rect) { - TRACE_INFO(); + TRACE_FUNC(); Rect_ = rect; } -RenderRect::~RenderRect() {TRACE_INFO();} +RenderRect::~RenderRect() {TRACE_FUNC();} bool RenderRect::Load() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = false; @@ -43,17 +43,17 @@ bool RenderRect::Load() return ret; } -void RenderRect::SetVertices(cv::Mat & vertices) {TRACE_INFO();} +void RenderRect::SetVertices(cv::Mat & vertices) {TRACE_FUNC();} void RenderRect::SetRect(cv::Rect rect) { - TRACE_INFO(); + TRACE_FUNC(); Rect_ = rect; } bool RenderRect::Validate() { - TRACE_INFO(); + TRACE_FUNC(); bool ret = true; if (Rect_.area() <= 0) {return false;} @@ -65,7 +65,7 @@ bool RenderRect::Validate() void RenderRect::DrawObject() { - TRACE_INFO(); + TRACE_FUNC(); glPointSize(5); glLineWidth(3); diff --git a/object_analytics_node/src/visualizer/view/view.cpp b/object_analytics_node/src/visualizer/view/view.cpp index e146609..6f949ed 100644 --- a/object_analytics_node/src/visualizer/view/view.cpp +++ b/object_analytics_node/src/visualizer/view/view.cpp @@ -17,7 +17,7 @@ View::View() { - TRACE_INFO(); + TRACE_FUNC(); // default layout Layout_ = LayoutHorizontal; @@ -27,14 +27,14 @@ View::View() View::~View() { - TRACE_INFO(); + TRACE_FUNC(); Obj_Vec_.clear(); } bool View::Add_Obj(RenderObject::Ptr & obj) { - TRACE_INFO(); + TRACE_FUNC(); if (Obj_Vec_.size() == Obj_Max_Size_) {Obj_Vec_.erase(Obj_Vec_.begin());} @@ -47,7 +47,7 @@ bool View::Add_Obj(RenderObject::Ptr & obj) bool View::Remove_Obj(RenderObject::Ptr & obj) { - TRACE_INFO(); + TRACE_FUNC(); int i; @@ -65,7 +65,7 @@ bool View::Remove_Obj(RenderObject::Ptr & obj) bool View::InitDisplay(float width, float height, float border_ratio) { - TRACE_INFO(); + TRACE_FUNC(); // 1. Validate initialize params if (width <= .0f || height <= .0f || border_ratio <= .0f) { @@ -101,7 +101,7 @@ bool View::InitDisplay(float width, float height, float border_ratio) void View::Reset() { - TRACE_INFO(); + TRACE_FUNC(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Activate camera view @@ -112,7 +112,7 @@ void View::Reset() void View::SetLayout(Layout layout) { - TRACE_INFO(); + TRACE_FUNC(); Layout_ = layout; @@ -121,7 +121,7 @@ void View::SetLayout(Layout layout) void View::ChangeLayout() { - TRACE_INFO(); + TRACE_FUNC(); if (Layout_ == LayoutHorizontal) { Layout_ = LayoutVertical; @@ -134,7 +134,7 @@ void View::ChangeLayout() void View::PerformLayout(Layout layout) { - TRACE_INFO(); + TRACE_FUNC(); int idx = 0; int vec_size = Obj_Vec_.size(); @@ -172,7 +172,7 @@ void View::PerformLayout(Layout layout) void View::DrawXZGrid(float x_size, float z_size, float step) { - TRACE_INFO(); + TRACE_FUNC(); glLineWidth(1); glEnable(GL_LINE_STIPPLE);