38 #include <boost/foreach.hpp>
39 #include <boost/algorithm/string/erase.hpp>
54 std::string package_name;
62 int main(
int argc,
char** argv)
66 typedef std::map<std::string, TransportDesc> StatusMap;
70 std::string transport_name = boost::erase_last_copy(lookup_name,
"_pub");
71 transports[transport_name].pub_name = lookup_name;
72 transports[transport_name].package_name = pub_loader.
getClassPackage(lookup_name);
75 transports[transport_name].pub_status =
SUCCESS;
86 std::string transport_name = boost::erase_last_copy(lookup_name,
"_sub");
87 transports[transport_name].sub_name = lookup_name;
88 transports[transport_name].package_name = sub_loader.
getClassPackage(lookup_name);
91 transports[transport_name].sub_status =
SUCCESS;
101 bool problem_package =
false;
102 printf(
"Declared transports:\n");
103 BOOST_FOREACH(
const StatusMap::value_type& value, transports) {
104 const TransportDesc& td = value.second;
105 printf(
"%s", value.first.c_str());
108 printf(
" (*): Not available. Try 'catkin_make --pkg %s'.", td.package_name.c_str());
109 problem_package =
true;
118 printf(
"\nDetails:\n");
119 BOOST_FOREACH(
const StatusMap::value_type& value, transports) {
120 const TransportDesc& td = value.second;
121 printf(
"----------\n");
122 printf(
"\"%s\"\n", value.first.c_str());
124 printf(
"*** Plugins are built, but could not be loaded. The package may need to be rebuilt or may not be compatible with this release of image_common. ***\n");
127 printf(
"*** Plugins are not built. ***\n");
129 printf(
" - Provided by package: %s\n", td.package_name.c_str());
131 printf(
" - No publisher provided\n");
135 printf(
" - No subscriber provided\n");