diff --git a/src/examples/test_analytic_odom_constraint.cpp b/src/examples/test_analytic_odom_constraint.cpp index 6453efe371d91c9bca61ec3002c951f210a8cee7..fcc7a71b40e1bf172b3d3a719b9ef7b39f88d90c 100644 --- a/src/examples/test_analytic_odom_constraint.cpp +++ b/src/examples/test_analytic_odom_constraint.cpp @@ -18,6 +18,7 @@ // EIGEN //#include <Eigen/CholmodSupport> +namespace wolf { // inserts the sparse matrix 'ins' into the sparse matrix 'original' in the place given by 'row' and 'col' integers void insertSparseBlock(const Eigen::SparseMatrix<WolfScalar>& ins, Eigen::SparseMatrix<WolfScalar>& original, const unsigned int& row, const unsigned int& col) { @@ -27,10 +28,13 @@ void insertSparseBlock(const Eigen::SparseMatrix<WolfScalar>& ins, Eigen::Sparse original.makeCompressed(); } +} int main(int argc, char** argv) { + using namespace wolf; + //Welcome message std::cout << std::endl << " ========= WOLF IMPORTED .graph TEST ===========" << std::endl << std::endl; diff --git a/src/examples/test_autodiff.cpp b/src/examples/test_autodiff.cpp index 0815cd7ed35f9e00e87c0d9209bdb1fd3e3ce5a2..aae3d005ee426444d856f7beb76e9dd4b3a87cef 100644 --- a/src/examples/test_autodiff.cpp +++ b/src/examples/test_autodiff.cpp @@ -33,6 +33,7 @@ #include "iri-algorithms/laser_scan_utils/corner_detector.h" #include "iri-algorithms/laser_scan_utils/entities.h" +namespace wolf { //function travel around void motionCampus(unsigned int ii, Cpose3d & pose, double& displacement_, double& rotation_) { @@ -49,9 +50,12 @@ void motionCampus(unsigned int ii, Cpose3d & pose, double& displacement_, double pose.moveForward(displacement_); pose.rt.setEuler(pose.rt.head() + rotation_, pose.rt.pitch(), pose.rt.roll()); } +} int main(int argc, char** argv) { + using namespace wolf; + std::cout << "\n ========= 2D Robot with odometry and 2 LIDARs ===========\n"; // USER INPUT ============================================================================================ diff --git a/src/examples/test_capture_laser_2D.cpp b/src/examples/test_capture_laser_2D.cpp index ebf434d972f5921cf7ec4d9b9a8d8a660e2b46ae..64318628898f470bc9e65b951064d0590bb9f3fe 100644 --- a/src/examples/test_capture_laser_2D.cpp +++ b/src/examples/test_capture_laser_2D.cpp @@ -8,6 +8,8 @@ //main int main(int argc, char *argv[]) { + using namespace wolf; + std::cout << std::endl << "CaptureLaser2D class test" << std::endl; std::cout << "========================================================" << std::endl; diff --git a/src/examples/test_ceres_2_lasers.cpp b/src/examples/test_ceres_2_lasers.cpp index 697f55df87ca5d50661d38fd20450ea56df0f8da..a1b5c86c8302e1fbc566d568ca321483b0c30d42 100644 --- a/src/examples/test_ceres_2_lasers.cpp +++ b/src/examples/test_ceres_2_lasers.cpp @@ -32,6 +32,7 @@ #include "iri-algorithms/laser_scan_utils/corner_detector.h" #include "iri-algorithms/laser_scan_utils/entities.h" +namespace wolf { //function travel around void motionCampus(unsigned int ii, Cpose3d & pose, double& displacement_, double& rotation_) { @@ -48,9 +49,12 @@ void motionCampus(unsigned int ii, Cpose3d & pose, double& displacement_, double pose.moveForward(displacement_); pose.rt.setEuler(pose.rt.head() + rotation_, pose.rt.pitch(), pose.rt.roll()); } +} int main(int argc, char** argv) { + using namespace wolf; + std::cout << "\n ========= 2D Robot with odometry and 2 LIDARs ===========\n"; // USER INPUT ============================================================================================ diff --git a/src/examples/test_eigen_quaternion.cpp b/src/examples/test_eigen_quaternion.cpp index 0a696a82cbc79fcfb0b32b62e718cb74c8fe8d74..9eca8b910e5717e44fb920114afc550e8dff47fa 100644 --- a/src/examples/test_eigen_quaternion.cpp +++ b/src/examples/test_eigen_quaternion.cpp @@ -10,6 +10,8 @@ int main() { + using namespace wolf; + std::cout << std::endl << "Eigen Quatenrnion test" << std::endl; WolfScalar q1[4]; diff --git a/src/examples/test_image.cpp b/src/examples/test_image.cpp index 37eee84d29938f7dc0db97110c82b3e652e8d0e0..a7765eab8b4d3e14a388e8a250175072c55d3552 100644 --- a/src/examples/test_image.cpp +++ b/src/examples/test_image.cpp @@ -18,6 +18,8 @@ int main(int argc, char** argv) { + using namespace wolf; + /** if (argc != 2 || atoi(argv[1]) < 0 || atoi(argv[1]) > 1) { diff --git a/src/examples/test_local_param.cpp b/src/examples/test_local_param.cpp index 03eec4fd0456c3efa9b3d7eb607cf0afdec43c52..d355cb0193815aa4f927c55c475f6f35bc1ab657 100644 --- a/src/examples/test_local_param.cpp +++ b/src/examples/test_local_param.cpp @@ -17,6 +17,7 @@ int main(){ using namespace Eigen; using namespace std; + using namespace wolf; VectorXs x(22); MatrixXs M(1,12); // matrix dimensions do not matter, just storage size. diff --git a/src/examples/test_motion.cpp b/src/examples/test_motion.cpp index 45bc90ace487acaaa8408c62f4ee2c2e7b733743..5596972148e314d272429a7f7df5d2af129a3482 100644 --- a/src/examples/test_motion.cpp +++ b/src/examples/test_motion.cpp @@ -25,6 +25,8 @@ int main() { + using namespace wolf; + // time TimeStamp t0, t; t0.setToNow(); diff --git a/src/examples/test_node_linked.cpp b/src/examples/test_node_linked.cpp index 9a67615b036df8a098f144e2e1582e59cd29b565..cd12c5bf9f90ab932f2178c3a66bef62ceb1e647 100644 --- a/src/examples/test_node_linked.cpp +++ b/src/examples/test_node_linked.cpp @@ -4,6 +4,7 @@ #include "wolf_problem.h" //namespaces +namespace wolf { using namespace std; //id count init @@ -92,9 +93,12 @@ class MeasurementN : public NodeLinked<FrameN,NodeTerminus> }; +} // namespace wolf int main() { + using namespace wolf; + cout << endl << "Node class test" << endl; cout << "========================================================" << endl; diff --git a/src/examples/test_state_quaternion.cpp b/src/examples/test_state_quaternion.cpp index 3aba4fcbf3a6725d1743e983f491ce007d9b353c..3ddef2d5d79d5ce505407e66d578eb76ef663144 100644 --- a/src/examples/test_state_quaternion.cpp +++ b/src/examples/test_state_quaternion.cpp @@ -14,6 +14,8 @@ int main (void) { + using namespace wolf; + // 3D StateBlock* pp = new StateBlock(3); StateQuaternion* op = new StateQuaternion; diff --git a/src/examples/test_virtual_hierarchy.cpp b/src/examples/test_virtual_hierarchy.cpp index 2d2e4848e00829c50558500c6e7d6d2d44b05623..c6adba5120ca16980c2c4abc75958dd4c25ef27a 100644 --- a/src/examples/test_virtual_hierarchy.cpp +++ b/src/examples/test_virtual_hierarchy.cpp @@ -7,7 +7,9 @@ #include <list> +namespace wolf{ +} // BASE CLASSES /** @@ -230,11 +232,15 @@ class SenNode : public Sen, public ChildOf<VehNode>, public Bot virtual ~SenNode() { } }; +} // namespace wolf + ///////////////////// // IMPLEMENTATIONS, here to avoid incomplete types and unwanted #includes ///////////////////// #include <iostream> + +namespace wolf { using namespace std; template<class Child> @@ -291,8 +297,12 @@ void VehNode::print() unsigned int N::id_count_ = 0; +} // namespace wolf + int main() { + using namespace wolf; + // Create all nodes with up-pointers already set up VehNode V; SenNode S0(&V), S1(&V); diff --git a/src/examples/test_wolf_autodiffwrapper.cpp b/src/examples/test_wolf_autodiffwrapper.cpp index c351db56af1476c71a2f3de77c230cf73a1d80d8..93fd4f8de63a0c949ca70740a8de89029b5dbe8f 100644 --- a/src/examples/test_wolf_autodiffwrapper.cpp +++ b/src/examples/test_wolf_autodiffwrapper.cpp @@ -17,6 +17,8 @@ int main(int argc, char** argv) { + using namespace wolf; + //Welcome message std::cout << std::endl << " ========= WOLF IMPORTED .graph TEST ===========" << std::endl << std::endl; diff --git a/src/examples/test_wolf_imported_graph.cpp b/src/examples/test_wolf_imported_graph.cpp index 1731d4385e3cf61440491d944f95a9b268c07757..b0bc70a6b390ecf20f008435959ed638e69fb572 100644 --- a/src/examples/test_wolf_imported_graph.cpp +++ b/src/examples/test_wolf_imported_graph.cpp @@ -18,6 +18,7 @@ // EIGEN //#include <Eigen/CholmodSupport> +namespace wolf{ // inserts the sparse matrix 'ins' into the sparse matrix 'original' in the place given by 'row' and 'col' integers void insertSparseBlock(const Eigen::SparseMatrix<WolfScalar>& ins, Eigen::SparseMatrix<WolfScalar>& original, const unsigned int& row, const unsigned int& col) { @@ -27,10 +28,12 @@ void insertSparseBlock(const Eigen::SparseMatrix<WolfScalar>& ins, Eigen::Sparse original.makeCompressed(); } - +} int main(int argc, char** argv) { + using namespace wolf; + //Welcome message std::cout << std::endl << " ========= WOLF IMPORTED .graph TEST ===========" << std::endl << std::endl; diff --git a/src/examples/test_wolf_prunning.cpp b/src/examples/test_wolf_prunning.cpp index f3329dcfd623dd43bdc4ab778893e7fcaf1e1fa7..065709f7caf6120f70f6da21879c5920d5bea372 100644 --- a/src/examples/test_wolf_prunning.cpp +++ b/src/examples/test_wolf_prunning.cpp @@ -18,7 +18,9 @@ // EIGEN //#include <Eigen/CholmodSupport> +namespace wolf{ // inserts the sparse matrix 'ins' into the sparse matrix 'original' in the place given by 'row' and 'col' integers +} void insertSparseBlock(const Eigen::SparseMatrix<WolfScalar>& ins, Eigen::SparseMatrix<WolfScalar>& original, const unsigned int& row, const unsigned int& col) { for (int k=0; k<ins.outerSize(); ++k) @@ -27,10 +29,12 @@ void insertSparseBlock(const Eigen::SparseMatrix<WolfScalar>& ins, Eigen::Sparse original.makeCompressed(); } - +} int main(int argc, char** argv) { + using namespace wolf; + //Welcome message std::cout << std::endl << " ========= WOLF IMPORTED .graph TEST ===========" << std::endl << std::endl; diff --git a/src/examples/test_wolf_tree.cpp b/src/examples/test_wolf_tree.cpp index 9e273a3999e8b295c397e4ab2f69b85683d46518..b215cd2034bb26b4f1e3d9fb7c9571a3e519506a 100644 --- a/src/examples/test_wolf_tree.cpp +++ b/src/examples/test_wolf_tree.cpp @@ -10,10 +10,10 @@ //Wolf includes #include "wolf_manager.h" -namespace wolf { - int main(int argc, char** argv) { + using namespace wolf; + //Welcome message std::cout << std::endl << " ========= WOLF TREE test ===========" << std::endl << std::endl; @@ -57,4 +57,3 @@ int main(int argc, char** argv) return 0; } -} // namespace wolf