ROS Gmapping
I have tried to modify the openslam sourcecode of GMapping algorithm. I have replaced the GridSlamProcessor class with GridSlamProcessor_Server class with the existing function as well as new methods. Now After running catkin_make I am getting several "undefined reference to..." error. The errors are like---
CMakeFiles/g_server.dir/src/slam_gmapping.cpp.o: In function `SlamGMapping::init()':
slam_gmapping.cpp:(.text+0x1196): undefined reference to `GMapping::GridSlamProcessor_Server::GridSlamProcessor_Server()'
CMakeFiles/g_server.dir/src/slam_gmapping.cpp.o: In function `SlamGMapping::startServer()':
slam_gmapping.cpp:(.text+0x33bc): undefined reference to `GMapping::GridSlamProcessor_Server::initServer(std::vector<unsigned int, std::allocator<unsigned int> >, unsigned int)'
CMakeFiles/g_server.dir/src/slam_gmapping.cpp.o: In function `SlamGMapping::initMapper(sensor_msgs::LaserScan_<std::allocator<void> > const&)':
slam_gmapping.cpp:(.text+0x63e9): undefined reference to
`GMapping::GridSlamProcessor_Server::setSensorMap(std::map<std::string, GMapping::Sensor*, std::less<std::string>, std::allocator<std::pair<std::string const, GMapping::Sensor*> > > const&)'
slam_gmapping.cpp:(.text+0x67f6): undefined reference to `
GMapping::GridSlamProcessor_Server::setMatchingParameters(double, double, double, int, double, double, int, double, double, unsigned int)'
slam_gmapping.cpp:(.text+0x687d): undefined reference to `GMapping::GridSlamProcessor_Server::setMotionModelParameters(double, double, double, double)'
slam_gmapping.cpp:(.text+0x68ea): undefined reference to `GMapping::GridSlamProcessor_Server::setUpdateDistances(double, double, double)'
slam_gmapping.cpp:(.text+0x6a13): undefined reference to `GMapping::GridSlamProcessor_Server::init(unsigned int, double, double, double, double, double, GMapping::orientedpoint<double, double>)'
CMakeFiles/g_server.dir/src/slam_gmapping.cpp.o: In function `SlamGMapping::addScan(sensor_msgs::LaserScan_<std::allocator<void> > const&, GMapping::orientedpoint<double, double>&)':
slam_gmapping.cpp:(.text+0x78b4): undefined reference to `GMapping::GridSlamProcessor_Server::processScan(GMapping::RangeReading const&, int)'
CMakeFiles/g_server.dir/src/slam_gmapping.cpp.o: In function `SlamGMapping::laserCallback(boost::shared_ptr<sensor_msgs::LaserScan_<std::allocator<void> > const> const&)':
slam_gmapping.cpp:(.text+0x7bbb): undefined reference to `GMapping::GridSlamProcessor_Server::getBestParticleIndex() const'
CMakeFiles/g_server.dir/src/slam_gmapping.cpp.o: In function `SlamGMapping::updateMap(sensor_msgs::LaserScan_<std::allocator<void> > const&)':
slam_gmapping.cpp:(.text+0x89e4): undefined reference to `
GMapping::GridSlamProcessor_Server::getBestParticleIndex()
const'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/collab/catkin_ws/devel/lib/gmapping_server/g_server] Error 1
make[1]: *** [slam_gmapping/gmapping_server/CMakeFiles/g_server.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j12 -l12" failed
The result is something related to include statements..I am unable to debug it.Please help me.