Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Functions | Variables
utils_unit.cpp File Reference
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <iostream>
#include <fstream>
#include <tesseract_common/utils.h>
Include dependency graph for utils_unit.cpp:

Functions

acm addAllowedCollision ("link1", "link2", "test")
 
acm addAllowedCollision ("link4", "link3", "test")
 
acm addAllowedCollision ("link1", "link3", "test")
 
acm addAllowedCollision ("link1", "cause_duplicate", "test")
 
acm addAllowedCollision ("link10", "link11", "test")
 
acm addAllowedCollision ("dummy", "dummy", "link1")
 
 EXPECT_TRUE (std::find(results.begin(), results.end(), "link1") !=results.end())
 
 EXPECT_TRUE (std::find(results.begin(), results.end(), "link2") !=results.end())
 
 EXPECT_TRUE (std::find(results.begin(), results.end(), "link3") !=results.end())
 
 EXPECT_TRUE (std::find(results.begin(), results.end(), "link4") !=results.end())
 
 EXPECT_TRUE (std::find(results.begin(), results.end(), "cause_duplicate") !=results.end())
 
 EXPECT_FALSE (std::find(results.begin(), results.end(), "link10") !=results.end())
 
 EXPECT_FALSE (std::find(results.begin(), results.end(), "link11") !=results.end())
 
 EXPECT_FALSE (std::find(results.begin(), results.end(), "dummy") !=results.end())
 
 EXPECT_EQ (results.size(), 5)
 
 EXPECT_EQ (results.size(), 6)
 
int main (int argc, char **argv)
 

Variables

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
 Testing getAllowedCollisions. More...
 
std::vector< std::string > link_names { "link1", "link3", "cause_duplicate" }
 

Function Documentation

◆ addAllowedCollision() [1/6]

acm addAllowedCollision ( "dummy"  ,
"dummy"  ,
"link1"   
)

◆ addAllowedCollision() [2/6]

acm addAllowedCollision ( "link1"  ,
"cause_duplicate"  ,
"test"   
)

◆ addAllowedCollision() [3/6]

acm addAllowedCollision ( "link1"  ,
"link2"  ,
"test"   
)

◆ addAllowedCollision() [4/6]

acm addAllowedCollision ( "link1"  ,
"link3"  ,
"test"   
)

◆ addAllowedCollision() [5/6]

acm addAllowedCollision ( "link10"  ,
"link11"  ,
"test"   
)

◆ addAllowedCollision() [6/6]

acm addAllowedCollision ( "link4"  ,
"link3"  ,
"test"   
)

◆ EXPECT_EQ() [1/2]

EXPECT_EQ ( results.  size(),
 
)

◆ EXPECT_EQ() [2/2]

EXPECT_EQ ( results.  size(),
 
)

◆ EXPECT_FALSE() [1/3]

EXPECT_FALSE ( std::find(results.begin(), results.end(), "dummy") !  = results.end())

◆ EXPECT_FALSE() [2/3]

EXPECT_FALSE ( std::find(results.begin(), results.end(), "link10") !  = results.end())

◆ EXPECT_FALSE() [3/3]

EXPECT_FALSE ( std::find(results.begin(), results.end(), "link11") !  = results.end())

◆ EXPECT_TRUE() [1/5]

EXPECT_TRUE ( std::find(results.begin(), results.end(), "cause_duplicate") !  = results.end())

◆ EXPECT_TRUE() [2/5]

EXPECT_TRUE ( std::find(results.begin(), results.end(), "link1") !  = results.end())
Initial value:
{
auto results = tesseract_common::getAllowedCollisions(link_names, acm.getAllAllowedCollisions(), false)
auto acm
Definition: collision_core_unit.cpp:33
std::vector< std::string > getAllowedCollisions(const std::vector< std::string > &link_names, const AllowedCollisionEntries &acm_entries, bool remove_duplicates=true)
Gets allowed collisions for a set of link names.
Definition: utils.cpp:440
std::vector< std::string > link_names
Definition: utils_unit.cpp:21

◆ EXPECT_TRUE() [3/5]

EXPECT_TRUE ( std::find(results.begin(), results.end(), "link2") !  = results.end())

◆ EXPECT_TRUE() [4/5]

EXPECT_TRUE ( std::find(results.begin(), results.end(), "link3") !  = results.end())

◆ EXPECT_TRUE() [5/5]

EXPECT_TRUE ( std::find(results.begin(), results.end(), "link4") !  = results.end())

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ link_names

std::vector<std::string> link_names { "link1", "link3", "cause_duplicate" }

◆ TESSERACT_COMMON_IGNORE_WARNINGS_POP

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
Initial value:

Testing getAllowedCollisions.