Other Parts Discussed in Thread: IWR1642
Tool/software: TI C/C++ Compiler
Hi,
I am using the ti_mmwave_rospkg and retrieving the x,y,z positions of detected objects is working fine. I would like to add a class to the ros package and run the class methods in the mmWaveQuickConfig.cpp file. When running catkin_make, I keep getting the errors pasted below. The same error also appeared when I tried including the DataHandlerClass.h and creating a new dataHandler like this:
/* * mmWaveQuickConfig.cpp * */ #include "ros/ros.h" #include "ti_mmwave_rospkg/mmWaveCLI.h" #include <cstdlib> #include <fstream> #include <stdio.h> #include <regex> #include "DataHandlerClass.h" int main(int argc, char **argv) { ros::init(argc, argv, "mmWaveQuickConfig"); if (argc != 2) { ROS_INFO("mmWaveQuickConfig: usage: mmWaveQuickConfig /file_directory/params.cfg"); return 1; } else { ROS_INFO("mmWaveQuickConfig: Configuring mmWave device using config file: %s", argv[1]); } ros::NodeHandle n; ros::ServiceClient client = n.serviceClient<ti_mmwave_rospkg::mmWaveCLI>("/mmWaveCommSrv/mmWaveCLI"); ti_mmwave_rospkg::mmWaveCLI srv; std::ifstream myParams;
DataUARTHandler newHandler(&n);
...
The errors I am getting are:
/home/joe/catkin_wsMA/build/ti_mmwave_rospkg/devel/lib/libmmwave.so:-1: error: undefined reference to `class_loader::class_loader_private::AbstractMetaObjectBase::AbstractMetaObjectBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/joe/catkin_wsMA/build/ti_mmwave_rospkg/devel/lib/libmmwave.so:-1: error: undefined reference to `nodelet::Nodelet::Nodelet()'
/home/joe/catkin_wsMA/build/ti_mmwave_rospkg/devel/lib/libmmwave.so:-1: error: undefined reference to `nodelet::Nodelet::getPrivateNodeHandle() const'
...
and some more class_loader errors
I am not sure what's wrong. Including the DataHandlerClass.h header file and initialising a new DataUARTHandler in the mmWaveLoader.cpp did not produce any compile errors. Any suggestions how to use the class in both files containing a main method?
Any help is much appreciated.
Ryen