Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS noetic ./build_ros.sh problems #1084

Open
bzofsv opened this issue May 21, 2023 · 10 comments
Open

ROS noetic ./build_ros.sh problems #1084

bzofsv opened this issue May 21, 2023 · 10 comments

Comments

@bzofsv
Copy link

bzofsv commented May 21, 2023

I'm trying to build ROS examples, but I keep getting this error. The other issues posts said to source setup.bash in .bashrc, but this file doesn't exist. I've tried all the other solutions that I can find, and none work.

My .bashrc:

source /home/user/ORB_SLAM2/Examples/ROS/devel/setup.bash
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/user/ORB_SLAM2/Examples/ROS

My ORB_SLAM2/Examples/ROS/CMakeLists.txt changes:

${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
-lboost_system
)

Error message:

[rosbuild] Building package ORB_SLAM2
[rosbuild] Error from directory check: /opt/ros/noetic/share/ros/core/rosbuild/bin/check_same_directories.py /home/user/ORB_SLAM2/Examples/ROS/ORB_SLAM2
1
Traceback (most recent call last):
File "/opt/ros/noetic/share/ros/core/rosbuild/bin/check_same_directories.py", line 46, in
raise Exception
Exception
CMake Error at /opt/ros/noetic/share/ros/core/rosbuild/private.cmake:99 (message):
[rosbuild] rospack found package "ORB_SLAM2" at "", but the current
directory is "/home/user/ORB_SLAM2/Examples/ROS/ORB_SLAM2". You should
double-check your ROS_PACKAGE_PATH to ensure that packages are found in the
correct precedence order.
Call Stack (most recent call first):
/opt/ros/noetic/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location)
CMakeLists.txt:5 (rosbuild_init)

-- Configuring incomplete, errors occurred!
See also "/home/user/ORB_SLAM2/Examples/ROS/ORB_SLAM2/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.

@Aishkrish18
Copy link

Aishkrish18 commented Jun 22, 2023

[rosbuild] Building package ORB_SLAM2
[rosbuild] Error from syntax check of ORB_SLAM2/manifest.xml
Traceback (most recent call last):
File "", line 1, in
File "/opt/ros/noetic/lib/python3/dist-packages/roslib/init.py", line 50, in
from roslib.launcher import load_manifest # noqa: F401
File "/opt/ros/noetic/lib/python3/dist-packages/roslib/launcher.py", line 42, in
import rospkg
ImportError: No module named rospkg
CMake Error at /opt/ros/noetic/share/ros/core/rosbuild/private.cmake:77 (message):
[rosbuild] Syntax check of ORB_SLAM2/manifest.xml failed; aborting
Call Stack (most recent call first):
/opt/ros/noetic/share/ros/core/rosbuild/public.cmake:174 (_rosbuild_check_manifest)
CMakeLists.txt:4 (rosbuild_init)

-- Configuring incomplete, errors occurred!
See also "/home/aishwarya/orbslam/ORB_SLAM2/Examples/ROS/ORB_SLAM2/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.

I have been getting something similar for both orbslam2 and orbslam3 and I already updated my cmake, python versions. I am quite clueless how to proceed. ANy ideas what alternatives that I could try?

@sugnite
Copy link

sugnite commented Jun 22, 2023

This error message implies there's a discrepancy in where ROS is looking for your package, ORB_SLAM2, and where it is actually located. It seems that rospack finds the ORB_SLAM2 package at an empty directory, while the actual package is located in "/home/user/ORB_SLAM2/Examples/ROS/ORB_SLAM2". This suggests that there may be an issue with your ROS_PACKAGE_PATH.

To investigate this issue and find a solution, I'll need some additional information:

  1. What is your ROS distribution version? (e.g. Noetic, Melodic, etc.)
  2. How did you install ROS and ORB_SLAM2? Did you follow the instruction taking care of every steps ?
  3. Please provide the complete output of the following command: echo $ROS_PACKAGE_PATH

The output of these commands will help me understand your environment better and provide a suitable solution.

@Aishkrish18
Copy link

Sure.

  1. My ROS Distribution is Noetic running on Ubuntu 20.04
  2. Yes I followed all the instructions as given in the repository.
  3. ROS_PACKAGE_PATH = /opt/ros/noetic/share
    export ROS_PACKAGE_PATH=/opt/ros/noetic/share:/home/orb slam/ORB_SLAM2/Examples/ROS/ - This is what I added in my bashrc file

@sugnite
Copy link

sugnite commented Jun 22, 2023

From what you send it seem that your $ROS_PACKAGE_PATH env variable is not containing the full export path that you given in the ~/.bahsrc (make sure you have sourced it) as you are missing the path to the package you want to build : /home/orb slam/ORB_SLAM2/Examples/ROS/.

Also do you have a ros workspace ? did you built it ?

@Aishkrish18
Copy link

Aishkrish18 commented Jun 22, 2023

When I perform catkin build inside /home/orb slam/ORB_SLAM2/Examples/ROS/ , it builds the package, after that when I try to rosrun , it says cant find ORB_SLAM2 at all. Looks like I need to build it by cmake and I'm stuck here for a while.

@RAHUL-B-PILLAI
Copy link

Were any of you able to solve the issue because I am facing similar issues

@Aishkrish18
Copy link

I shifted to docker for orbslam2, and it works better there!

@Christmas11235
Copy link

I just solved this problem, because my default python is 2.7, you can switch to python3 and try it.

@supermice
Copy link

supermice commented Sep 24, 2024 via email

@lx-r
Copy link

lx-r commented Sep 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants