ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You should put in the whole path for where you want the file to be written.
myfile.open("/home/user/example.txt")
That way the file is always created in /home/user/ and not the directory ros runs the program from.