test
load_plugin.cpp
Go to the documentation of this file.
1
#include <
gpp_plugin/gpp_plugin.hpp
>
2
#include <gtest/gtest.h>
3
4
// load the plugin with the nav_core interface
5
TEST
(LoadPlugin, NavCore) {
6
pluginlib::ClassLoader<nav_core::BaseGlobalPlanner>
loader(
7
"nav_core"
,
"nav_core::BaseGlobalPlanner"
);
8
9
// load the plugin
10
auto
plugin =
11
loader.
createInstance
(
"gpp_plugin::GppPlugin"
);
12
}
13
14
// load the plugin with mbf interface
15
TEST
(LoadPlugin, MbfCostmapCore) {
16
pluginlib::ClassLoader<mbf_costmap_core::CostmapPlanner>
loader(
17
"mbf_costmap_core"
,
"mbf_costmap_core::CostmapPlanner"
);
18
19
// load the plugin
20
auto
plugin =
21
loader.
createInstance
(
"gpp_plugin::GppPlugin"
);
22
}
23
24
int
25
main
(
int
argc,
char
** argv) {
26
::testing::InitGoogleTest(&argc, argv);
27
return
RUN_ALL_TESTS();
28
}
TEST
TEST(LoadPlugin, NavCore)
Definition:
load_plugin.cpp:5
gpp_plugin.hpp
main
int main(int argc, char **argv)
Definition:
load_plugin.cpp:25
pluginlib::ClassLoader
pluginlib::ClassLoader::createInstance
boost::shared_ptr< T > createInstance(const std::string &lookup_name)
gpp_plugin
Author(s):
autogenerated on Wed Mar 2 2022 00:21:23