peteflorence / nanomap_ros

NanoMap: Fast, Uncertainty-Aware Proximity Queries with Lazy Search of Local 3D Data
https://www.youtube.com/watch?v=zWAs_Djd_hA
Other
176 stars 58 forks source link

Issue with Testing nanomap #5

Open pradeepiisc opened 6 years ago

pradeepiisc commented 6 years ago

Was trying to follow the instruction in README.md I think something is missing. I made a catkin workspace and cloned the git code. Steps followed are :

  1. mkdir -p ~/nano_ws/src
  2. cd ~/nano_ws
  3. git clone
  4. catkin_make 4a. source devel/setup.bash
  5. catkin_make run_tests_nanomap_ros

Problem with 5th step as "make run_tests_nanomap_ros -j8 -l8" failed". Is some file missing? or some step which I should be doing or not doing above??

peteflorence commented 6 years ago

Thanks.

Can you verify that you are able to run tests for other ROS packages via catkin_make run_tests...?

pradeepiisc commented 6 years ago

Assume I'm just a beginner to ROS. I ran this catkin_make run_tests It said Built target run_tests But after that same problem "make run_tests_nanomap_ros -j8 -l8" failed"

peteflorence commented 6 years ago

Hm, since I’m not sure about your particular system setup, maybe try one of these routes?

1) Learn how to run catkin_make tests for other ROS packages, then see if you can run the nanomap ones?

Or

2) Skip the tests for now, and just see if you can run the provided example nodes?

pradeepiisc commented 6 years ago

Thanks a lot for your support. I figured out i was doing catkin_make in wrong folder first of all. After following correct procedure, i'm getting this error: tf2_sensor_msgs/tf2_sensor_msgs.h: No such file or directory in

/src/nanomap_ros/example_nodes/visualization_node.cpp Is it related to any dependency on PCL or Eigen or should i install something else for tf2_sensor_msgs
peteflorence commented 6 years ago

Hi there, the error message looks like you don't have all components of ROS needed. tf2 is a ros-family library, and the tf2_sensor_msgs.h is defining the ROS msg types for its messages. I think if you Google "sudo apt-get install tf2_sensor_msgs" you'll find something like "sudo apt-get install ros-kinetic-something" that will be what you're looking for?

To clarify though you don't actually need ROS to use the core functionality of the repo. visualization_node.cpp is one of the few that need it. But you'd have to set up your own ROS-independent build system.

Let me know how it goes?

ghost commented 6 years ago

Hey pradeep, I also got the same error as of you. Here is the solution :- Just install the below packages before running those commands as @peteflorence mentioned. I don't actually know which one solved but after installing the whole tf2 package I was able to run all the commands of readme.

Installing these can help you resolve your error :

ros-kinetic-tf2-geometry-msgs ros-kinetic-tf2-msgs ros-kinetic-tf2-sensor-msgs

IeiuniumLux commented 4 years ago

Notice that nanomap_ros is actually a ROS package so you need to setup a catkin workspace first to host it. Therefore, just follow these steps:

sudo apt-get install ros-melodic-pcl-ros
source /opt/ros/melodic/setup.bash

mkdir -p ~/nanomap_ws/src
cd ~/nanomap_ws/
catkin_make
cd src/
git clone https://github.com/peteflorence/nanomap_ros.git
cd ..
catkin_make
source devel/setup.bash

catkin_make run_tests_nanomap_ros

That is it. You should now be ready to go.

henryfhq-drone commented 4 years ago

@IeiuniumLux @peteflorence Hi, I am running the code that you posted on the issue. Here is what I got

$ sudo apt-get install ros-melodic-pcl-ros [sudo] password for eee2: Reading package lists... Done Building dependency tree
Reading state information... Done ros-melodic-pcl-ros is already the newest version (1.7.1-1bionic.20200403.044040). The following packages were automatically installed and are no longer required: apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-geocodeglib-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kde-window-manager kinit kio kpackagetool5 kwayland-data kwin-common kwin-data kwin-x11 libdebian-installer4 libkdecorations2-5v5 libkdecorations2private5v5 libkf5activities5 libkf5attica5 libkf5completion-data libkf5completion5 libkf5declarative-data libkf5declarative5 libkf5doctools5 libkf5globalaccel-data libkf5globalaccel5 libkf5globalaccelprivate5 libkf5idletime5 libkf5jobwidgets-data libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiocore5 libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5 libkf5newstuffcore5 libkf5package-data libkf5package5 libkf5plasma5 libkf5quickaddons5 libkf5solid5 libkf5solid5-data libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data libkf5textwidgets5 libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-data libkf5xmlgui5 libkscreenlocker5 libkwin4-effect-builtins1 libkwineffects11 libkwinglutils11 libkwinxrenderutils11 libqgsttools-p1 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 libqt5multimediawidgets5 libxcb-composite0 libxcb-cursor0 libxcb-damage0 os-prober python3-dbus.mainloop.pyqt5 python3-icu python3-pam python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia qml-module-qtquick2 rdate tasksel tasksel-data Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. eee2@eee2-desktop:~$ source /opt/ros/melodic/setup.bash eee2@eee2-desktop:~$ mkdir -p ~/nanomap_ws/src eee2@eee2-desktop:~$ cd ~/nanomap_ws/ eee2@eee2-desktop:~/nanomap_ws$ catkin_make Base path: /home/eee2/nanomap_ws Source space: /home/eee2/nanomap_ws/src Build space: /home/eee2/nanomap_ws/build Devel space: /home/eee2/nanomap_ws/devel Install space: /home/eee2/nanomap_ws/install Creating symlink "/home/eee2/nanomap_ws/src/CMakeLists.txt" pointing to "/opt/ros/melodic/share/catkin/cmake/toplevel.cmake"

Running command: "cmake /home/eee2/nanomap_ws/src -DCATKIN_DEVEL_PREFIX=/home/eee2/nanomap_ws/devel -DCMAKE_INSTALL_PREFIX=/home/eee2/nanomap_ws/install -G Unix Makefiles" in "/home/eee2/nanomap_ws/build"

-- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: /home/eee2/nanomap_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/melodic -- This workspace overlays: /opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/eee2/nanomap_ws/build/test_results -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.23 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- Configuring done -- Generating done -- Build files have been written to: /home/eee2/nanomap_ws/build

Running command: "make -j4 -l4" in "/home/eee2/nanomap_ws/build"

eee2@eee2-desktop:~/nanomap_ws$ cd src/ eee2@eee2-desktop:~/nanomap_ws/src$ git clone https://github.com/peteflorence/nanomap_ros.git Cloning into 'nanomap_ros'... remote: Enumerating objects: 703, done. remote: Total 703 (delta 0), reused 0 (delta 0), pack-reused 703 Receiving objects: 100% (703/703), 561.96 KiB | 558.00 KiB/s, done. Resolving deltas: 100% (490/490), done. eee2@eee2-desktop:~/nanomap_ws/src$ cd .. eee2@eee2-desktop:~/nanomap_ws$ catkin_make Base path: /home/eee2/nanomap_ws Source space: /home/eee2/nanomap_ws/src Build space: /home/eee2/nanomap_ws/build Devel space: /home/eee2/nanomap_ws/devel Install space: /home/eee2/nanomap_ws/install

Running command: "cmake /home/eee2/nanomap_ws/src -DCATKIN_DEVEL_PREFIX=/home/eee2/nanomap_ws/devel -DCMAKE_INSTALL_PREFIX=/home/eee2/nanomap_ws/install -G Unix Makefiles" in "/home/eee2/nanomap_ws/build"

-- Using CATKIN_DEVEL_PREFIX: /home/eee2/nanomap_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/melodic -- This workspace overlays: /opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/eee2/nanomap_ws/build/test_results -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.23 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~ -- ~~ traversing 1 packages in topological order: -- ~~ - nanomap_ros -- ~~~~~~~~~~~~~ -- +++ processing catkin package: 'nanomap_ros' -- ==> add_subdirectory(nanomap_ros) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message): Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir, which is not found. It does neither exist as an absolute directory nor in '${{prefix}}//usr/include/opencv'. Check the issue tracker 'https://github.com/ros-perception/vision_opencv/issues' and consider creating a ticket if the problem has not been reported yet. Call Stack (most recent call first): /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) nanomap_ros/CMakeLists.txt:8 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/eee2/nanomap_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/eee2/nanomap_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed

The issue come when I run my second catkin_make command. I'm not sure whether is there a missing part or is there something I did wrong there?

I'm using the Ubuntu 18.04 LTS OS for my code. My ROS is using ROS Melodic

Thanks A lot.

peteflorence commented 4 years ago

Hi there, this looks like an issue with one of NanoMap’s dependencies, with the opencv_bridge. I think you can resolve this issue by searching around the internet for errors related to that. Good luck and please let us know the solution you find! Others will have the same problem.

On Tue, Apr 28, 2020 at 2:41 AM henryfhq-drone notifications@github.com wrote:

@IeiuniumLux https://github.com/IeiuniumLux Hi, I am running the code that you posted on the issue. Here is what I got

$ sudo apt-get install ros-melodic-pcl-ros [sudo] password for eee2: Reading package lists... Done Building dependency tree Reading state information... Done ros-melodic-pcl-ros is already the newest version (1.7.1-1bionic.20200403.044040). The following packages were automatically installed and are no longer required: apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-geocodeglib-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kde-window-manager kinit kio kpackagetool5 kwayland-data kwin-common kwin-data kwin-x11 libdebian-installer4 libkdecorations2-5v5 libkdecorations2private5v5 libkf5activities5 libkf5attica5 libkf5completion-data libkf5completion5 libkf5declarative-data libkf5declarative5 libkf5doctools5 libkf5globalaccel-data libkf5globalaccel5 libkf5globalaccelprivate5 libkf5idletime5 libkf5jobwidgets-data libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiocore5 libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5 libkf5newstuffcore5 libkf5package-data libkf5package5 libkf5plasma5 libkf5quickaddons5 libkf5solid5 libkf5solid5-data libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data libkf5textwidgets5 libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-data libkf5xmlgui5 libkscreenlocker5 libkwin4-effect-builtins1 libkwineffects11 libkwinglutils11 libkwinxrenderutils11 libqgsttools-p1 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 libqt5multimediawidgets5 libxcb-composite0 libxcb-cursor0 libxcb-damage0 os-prober python3-dbus.mainloop.pyqt5 python3-icu python3-pam python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia qml-module-qtquick2 rdate tasksel tasksel-data Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. eee2@eee2-desktop:$ source /opt/ros/melodic/setup.bash eee2@eee2-desktop:$ mkdir -p /nanomap_ws/src eee2@eee2-desktop:$ cd /nanomap_ws/ eee2@eee2-desktop:/nanomap_ws$ catkin_make Base path: /home/eee2/nanomap_ws Source space: /home/eee2/nanomap_ws/src Build space: /home/eee2/nanomap_ws/build Devel space: /home/eee2/nanomap_ws/devel Install space: /home/eee2/nanomap_ws/install Creating symlink "/home/eee2/nanomap_ws/src/CMakeLists.txt" pointing to "/opt/ros/melodic/share/catkin/cmake/toplevel.cmake" Running command: "cmake /home/eee2/nanomap_ws/src -DCATKIN_DEVEL_PREFIX=/home/eee2/nanomap_ws/devel -DCMAKE_INSTALL_PREFIX=/home/eee2/nanomap_ws/install -G Unix Makefiles" in "/home/eee2/nanomap_ws/build"

-- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: /home/eee2/nanomap_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/melodic -- This workspace overlays: /opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/eee2/nanomap_ws/build/test_results -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.23 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- Configuring done -- Generating done -- Build files have been written to: /home/eee2/nanomap_ws/build Running command: "make -j4 -l4" in "/home/eee2/nanomap_ws/build"

eee2@eee2-desktop:/nanomap_ws$ cd src/ eee2@eee2-desktop:/nanomap_ws/src$ git clone https://github.com/peteflorence/nanomap_ros.git Cloning into 'nanomap_ros'... remote: Enumerating objects: 703, done. remote: Total 703 (delta 0), reused 0 (delta 0), pack-reused 703 Receiving objects: 100% (703/703), 561.96 KiB | 558.00 KiB/s, done. Resolving deltas: 100% (490/490), done. eee2@eee2-desktop:/nanomap_ws/src$ cd .. eee2@eee2-desktop:/nanomap_ws$ catkin_make Base path: /home/eee2/nanomap_ws Source space: /home/eee2/nanomap_ws/src Build space: /home/eee2/nanomap_ws/build Devel space: /home/eee2/nanomap_ws/devel Install space: /home/eee2/nanomap_ws/install Running command: "cmake /home/eee2/nanomap_ws/src -DCATKIN_DEVEL_PREFIX=/home/eee2/nanomap_ws/devel -DCMAKE_INSTALL_PREFIX=/home/eee2/nanomap_ws/install -G Unix Makefiles" in "/home/eee2/nanomap_ws/build"

-- Using CATKIN_DEVEL_PREFIX: /home/eee2/nanomap_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/melodic -- This workspace overlays: /opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/eee2/nanomap_ws/build/test_results -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.23 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~ -- ~~ traversing 1 packages in topological order: -- ~~ - nanomap_ros -- ~~~~~~~~~~~~~ -- +++ processing catkin package: 'nanomap_ros' -- ==> add_subdirectory(nanomap_ros) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message): Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir, which is not found. It does neither exist as an absolute directory nor in '${{prefix}}//usr/include/opencv'. Check the issue tracker 'https://github.com/ros-perception/vision_opencv/issues' and consider creating a ticket if the problem has not been reported yet. Call Stack (most recent call first): /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) nanomap_ros/CMakeLists.txt:8 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/eee2/nanomap_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/eee2/nanomap_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed

The issue come when I run my second catkin_make command. I'm not sure whether is there a missing part or is there something I did wrong there?

I'm using the Ubuntu 18.04 LTS OS for my code.

Thanks A lot.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/peteflorence/nanomap_ros/issues/5#issuecomment-620496704, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLBBKBM5NT3E3GT43PTIQLRO2QFNANCNFSM4EVRCRMQ .

henryfhq-drone commented 4 years ago

@peteflorence Okay good news, the previous error has been solved.

This is how I did it:

  1. Download Opencv 3.4.0
  2. git clone the vision_opencv and extract it to the home directory.
  3. run the codes posted by @IeiuniumLux up until the second catkin_make.
  4. Copy and paste the vision opencv to the nanomap_ws and copy and paste the cv_bridge from the vision_opencv to src file.
  5. After that run the second catkin make.

@peteflorence also may I know what are the codes to run when we want to execute it on the drone?

Thanks a lot