Ask Your Question
0

Cannot find custom Launch file

asked 2016-04-22 10:40:18 -0500

jacksonkr_ gravatar image

updated 2016-04-22 14:55:38 -0500

I'm trying to use a custom launch file from http://wiki.ros.org/rtabmap_ros/Tutor... and no matter what I've tried, I can't get the launch file to show without launching it from the folder it exists in.

#Works

$ cd ~/catkin_ws/src/rtabmap_ros/launch
$ roslaunch freenect_throttle.launch

#Does Not Work

$ cd ~/
$ roslaunch freenect_throttle.launch

In fact, in the terminal if I type $ roslaunch freen and hit tab twice I'm given two freenect options but not the launch file I'm looking for.

I've tried manually putting in the launch file:

$ roslaunch freenect_throttle.launch
[freenect_throttle.launch] is not a launch file name
The traceback for the exception was written to the log file

ROS is sourced, catkin_ws is sourced, all my other apps work but this is being a stickler.

I've also tried:

$ cd ~/catkin_ws/
$ catkin_make

and a step further:

$ catkin_make install

and then resourced the setup.bash

$ source devel/setup.bash

and still no luck. What am I missing?

* EDIT * for Thomas D

$ roslaunch rtabmap_ros freenect_throttle.launch [freenect_throttle.launch] is neither a launch file in package [rtabmap] nor is [rtabmap] a launch file name The traceback for the exception was written to the log file

So I went back and rebuilt rtabmap

$ sudo make install
[sudo] password for ubuntu: 
[  5%] Built target rtabmap_utilite
[  6%] Built target res_tool
[ 39%] Built target rtabmap_core
[ 86%] Built target rtabmap_gui
[ 88%] Built target rtabmap
[ 89%] Built target consoleApp
[ 89%] Built target imagesJoiner
[ 90%] Built target extractObject
[ 90%] Built target camera
[ 90%] Built target rgbd_camera
[ 91%] Built target stereoEval
[ 92%] Built target databaseViewer
[ 92%] Built target epipolar_geometry
[ 92%] Built target odometryViewer
[ 92%] Built target dataRecorder
[ 93%] Built target calibration
[ 93%] Built target bow_mapping
[ 95%] Built target rgbd_mapping
[ 98%] Built target wifi_mapping
[100%] Built target noEventsExample
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /home/ubuntu/catkin_ws/devel/lib/arm-linux-gnueabihf/rtabmap-0.11/RTABMapConfig.cmake
-- Up-to-date: /home/ubuntu/catkin_ws/devel/lib/arm-linux-gnueabihf/rtabmap-0.11/RTABMapConfigVersion.cmake
-- Up-to-date: /home/ubuntu/catkin_ws/devel/share/rtabmap/package.xml

...

-- Up-to-date: /home/ubuntu/catkin_ws/devel/bin/rtabmap-odometryViewer
-- Up-to-date: /home/ubuntu/catkin_ws/devel/bin/rtabmap-dataRecorder
-- Up-to-date: /home/ubuntu/catkin_ws/devel/bin/rtabmap-calibration

I re-sourced but saw no change. So the bigger problem has become that I cannot run rtabmap via ros! Do rtabmap and rtabmap_ros need to be in different catkin folders?

edit retag flag offensive close merge delete

Comments

In which directory do you end up (pwd) after a roscd rtabmap_ros ?? Also, could you post the output of echo $ROS_PACKAGE_PATH please? This may be a workspace overlaying issue.

spmaniato gravatar image spmaniato  ( 2016-04-22 15:01:11 -0500 )edit

pwd for roscd rtabmap_ros is ~/catkin_ws/src/rtabmap_ros and ROS_PACKAGE_PATH is /home/ubuntu/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-22 17:26:16 -0500 )edit

OK, these look good. I was gonna ask about roslaunch rtabmap_ros [tab-tab] but, reading the comments underneath Thomas' answer, I think you already did that.

spmaniato gravatar image spmaniato  ( 2016-04-23 10:12:57 -0500 )edit

Yep. This is a tricky one which makes me think it's something very simple. I may need to start from scratch on a fresh install but I'm hoping someone will enlighten me. After all, knowing the root cause is much more valuable to me than being ignorant to the issue.

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-23 12:47:54 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-04-24 15:25:00 -0500

jacksonkr_ gravatar image

For this particular situation, here is what worked for me.

Install rtabmap first:

$ cd ~
$ git clone https://github.com/introlab/rtabmap.git rtabmap
$ cd rtabmap/build
$ cmake -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel ..
$ make -j4
$ make install

the DCMAKE_INSTALL_PREFIX is what solved my issue. I don't know why creating my own catkin_ws did not work but I suspect I was missing something simple.

Install rtabmap_ros second:

$ cd ~/catkin_ws
$ git clone https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros
$ catkin_make

in this second step you've used the catkin_ws folder that was created by the rtabmap install. I added my freenect_throttle.launch to catkin_ws/src/rtabmap_ros/launch folder and then re-ran catkin_make inside the parent catkin_ws folder.

All documentation for rtabmap, rtabmap_ros, and `` can be found in the following links:

Note: You get an issue on the freenect_throttle.launch when you first run it because one of the xml comments is not closed correctly, close the comment and it will run fine. I've attached what the corrected launch file below

<launch>
  <include file="$(find freenect_launch)/launch/freenect.launch">
     <arg name="depth_registration" value="True" />
  </include>

  <arg name="rate"  default="5"/>
  <arg name="decimation"  default="1"/> 
  <!-- Reduce the image size, e.g., 2 means "width/2 x height/2". -->

  <!-- Use same nodelet used by Freenect/OpenNI -->
  <group ns="camera">
    <node pkg="nodelet" type="nodelet" name="data_throttle" args="load rtabmap_ros/data_throttle camera_nodelet_manager" output="screen">
      <param name="rate" type="double" value="$(arg rate)"/>
      <param name="decimation" type="int" value="$(arg decimation)"/>

      <remap from="rgb/image_in"       to="rgb/image_rect_color"/>
      <remap from="depth/image_in"     to="depth_registered/image_raw"/>
      <remap from="rgb/camera_info_in" to="rgb/camera_info"/>

      <remap from="rgb/image_out"       to="data_throttled_image"/>
      <remap from="depth/image_out"     to="data_throttled_image_depth"/>
      <remap from="rgb/camera_info_out" to="data_throttled_camera_info"/>
    </node>
  </group>      
</launch>
edit flag offensive delete link more
1

answered 2016-04-22 11:21:25 -0500

Thomas D gravatar image

Try roslaunch rtabmap_ros freenect_throttle.launch. You seem to be missing the package name that the launch file exists in.

edit flag offensive delete link more

Comments

No such luck. I added an edit to the bottom of my original question with details.

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-22 11:54:25 -0500 )edit

In the edit it looks like you tried to use roslaunch with the rtabmap package and not the rtabmap_ros package. Try the exact command I gave in the answer and see if that helps.

Thomas D gravatar image Thomas D  ( 2016-04-22 12:19:38 -0500 )edit

My mistake. I had actually tried both when I tried it. Like the freenect_throttle.launch, double pressing the tab key lists no values. If I double tab after roslaunch (a space at the end) I get 141 possibilities, such items as: octomap, openni_camera, rosbag, pcl_ros, etc...

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-22 14:55:12 -0500 )edit

You did . ~/catkin_ws/devel/setup.bash then roslaunch rtabmap_ros freenect_throttle.launch? What do you get if you run . ~/catkin_ws/devel/setup.bash; roscd rtabmap; ls launch?

Thomas D gravatar image Thomas D  ( 2016-04-22 14:59:48 -0500 )edit

Permission denied ls: cannot access launch: No such file or directory. I tried it with roscd rtabmap_ros and I get a list of 12 files, one of which is freenect_throttle.launch

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-22 17:14:59 -0500 )edit

I solved it. +1 for your helpful efforts.

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-24 15:25:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-22 10:40:18 -0500

Seen: 1,914 times

Last updated: Apr 24 '16