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 catkinization #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

ROS catkinization #2

wants to merge 2 commits into from

Conversation

plnegre
Copy link

@plnegre plnegre commented Jan 26, 2016

Hello @raulmur,

The ROS examples you provide, are build using a very old tool (rosbuild), which is not longer supported.

The new build tool for ROS is catkin. I catkinized the package so everybody can use it in hydro, indigo and further versions.

@weblucas
Copy link

Very good. all my friends always have to do that when download orbslam.

@Nican
Copy link

Nican commented Feb 6, 2016

Hello! I am attempting to build your branch, but I feel like some steps are missing. I appended the "Example/ROS" to the ROS_PACKAGE_PATH. I had 3 extra modifications to make it work:

  1. Move "Example/ROS/orb_slam2" to "Example/ROS/src/orb_slam2"
  2. Add "${EIGEN3_INCLUDE_DIR}" to "include_directories"
  3. Modify CMakeLists.txt and all .cc files with the new relative paths. Basically add a "../" to all relative paths.

Then I can run catkin_make on the "Example/ROS" directory, and everything seems to be working correctly now. Am I missing something?

@buqing2009
Copy link

Thanks for your work! @plnegre

@plnegre
Copy link
Author

plnegre commented Feb 10, 2016

Hello @buqing2009,

make sure that your orb_slam package is into your ROS_PACKAGE_PATH variable (echo ${ROS_PACKAGE_PATH})

Hope it helps!

@marcelinomalmeidan
Copy link

I wasn't able to build it either. I cloned the repository into catkin_ws/src, then ran catkin_make in the catkin_ws, but errors showed up:

In file included from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:37:0,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../include/LoopClosing.h:34,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../include/LocalMapping.h:26,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../include/Tracking.h:31,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../include/System.h:29,
from /home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/src/ros_mono.cc:32:
/home/mma2739/catkin_ws/src/ORB_SLAM2/Examples/ROS/orb_slam2/../../../Thirdparty/g2o/g2o/types/../core/openmp_mutex.h:30:26: fatal error: ../../config.h: No such file or directory
#include "../../config.h"

I did check (echo ${ROS_PACKAGE_PATH}), which gives as an output:
/home/mma2739/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

Am I missing something?

@plnegre
Copy link
Author

plnegre commented Feb 12, 2016

Hello @marcelinomalmeidan,

Please, refer to the README file for instructions on how to compile it in ROS.

@marcelinomalmeidan
Copy link

@plnegre, isn't the whole point of catkinizing to avoid using build?

The ROS examples you provide, are build using a very old tool (rosbuild), which is not longer supported.

@Nican
Copy link

Nican commented Feb 12, 2016

No. The ORB_SLAM2 is still had independent dependencies that must be built before catkin_make runs.

@marcelinomalmeidan
Copy link

Alright, thanks! I'll try it later!

@lucasmedino
Copy link

Where do I need to add the orb_slam folder, should I add to catkin_ws?

@plnegre
Copy link
Author

plnegre commented Jul 6, 2016

Hello @lucasmedino

Please, refer to the README file for instructions on how to compile it in ROS

lukeqsun pushed a commit to lukeqsun/ORB_SLAM2 that referenced this pull request Sep 20, 2017
icoderaven referenced this pull request in rislab/ORB_SLAM2 Sep 29, 2017
removing static variables to be thread-safe
arunabhcode added a commit to arunabhcode/ORB_SLAM2 that referenced this pull request Nov 17, 2017
nilsjor pushed a commit to nilsjor/ORB_SLAM2 that referenced this pull request Aug 28, 2018
@Emilycs09
Copy link

@plnegre Thank you for your sharing!

I have a problem here:
After editting the files according to your commits and successfully making the project, I tried
rosrun orb_slam2 rgbd MY_PATH_VOC MY_PATH_SETTING,
yet errors comes up as:
Couldn't find executable named rgbd below /home/xx/catkin_orbslam/src/ORB_SLAM2-master/Examples/ROS/orb_slam2. Found the following, but they're either not files, or not executable: /home/xx/catkin_orbslam/src/ORB_SLAM2-master/Examples/ROS/orb_slam2/build/devel/lib/orb_slam2/rgbd

I have tried source devel/setup.bash but it still didn't work.

Hope for your help! Thx

vazk added a commit to vazk/ORB_SLAM2 that referenced this pull request Aug 3, 2019
tnassour pushed a commit to tnassour/ORB_SLAM2 that referenced this pull request Aug 6, 2019
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

Successfully merging this pull request may close these issues.

7 participants