Permalink
Browse files

Fix test_coordinates, fix for current VREP

  • Loading branch information...
David Kyle
David Kyle committed Jul 6, 2018
1 parent 0eab31f commit 16f5e2b334941cf2b6eacaa33288132b6cbb21c1
Showing with 26 additions and 32 deletions.
  1. +2 −1 gams.mpc
  2. +22 −19 tests/test_coordinates.cpp
  3. +1 −0 using_vrep.mpb
  4. +1 −12 vrep_lib.mpb
@@ -1,4 +1,5 @@
project (gams) : build_files, using_madara, using_utm, using_ros, vrep_lib, ros_lib, port/java/using_android, port/java/using_java, port/java/using_openjdk, using_boost, using_nortti {
project (gams) : build_files, using_madara, using_utm, using_ros, using_vrep, vrep_lib, ros_lib, port/java/using_android, port/java/using_java, port/java/using_openjdk, using_boost, using_nortti {
libout = lib
libout = $(GAMS_ROOT)/lib
sharedname = GAMS
includes += src
@@ -414,25 +414,6 @@ int main(int, char *[])
kb.to_string(dump);
LOG(dump);

madara::knowledge::KnowledgeBase tkb;
std::ifstream t("frames.kb");
std::string karl((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
tkb.evaluate (karl);

tkb.to_string(dump);
LOG(dump);

auto f = ReferenceFrame::load(tkb, "p1base_link");
LOG (f.valid());

Pose pf(f, 1, 2, 3);
Position loc(pf);
madara::knowledge::containers::NativeDoubleArray nda(".foo", tkb);
loc.to_container(nda);

tkb.to_string(dump);
LOG(dump);

{
madara::knowledge::KnowledgeBase data_;

@@ -634,6 +615,28 @@ int main(int, char *[])
TEST(pose.frame() == base, 1);
}

ReferenceFrameIdentity::gc();
{
madara::knowledge::KnowledgeBase kb;

ReferenceFrame("f", Pose(0, 0, 0)).save(kb);

auto frames = ReferenceFrame::load_tree(kb, std::vector<std::string>{"f"});
TEST(frames.size(), 1);
}

ReferenceFrameIdentity::gc();
{
madara::knowledge::KnowledgeBase kb;

ReferenceFrame("f1", Pose(0, 0, 0), 10).save(kb);
ReferenceFrame("f1", Pose(0, 0, 0), 20).save(kb);

auto frames = ReferenceFrame::load_tree(kb, std::vector<std::string>{"f1"});
TEST(frames.size(), 1);
TEST(frames[0].origin().x(), 0);
}

if (gams_fails > 0)
{
std::cerr << "OVERALL: FAIL. " << gams_fails << " tests failed.\n";
@@ -4,6 +4,7 @@ feature (vrep) {
macros += _GAMS_VREP_
macros += MAX_EXT_API_CONNECTIONS=255
macros += NON_MATLAB_PARSING
macros += DO_NOT_USE_SHARED_MEMORY

includes += $(VREP_ROOT)/programming/remoteApi
includes += $(VREP_ROOT)/programming/include
@@ -1,25 +1,14 @@
feature (vrep) {
requires += vrep

macros += _GAMS_VREP_
macros += MAX_EXT_API_CONNECTIONS=255
macros += NON_MATLAB_PARSING

includes += $(VREP_ROOT)/programming/remoteApi
includes += $(VREP_ROOT)/programming/include


Header_Files {
Platforms {
$(VREP_ROOT)/programming/remoteApi/extApi.h
$(VREP_ROOT)/programming/remoteApi/extApiPlatform.h
src/gams/platforms/vrep
}
}

Source_Files {
Platforms {
$(VREP_ROOT)/programming/remoteApi/extApi.c
$(VREP_ROOT)/programming/remoteApi/extApiPlatform.c
src/gams/platforms/vrep
}
}

0 comments on commit 16f5e2b

Please sign in to comment.