Fixed python interpretor not loaded for odometry nodes

This commit is contained in:
matlabbe
2024-04-28 17:33:26 -07:00
parent 4fa32b87ec
commit f07e4f0a71
3 changed files with 21 additions and 0 deletions
+7
View File
@@ -29,6 +29,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "nodelet/loader.h" #include "nodelet/loader.h"
#include <rtabmap/utilite/ULogger.h> #include <rtabmap/utilite/ULogger.h>
#include <rtabmap/core/Parameters.h> #include <rtabmap/core/Parameters.h>
#ifdef RTABMAP_PYTHON
#include <rtabmap/core/PythonInterface.h>
#endif
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@@ -69,6 +72,10 @@ int main(int argc, char **argv)
nargv.push_back(argv[i]); nargv.push_back(argv[i]);
} }
#ifdef RTABMAP_PYTHON
rtabmap::PythonInterface pythonInterface;
#endif
nodelet::Loader nodelet; nodelet::Loader nodelet;
nodelet::M_string remap(ros::names::getRemappings()); nodelet::M_string remap(ros::names::getRemappings());
std::string nodelet_name = ros::this_node::getName(); std::string nodelet_name = ros::this_node::getName();
+7
View File
@@ -29,6 +29,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "nodelet/loader.h" #include "nodelet/loader.h"
#include <rtabmap/utilite/ULogger.h> #include <rtabmap/utilite/ULogger.h>
#include <rtabmap/core/Parameters.h> #include <rtabmap/core/Parameters.h>
#ifdef RTABMAP_PYTHON
#include <rtabmap/core/PythonInterface.h>
#endif
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@@ -69,6 +72,10 @@ int main(int argc, char **argv)
nargv.push_back(argv[i]); nargv.push_back(argv[i]);
} }
#ifdef RTABMAP_PYTHON
rtabmap::PythonInterface pythonInterface;
#endif
nodelet::Loader nodelet; nodelet::Loader nodelet;
nodelet::M_string remap(ros::names::getRemappings()); nodelet::M_string remap(ros::names::getRemappings());
std::string nodelet_name = ros::this_node::getName(); std::string nodelet_name = ros::this_node::getName();
+7
View File
@@ -29,6 +29,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "nodelet/loader.h" #include "nodelet/loader.h"
#include <rtabmap/utilite/ULogger.h> #include <rtabmap/utilite/ULogger.h>
#include <rtabmap/core/Parameters.h> #include <rtabmap/core/Parameters.h>
#ifdef RTABMAP_PYTHON
#include <rtabmap/core/PythonInterface.h>
#endif
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@@ -70,6 +73,10 @@ int main(int argc, char **argv)
} }
#ifdef RTABMAP_PYTHON
rtabmap::PythonInterface pythonInterface;
#endif
nodelet::Loader nodelet; nodelet::Loader nodelet;
nodelet::M_string remap(ros::names::getRemappings()); nodelet::M_string remap(ros::names::getRemappings());
std::string nodelet_name = ros::this_node::getName(); std::string nodelet_name = ros::this_node::getName();