rosparam unable to find yaml file

asked 2016-06-28 13:29:39 -0500

igd gravatar image

updated 2016-06-28 16:33:50 -0500

I am following the navigation stack tutorial and an unable to launch the move_base node. rosparam is unable to find the yaml files with the costmap and planner configuration

error loading <rosparam> tag: 
file does not exist [~/ros_catkin_ws/src/erle_rover_2dnav/costmap_common_params.yaml]
 XML is <rosparam command="load" file="~/ros_catkin_ws/src/erle_rover_2dnav/costmap_common_params.yaml" ns="global_costmap"/>

The issue is the same as in this question, http://answers.ros.org/question/64615... but the suggested solution of deleting and remaking the file did not work for me. I have verified that the file is in the specified location and the code should be fine as it came directly from the navigation tutorial.

EDIT- Here's the launch file and resulting error code when using find

<launch>
  <master auto="start"/>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find erle_rover_2dnav)/src/erle_rover_2dnav/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find erle_rover_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find erle_rover_2dnav)/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find erle_rover_2dnav)/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find erle_rover_2dnav)/base_local_planner_params.yaml" command="load" />
  </node>
</launch>



error loading <rosparam> tag: 
file does not exist [/home/erle/ros_catkin_ws/install_isolated/share/erle_rover_2dnav/src/erle_rover_2dnav/costmap_common_params.yaml]
XML is <rosparam command="load" file="$(find erle_rover_2dnav)/src/erle_rover_2dnav/costmap_common_params.yaml" ns="global_costmap"/>
The traceback for the exception was written to the log file
edit retag flag offensive close merge delete

Comments

Your problem is not the same as the one linked in your question. In that question the OP was using $(find navigation_for_segbot) to resolve the location of a package. You should be doing the same. Your error indicates you are using "~" to stand in for your home directory in a <rosparam> tag.

jarvisschultz gravatar image jarvisschultz  ( 2016-06-28 15:43:58 -0500 )edit

My suspicion is that this is what is causing the issue. Try either replacing the tilde with /home/<your username> or using a find substitution arg. If neither of those work, could you please post your complete launch file?

jarvisschultz gravatar image jarvisschultz  ( 2016-06-28 15:45:18 -0500 )edit

It is the same as the linked problem. I originally had the find then tried hardcoding the file path because it was not working. It produced the same error. I've edited the original question with the original launch file and resulting error

igd gravatar image igd  ( 2016-06-28 16:17:29 -0500 )edit

Fair enough... I'm fairly certain a tilde in your hardcoded path will not work and will produce the exact error the question contains. Please post the exact roslaunch file, and corrected error msg. Also post the output of ls -la ~/ros_catkin_ws/src/erle_rover_2dnav/costmap_common_params.yaml.

jarvisschultz gravatar image jarvisschultz  ( 2016-06-28 16:31:57 -0500 )edit

Notice that the path that find returns is different than what you are hardcoding? Is there a copy of the yaml file at the location indicated in the new error message (I expect not)?

jarvisschultz gravatar image jarvisschultz  ( 2016-06-28 16:37:55 -0500 )edit

Good catch, the directories listed don't even exist. There is no src within my packages folder in the install_isolated. Is my workflow off? I've put my yaml and launch files in ros_catkin_ws/src/erle_rover_2dnav. Is that incorrect?

igd gravatar image igd  ( 2016-06-29 12:59:35 -0500 )edit

By the way using /home/<username>/ instead of ~ did work, if you'd like to post that as an answer I'll accept it. Although I would be interested in knowing what I'm doing wrong with the find arg. Thanks for the help.

igd gravatar image igd  ( 2016-06-29 13:04:46 -0500 )edit

Glad to hear the full path did work. It seems that you've used the catkin_make_isolated command to build your workspace (and you've sourced the setup.bash from the install_isolated directory). This is the root cause of why the find arg isn't working.

jarvisschultz gravatar image jarvisschultz  ( 2016-06-29 15:50:53 -0500 )edit