rosparam unable to find yaml file
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/navigation-stack-rosparam-error-help/ 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
Asked by igd on 2016-06-28 13:29:39 UTC
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.Asked by jarvisschultz on 2016-06-28 15:43:58 UTC
My suspicion is that this is what is causing the issue. Try either replacing the tilde with
/home/<your username>
or using afind
substitution arg. If neither of those work, could you please post your complete launch file?Asked by jarvisschultz on 2016-06-28 15:45:18 UTC
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
Asked by igd on 2016-06-28 16:17:29 UTC
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
.Asked by jarvisschultz on 2016-06-28 16:31:57 UTC
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)?Asked by jarvisschultz on 2016-06-28 16:37:55 UTC
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?
Asked by igd on 2016-06-29 12:59:35 UTC
By the way using /home// 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.
Asked by igd on 2016-06-29 13:04:46 UTC
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.
Asked by jarvisschultz on 2016-06-29 15:50:53 UTC
Does your workspace actually need an isolated build? If not, don't use it... that could be part of your problem. Do you need to be using the "install" args to either catkin or catkin_make_isolated? If not, don't and source the devel directories. Or update the install targets to include these YAMLs
Asked by jarvisschultz on 2016-06-29 15:53:56 UTC
For example, check out how the turtlebot_navigation package sets install targets to ensure config files get installed: https://github.com/turtlebot/turtlebot_apps/blob/e49d54f3c5cf1f177603a560413f9f4f0fc62520/turtlebot_navigation/CMakeLists.txt#L25-L50
Asked by jarvisschultz on 2016-06-29 15:55:32 UTC