Tagslam in Raspberry Pi OS Debian

26 views
Skip to first unread message

Ryan Wong

unread,
Nov 27, 2022, 1:37:58 PM11/27/22
to tagslam
Hi Bernd,
May I know if we can only use Tagslam in Ubuntu? I was able to configure and run Tagslam in Ubuntu 20.04; unfortunately had to switch to Raspberry Pi OS Debian due to hardware compatibility constraint. I was not able to install GTSAM & Tagslam, any chance to get it work if I try to build from source?

Ryan.

Bernd Pfrommer

unread,
Nov 28, 2022, 7:09:11 AM11/28/22
to tagslam
I have not tried installing gtsam on a raspberry pi. Sorry, I cannot say if it'll work, you have to try.
TagSLAM has been tested with GTSAM 4.0.3 (I know that's dated) so if you build gtsam from source please use GTSAM release tag 4.0.3.

Ryan Wong

unread,
Nov 28, 2022, 2:24:32 PM11/28/22
to tagslam
I managed to build & install GTSAM 4.0.3 from source successfully. However, while trying to compile Tagslam, I got the following compilation errors, do you have any pointer to this?

[ 80%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/value/pose.cpp.o
[ 81%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/factor/absolute_pose_prior.cpp.o
[ 82%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/factor/relative_pose_prior.cpp.o
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp: In function ‘std::shared_ptr<gtsam::ISAM2> tagslam::make_isam2(tagslam::OptimizerMode)’:
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp:25:7: error: ‘struct gtsam::ISAM2Params’ has no member named ‘setEnableDetailedResults’; did you mean ‘enableDetailedResults’?
     p.setEnableDetailedResults(true);
       ^~~~~~~~~~~~~~~~~~~~~~~~
       enableDetailedResults
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp:29:9: error: ‘struct gtsam::ISAM2Params’ has no member named ‘setEvaluateNonlinearError’; did you mean ‘evaluateNonlinearError’?
       p.setEvaluateNonlinearError(true);
         ^~~~~~~~~~~~~~~~~~~~~~~~~
         evaluateNonlinearError
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp:31:9: error: ‘struct gtsam::ISAM2Params’ has no member named ‘setEnablePartialRelinearizationCheck’; did you mean ‘enablePartialRelinearizationCheck’?
       p.setEnablePartialRelinearizationCheck(false);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         enablePartialRelinearizationCheck
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp:40:9: error: ‘struct gtsam::ISAM2Params’ has no member named ‘setEvaluateNonlinearError’; did you mean ‘evaluateNonlinearError’?
       p.setEvaluateNonlinearError(false);
         ^~~~~~~~~~~~~~~~~~~~~~~~~
         evaluateNonlinearError
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp:42:9: error: ‘struct gtsam::ISAM2Params’ has no member named ‘setEnablePartialRelinearizationCheck’; did you mean ‘enablePartialRelinearizationCheck’?
       p.setEnablePartialRelinearizationCheck(true);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         enablePartialRelinearizationCheck
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp: In member function ‘double tagslam::GTSAMOptimizer::doOptimize(double)’:
/home/pi/catkin_ws/src/tagslam_root/src/tagslam/src/gtsam_optimizer.cpp:307:49: error: ‘const struct gtsam::ISAM2Params’ has no member named ‘isEvaluateNonlinearError’; did you mean ‘evaluateNonlinearError’?
     const bool hasValidError = isam2_->params().isEvaluateNonlinearError();
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
                                                 evaluateNonlinearError
[ 83%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/factor/coordinate.cpp.o
[ 84%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/factor/distance.cpp.o
[ 84%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/factor/tag_projection.cpp.o
[ 85%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/measurements/measurements.cpp.o
[ 86%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/measurements/coordinate.cpp.o
[ 88%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/measurements/plane.cpp.o
[ 88%] Building CXX object tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/measurements/distance.cpp.o
make[2]: *** [tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/build.make:258: tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/src/gtsam_optimizer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:4779: tagslam_root/src/tagslam/CMakeFiles/tagslam.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j4 -l4" failed

Bernd Pfrommer

unread,
Nov 28, 2022, 2:37:18 PM11/28/22
to tagslam
This is is almost certainly a sign that you did not compile compile GTSAM 4.0.3, but that you have compiled something later, like 4.1.x
Two ways to fix it (try the 1st one first)
1) Upgrade to later version of tagslam: cd src/tagslam; git checkout master; git pull origin master;
2) Compile GTSAM 4.0.3. In the gtsam source tree you need to do something like "git fetch --all; git checkout 4.0.3"
    Then verify with "git branch" that you are indeed on the 4.0.3 branch. Then clean your "build" directory and retry compiling tagslam once GTSAM has been built/installed

Ryan Wong

unread,
Nov 28, 2022, 3:52:20 PM11/28/22
to tagslam
Thanks Bernd, the 1st option managed to solve the problem. 
A quick question (not related to this thread), may I know what is the fps are you getting for your detector/tags? No matter how I configure for my camera, I'm just getting 3-5fps for detector/tags while camera is feeding up to 30fps.

Bernd Pfrommer

unread,
Nov 28, 2022, 6:40:54 PM11/28/22
to Ryan Wong, tagslam
All depends on resolution of the camera and the CPU. On a desktop I can get 20fps on a 1280x1024 image. But if you are going into battle with a raspberry pi, 3fps sounds reasonable. 

--
You received this message because you are subscribed to the Google Groups "tagslam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tagslam+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tagslam/698dd2fc-da63-4b91-99cf-d7282d851032n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages