ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Troubleshooting "Intro to tf" tutorial

asked 2011-06-29 04:35:54 -0600

Khiya gravatar image

updated 2011-06-29 08:02:34 -0600

fergs gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
14

answered 2011-06-29 05:27:20 -0600

fergs gravatar image

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.

edit flag offensive delete link more

Comments

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?
Khiya gravatar image Khiya  ( 2011-06-29 05:58:40 -0600 )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.
fergs gravatar image fergs  ( 2011-06-29 06:51:16 -0600 )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!
Khiya gravatar image Khiya  ( 2011-06-29 08:09:05 -0600 )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.
fergs gravatar image fergs  ( 2011-06-29 09:38:01 -0600 )edit

Question Tools

Stats

Asked: 2011-06-29 04:35:54 -0600

Seen: 1,629 times

Last updated: Jun 29 '11