File reading and roslaunch
Hello,
I built a node which simply reads a file and builds a vector of data from it. However, when i tried running the node from roslaunch instead of rosrun, according to the log file, it ca n longer open the said data.txt file, causing my node to shutdown. I tried moving the file around but the problem persists. Here is the code
ifstream vel("ros_workspace/odometry/traj.txt");
if(!vel.is_open()
{
ROS_INFO("file not found!");
ros::shutdown();
}
I am new to ROS and not very familiar with the PATHS, don't even know if the problem comes from there, so this might be a very simple question.
Thanks! Barbosa
Hi, I am unable to read a test file to build a vector from it. Would you please share your code of reading a file and building a vector of data. Thanks