Ask Your Question

ros python creating strange side effects

asked 2017-03-21 13:17:42 -0500

  • Ubuntu 16.04
  • ROS Kinetic

I have been working on a program in python. Created my package just like I always do. This time I thought I would give dynamic reconfigure a try. I did the tutorial and ran the code. I wind up with my mouse turning into a cross, the libraries I import become files in the directory I launched from and the path name in my bash prompt changes. Has anyone ever seen this before?

I can't get a screenshot of what happens to the pointer as it is not saved in screenshots.

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-21 13:23:43 -0500

NEngelhard gravatar image

updated 2017-03-21 13:30:22 -0500

Could you post the top part of the script you ran? I bet you forgot to add a #! /usr/bin/python or similar to the top of your file.

If you have an executable file like

import numpy
a = 1

and do an './', Ubuntu will assume a bash-script (as there is no shebang) Now the first command is 'import' which can be used to make partial screenshots: import (bash). This is also the reason why your mouse pointer changes. (just type 'import asd.png' and mark a region) This also explains the new files (it's just the images (most probably postscript files)).

edit flag offensive delete link more


This is why you don't make a template generator, if your template is wrong alllll the auto created files will be wrong.

That was it, I did not add it on my ROS templates.

sonyccd gravatar image sonyccd  ( 2017-03-21 13:25:42 -0500 )edit

which file did you run? Could you add it to your question?

NEngelhard gravatar image NEngelhard  ( 2017-03-21 14:19:23 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-03-21 13:17:42 -0500

Seen: 333 times

Last updated: Mar 21 '17