# Troubleshooting "Intro to tf" tutorial

Hello all,

I'm working through the tf tutorial at http://www.ros.org/wiki/tf/Tutorials/... , but when I get to Step #5, I get the following error:

/opt/ros/diamondback/stacks$rosrun tf view_frames Listening to /tf for 5.000000 seconds Done Listening Traceback (most recent call last): File "/opt/ros/diamondback/stacks/geometry/tf/scripts/view_frames", line 130, in <module> generate(dot_graph) File "/opt/ros/diamondback/stacks/geometry/tf/scripts/view_frames", line 85, in generate with open('frames.gv', 'w') as outfile: IOError: [Errno 13] Permission denied: 'frames.gv'  Would someone be so kind as to tell me what this error means by "permission" (I have root priveleges but sudo rosrun tf view_frames just errored)? And how to go about obtaining that permission? I'm working on a virtual machine with Ubuntu 10.05 and ROS Diamondback installed. My physical machine has Windows Vista, if that's important. Thanks, Khiya edit retag close merge delete ## 1 Answer Sort by » oldest newest most voted You need to change directory out of /opt/ros... -- this is a system directory, and so you don't have permission to create a file there. I suggest you: $ cd
\$ rosrun tf view_frames


This will put you in your home directory, and you'll be able to then open the PDF from there.

more

Thanks, that did work. When I first tried this command I was in my ~/ros_tutorials directory, self-created after running through the Intro to ROS tutorials. I received the same error there, even though it's part of my home directory. What's up with that?
( 2011-06-29 05:58:40 -0500 )edit
Did you happen to create the directory as "sudo"? My general rule of thumb with ROS is: except for "apt-get", you shouldn't need sudo, and if you think you need sudo, you're probably doing something wrong.
( 2011-06-29 06:51:16 -0500 )edit
Interesting. Yes, I probably did use "sudo" to create the ~/ros_tutorials directory - so "sudo" makes the OS gods think they own whatever "sudo" is creating, and so unless you keep using "sudo" they don't let you edit anything created with "sudo"? Thanks!
( 2011-06-29 08:09:05 -0500 )edit
Yes, any command run with "sudo" is run as root. If you did an "ls -l" on the directory, you would likely see that "root" was the owner of all the files.
( 2011-06-29 09:38:01 -0500 )edit