diff --git a/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp b/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp index 28a302b49f98aec283958bdb368cc9e3a164818b..7a875741d06d205b2994d4a3459b07233287e5d1 100644 --- a/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp +++ b/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp @@ -29,7 +29,14 @@ #include <iostream> -#include <RobotAPI/libraries/armem_objects/aron/ObjectInstance.aron.generated.h> +#include <RobotAPI/libraries/ArmarXObjects/aron/ObjectPose.aron.generated.h> +#include <RobotAPI/libraries/ArmarXObjects/ObjectFinder.h> + + +namespace fs = std::filesystem; + + +BOOST_AUTO_TEST_SUITE(arondto_ObjectPose_test) BOOST_AUTO_TEST_CASE(test_ObjectType_copy_assignment) @@ -64,3 +71,45 @@ BOOST_AUTO_TEST_CASE(test_ObjectPose_copy_assignment) BOOST_TEST_MESSAGE("Done"); } + + +BOOST_AUTO_TEST_SUITE_END() + + + +BOOST_AUTO_TEST_SUITE(ObjectFinderTest) + + +BOOST_AUTO_TEST_CASE(test_find) +{ + using namespace armarx; + + ObjectFinder finder; + + bool checkPaths = false; + std::vector<ObjectInfo> objects = finder.findAllObjects(checkPaths); + BOOST_CHECK_GT(objects.size(), 0); + + for (const ObjectInfo& object : objects) + { + fs::path simoxXML = object.simoxXML().absolutePath; + fs::path objectDir = simoxXML.parent_path(); + BOOST_TEST_CONTEXT("Object: " << object.id() << " at " << objectDir) + { + BOOST_CHECK(fs::is_directory(objectDir)); + BOOST_CHECK(fs::is_regular_file(simoxXML) + || fs::is_regular_file(object.articulatedSimoxXML().absolutePath)); + } + } +} + + + +BOOST_AUTO_TEST_SUITE_END() + + + + + + +