ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
While using roslaunch, all relative paths are evaluated from ~/.ros
. So the file is being searched at the location ~/.ros/ros_workspace/odometry/traj.txt
.
A much better solution is to provide the filename as an input parameter. You can place the file in one of your packages, and use the find substitution to locate the file. Checkout the roslaunch XML wiki page for an example using manifest.xml
. You can then use the roscpp parameter api to obtain this parameter in your code.