ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Failed to open settings file at: Data/Asus.yaml

asked 2018-10-03 19:13:35 -0500

tengfei han gravatar image

I am trying to run ORB_SLAM with my own drone. when typing

 roslaunch SLAM SLAM.launch

here is the launch file:

<launch>
  <node name="SLAM" pkg="SLAM" type="SLAM" args="Data/ORBvoc.txt Data/Asus.yaml"/>

</launch>

Then, I got a problem that has never seen before this time.

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.21

NODES
  /
    SLAM (SLAM/SLAM)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[SLAM-1]: started with pid [8329]
Failed to open settings file at: Data/Asus.yaml
[SLAM-1] process has died [pid 8329, exit code 255, cmd /home/htf/orb_ws/src/SLAM/bin/SLAM Data/ORBvoc.txt 

Data/Asus.yaml __name:=SLA

M __log:=/home/htf/.ros/log/99408892-c768-11e8-954c-80a589d234a5/SLAM-1.log].
log file: /home/htf/.ros/log/99408892-c768-11e8-954c-80a589d234a5/SLAM-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I do find the Asus.yaml under the "Data" folder, why it will happen? does anyone know how to fix this problem? thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-04 01:29:09 -0500

Delb gravatar image

updated 2018-10-04 01:30:12 -0500

You have an issue because you can't give the yaml file as an argument in the node tag. As discussed in #q274609, you have to modify your launch file like this model (the arg part isn't mandatory but useful if you have to include your launchfile in another one) :

<launch>
    <arg name="file_name" default="$(find my_package)/my_yaml.yaml"/>   
    <rosparam command="load" file="$(arg file_name)"/>
</launch>

So in your case it should look like this :

<launch>
   <node name="SLAM" pkg="SLAM" type="SLAM">
    <rosparam command="load" file="$(find YOUR_PACKAGE_NAME_WITH_DATA_FOLDER)/Data/Asus.yaml"/>
    <rosparam command="load" file="$(find YOUR_PACKAGE_NAME_WITH_DATA_FOLDER)/Data/ORBvoc.yaml"/>
   </node>
</launch>

Note 1 : You can add the rosparam tags outside the node tag if you want to share your parameters with other nodes.

Note 2 : If you didn't notice, I changed ORBvoc.txt to ORBvoc.yaml. I don't know what your txt file is but if you have to load parameters from this file too you can't pass another file than a yaml one so you'll have to change your file extension to yaml, see #q12284.

edit flag offensive delete link more

Comments

Please note that it could well be that SLAM node accepts regular command line arguments and doesn't work with ROS parameters. In that case the suggested approach here won't work.

Using absolute paths is always a good idea though.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-04 01:48:11 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-10-03 19:13:35 -0500

Seen: 1,294 times

Last updated: Oct 04 '18