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

Revision history [back]

click to hide/show revision 1
initial version

It should be sufficient to have your ros environment set up. Meaning if you create your own ros package, make sure it is on the ROS_PACKAGE_PATH.

In your case the python file that has

import rospy

need to to have before that

import roslib
roslib.load_manifest('...')

with .. being either rospy or your package, but for the latter your package also needs to declare rospy in it's manifest.xml.

pychecker seems to be unable to check scripts that do not end with .py. The solution is to remove most of the code from such files like "my_node" and put the code inside the src folder. Then my_node can import the module from src, and pychecker can check the code in src.

It should be sufficient to have your ros environment set up. Meaning if you create your own ros package, make sure it is on the ROS_PACKAGE_PATH.

In your case the python file that has

import rospy

need to to have before that

import roslib
roslib.load_manifest('...')

with .. being either rospy or your package, but for the latter your package also needs to declare rospy in it's manifest.xml.

pychecker seems to be unable to check scripts that do not end with .py. The solution is to remove most of the code from such files like "my_node" and put the code inside the src folder. Then my_node can import the module from src, and pychecker can check the code in src.

EDIT: This should work in fuerte, and without roslib.load_manifest. In electric and earlier, load_manifest is required for pychecker. pyling ignores that, so pylint cannot find libraries in electric and before.

It should be sufficient to have your ros environment set up. Meaning if you create your own ros package, make sure it is on the ROS_PACKAGE_PATH.

In your case the python file that has

import rospy

need to to have before that

import roslib
roslib.load_manifest('...')

with .. being either rospy or your package, but for the latter your package also needs to declare rospy in it's manifest.xml.

pychecker seems to be unable to check scripts that do not end with .py. The solution is to remove most of the code from such files like "my_node" and put the code inside the src folder. Then my_node can import the module from src, and pychecker can check the code in src.

EDIT: This should work in fuerte, and without roslib.load_manifest. In electric and earlier, load_manifest is required for pychecker. pyling pylint ignores that, so pylint cannot find libraries in electric and before.