Open zoldaten opened 2 years ago
@zoldaten : I am still facing issue while compiling the Sophus package in Step 3. I get the following build error:
In file included from /home/pi/Sophus/sophus/common.hpp:36,
from /home/pi/Sophus/sophus/types.hpp:7,
from /home/pi/Sophus/sophus/rotation_matrix.hpp:9,
from /home/pi/Sophus/sophus/so3.hpp:6,
from /home/pi/Sophus/sophus/rxso3.hpp:6,
from /home/pi/Sophus/test/core/test_rxso3.cpp:3:
/home/pi/Sophus/test/core/test_rxso3.cpp: In lambda function:
/home/pi/Sophus/sophus/common.hpp:50:30: error: declaration of ‘struct Sophus::Tests<Scalar_>::testFit()::<lambda()>::S’ shadows template parameter
#define SOPHUS_FMT_STRING(x) FMT_STRING(x)
^~~~~~~~~~
/home/pi/Sophus/sophus/common.hpp:64:15: note: in expansion of macro ‘SOPHUS_FMT_STRING’
fmt::format(SOPHUS_FMT_STRING(description), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~
/home/pi/Sophus/sophus/test_macros.hpp:79:14: note: in expansion of macro ‘SOPHUS_FMT_STR’
msg += SOPHUS_FMT_STR(descr, ##__VA_ARGS__); \
^~~~~~~~~~~~~~
/home/pi/Sophus/test/core/test_rxso3.cpp:288:9: note: in expansion of macro ‘SOPHUS_TEST’
SOPHUS_TEST(passed, !isScaledOrthogonalAndPositive(sR_cols_swapped),
^~~~~~~~~~~
/home/pi/Sophus/test/core/test_rxso3.cpp:275:13: note: template parameter ‘S’ declared here
template <class S = Scalar>
^~~~~
make[2]: *** [test/core/CMakeFiles/test_rxso3.dir/build.make:63: test/core/CMakeFiles/test_rxso3.dir/test_rxso3.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:206: test/core/CMakeFiles/test_rxso3.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
That's why I am not able to proceed after this step. I am testing on RPi 4 with Raspbian buster. I have installed the ROS noetic desktop version as you have suggested. The build with '~/ORB_SLAM3/build.sh' file works just fine. Is there anything that I might be doing wrong? I will really appreciate some help here.
sudo apt install libfmt-dev should go before build Sophus, i corrected.
hi ! i am on raspberry pi4 Raspbian armv7l buster. i spent hours building ROS nodes for ORB_SLAM3 and succeded (exept AR examples). so i decided to provide the solution.
build ORB_SLAM3 by itself and optional install ROS (desktop version!) - (https://varhowto.com/install-ros-noetic-raspberry-pi-4/ they write there to install
rosinstall_generator ros_comm --rosdistro noetic --deps --wet-only --tar > noetic-ros_comm-wet.rosinstall
but you should use this line instead (or you will faced with missed cv_bridge...etc...):rosinstall_generator desktop --rosdistro noetic --deps --wet-only --tar > noetic-ros_comm-wet.rosinstall
modified CMakeLists.txt as i it crashed (/home/pi/ORB_SLAM3/Examples_old/ROS/ORB_SLAM3):
sed -i 's/++11/++14/g' CMakeLists.txt
comment out in CMakeLists.txt AR nodes as they wont build:
at start of a CMakeLists.txt add:
project(ORB_SLAM3)
cd Examples_old/ROS/ORB_SLAM3 mkdir build cd build cmake .. -DROS_BUILD_TYPE=Release -DPYTHON3_INCLUDE_DIR=/usr/bin/python3.7 -DPYTHON_EXECUTABLE=/usr/bin/python3 make -j
git clone https://github.com/strasdat/Sophus.git cd Sophus mkdir build && cd build && cmake .. && sudo make install
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/pi/ORB_SLAM3/Examples_old/ROS/ORB_SLAM3 source /opt/ros/noetic/setup.bash
cd ~/ORB_SLAM3 ./build_ros.sh