Open ManChrys opened 1 year ago
It seems rtabmap library is built with ZED support, check if the zed library is correctly detected with the installed rtabmap library:
ldd /usr/local/lib/librtabmap_core.so | grep zed
libsl_zed.so => /usr/local/zed/lib/libsl_zed.so (0x00007f716d324000)
As @sun-rabbit , make sure you don't have another rtabmap installed.
A workaround if you don't need zed inside rtabmap library (if you use zed ros package), don't built rtabmap with ZED support:
cd rtabmap/build
cmake -DWITH_ZED=OFF ..
hello,
i did geo@geo-X570-GAMING-X:~/rtabmap/build$ ldd /usr/local/lib/librtabmap_core.so | grep zed
libsl_zed.so => /usr/local/zed/lib/libsl_zed.so (0x00007f30f6f30000)
libzed_open_capture.so => /usr/local/lib/libzed_open_capture.so (0x00007f30f6b0f000)
i did cmake -DWITH_ZED=OFF ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/geo/rtabmap/build
but when i make -j6
[ 28%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Registration.cpp.o
/home/geo/rtabmap/corelib/src/optimizer/OptimizerG2O.cpp: In constructor ‘rtabmap::OptimizerG2O::OptimizerG2O(const ParametersMap&)’:
/home/geo/rtabmap/corelib/src/optimizer/OptimizerG2O.cpp:157:133: error: no matching function for call to ‘g2o::Factory::registerType(const char [17], std::_MakeUniq<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> >::__single_object)’
g2o::Factory::instance()->registerType("CACHE_SE3_OFFSET", std::make_unique<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> >());
^
In file included from /home/geo/rtabmap/corelib/src/optimizer/OptimizerG2O.cpp:46:0:
/opt/ros/melodic/include/g2o/core/factory.h:62:12: note: candidate: void g2o::Factory::registerType(const string&, g2o::AbstractHyperGraphElementCreator*)
void registerType(const std::string& tag, AbstractHyperGraphElementCreator* c);
^~~~~~~~~~~~
/opt/ros/melodic/include/g2o/core/factory.h:62:12: note: no known conversion for argument 2 from ‘std::_MakeUniq<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> >::__single_object {aka std::unique_ptr<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset>, std::default_delete<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> > >}’ to ‘g2o::AbstractHyperGraphElementCreator*’
i have installed
sudo apt install ros-melodic-rtabmap*
ros-melodic-libg2o
Thank you.
I'll need to doublecheck what was exactly the g2o version in melodic, rtabmap would have support it, unless it is related to this update for latest g2o version (thus breaking old support). Supporting the different versions of g2o is quite hard, as they don't use any code versioning. The workaround would be to install g2o from source:
sudo apt remove ros-melodic-rtabmap* ros-melodic-libg2o
git clone --branch 20230223_git https://github.com/RainerKuemmerle/g2o
cd g2o
mkdir build
cmake ..
make -j4
sudo make install
hello i had this error #1049 on rtabmap. To resolve this error i did sudo apt remove ros-melodic-rtabmap*
and after that when i tried to catkin_make rtabmap_ros i had the following error.