Skip to content

Commit

Permalink
Fix visp_rbt module build when visp namespace is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Feb 4, 2025
1 parent 9f7611d commit e3a032e
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 1 deletion.
1 change: 0 additions & 1 deletion modules/tracker/rbt/include/visp3/rbt/vpRBDriftDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include VISP_NLOHMANN_JSON(json_fwd.hpp)
#endif


BEGIN_VISP_NAMESPACE

class vpRBFeatureTrackerInput;
Expand Down
33 changes: 33 additions & 0 deletions modules/tracker/rbt/include/visp3/rbt/vpRBVisualOdometry.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2024 by Inria. All rights reserved.
*
* This software is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See the file LICENSE.txt at the root directory of this source
* distribution for additional information about the GNU GPL.
*
* For using ViSP with software that can not be combined with the GNU
* GPL, please contact Inria about acquiring a ViSP Professional
* Edition License.
*
* See https://visp.inria.fr for more information.
*
* This software was developed at:
* Inria Rennes - Bretagne Atlantique
* Campus Universitaire de Beaulieu
* 35042 Rennes Cedex
* France
*
* If you have questions regarding the use of this file, please contact
* Inria at [email protected]
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/

#ifndef VP_RB_VISUAL_ODOMETRY_H
#define VP_RB_VISUAL_ODOMETRY_H

#include <visp3/core/vpConfig.h>

BEGIN_VISP_NAMESPACE

class vpRBFeatureTrackerInput;
class vpHomogeneousMatrix;

Expand All @@ -15,5 +47,6 @@ class VISP_EXPORT vpRBVisualOdometry
virtual vpHomogeneousMatrix getCameraPose() const = 0;
};

END_VISP_NAMESPACE

#endif
34 changes: 34 additions & 0 deletions modules/tracker/rbt/src/vo/vpRBVisualOdometry.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2024 by Inria. All rights reserved.
*
* This software is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See the file LICENSE.txt at the root directory of this source
* distribution for additional information about the GNU GPL.
*
* For using ViSP with software that can not be combined with the GNU
* GPL, please contact Inria about acquiring a ViSP Professional
* Edition License.
*
* See https://visp.inria.fr for more information.
*
* This software was developed at:
* Inria Rennes - Bretagne Atlantique
* Campus Universitaire de Beaulieu
* 35042 Rennes Cedex
* France
*
* If you have questions regarding the use of this file, please contact
* Inria at [email protected]
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/

#include <visp3/rbt/vpRBVisualOdometry.h>

BEGIN_VISP_NAMESPACE

vpRBVisualOdometry::vpRBVisualOdometry() { }

END_VISP_NAMESPACE
4 changes: 4 additions & 0 deletions modules/tracker/rbt/test/catchRBT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
#define CATCH_CONFIG_RUNNER
#include <catch_amalgamated.hpp>

#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif

const std::string objCube =
"o Cube\n"
"v -0.050000 -0.050000 0.050000\n"
Expand Down
4 changes: 4 additions & 0 deletions modules/tracker/rbt/test/test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#include <vector>

#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif

struct TrajectoryData
{
std::vector<vpImage<vpRGBa>> rgb;
Expand Down

0 comments on commit e3a032e

Please sign in to comment.