Search code examples
ros

Error in launching RTAB node in ROS Melodic


I know I should ask this one in ROS Forums but I couldn't due to some reasons (Sorry for that). So the thing is, I built standalone RTAB package from source in my Ubuntu 18.04 (Bionic) with ROS Melodic installed. I am trying to launch the node for rtab mapping by writing this in my sourced catkin workspace:

~/catkin_ws$ roslaunch rtabmap_ros-master/launch rtabmap.launch rtabmap_args:="--delete_db_on_start" rtabmapviz:=false rviz:=true

But when i do this it raises RLE Exception Error even though the path given to rtabmap.launch file is correct and file is at the location. Error is something like that:

RLException: [rtabmap.launch] is neither a launch file in package [rtabmap_ros-master] nor is [rtabmap_ros-master] a launch file name

I don't know why its giving this same error and i am stuck here. Please Help!!!


Solution

  • As the error suggests it can not find a launch file for that package. This is usually caused by one of two things. The first is you need to make sure you're sourcing the correct setup file; here it would be source ~/catkin_ws/setup.bash

    The second thing is that you need to make sure you're actually installing the launch files so that they can be used when built. Here that would mean your CMakeLists.txt has something like this:

    install(DIRECTORY launch/
    DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
    PATTERN ".svn" EXCLUDE)