ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I am still don't know the reason for that problem but I fixed it.
Now I am able to launch a python node with internal modules in "/scripts" folder as explained in ROS python guide.
For fixing it I have to do two things:
<depend package="std_msgs"/> <depend package="rospy"/> <depend package="roscpp"/> <depend package="tf"/> <depend package="smartcam_msgs"/> <depend package="anchor_mod"/>
For adding "/scripts" to python path when the node starts I have created a module named "rospy_helper". And I use it before importing "roslib" and "rospy".
import rospy_helper; rospy_helper.add_modules_to_path(); import roslib; roslib.load_manifest('anchor_mod') import rospy
Although I have solved the problem, if someone knows the reason please explain me. I would like to understand what is really happening. Thanks.
2 | No.2 Revision |
I am still don't know the reason for that problem but I fixed it.
Now I am able to launch a python node with internal modules in "/scripts" folder as explained in ROS python guide.
For fixing it I have to do two things:
<depend package="std_msgs"/> <depend package="rospy"/> <depend package="roscpp"/> <depend package="tf"/> <depend package="smartcam_msgs"/> <depend package="anchor_mod"/>
For adding "/scripts" to python path when the node starts I have created a module named "rospy_helper". And I use it before after importing "roslib" and "rospy".
import
rospy_helper; rospy_helper.add_modules_to_path(); importroslib; roslib.load_manifest('anchor_mod') import rospy import rospy_helper; rospy_helper.add_modules_to_path();
Although I have solved the problem, if someone knows the reason please explain me. I would like to understand what is really happening. Thanks.
3 | No.3 Revision |
I am still don't know the reason for that problem but I fixed it.
Now I am able to launch a python node with internal modules in "/scripts" folder as explained in ROS python guide.
For fixing it I have to do two things:
<depend package="std_msgs"/> <depend package="rospy"/> <depend package="roscpp"/> <depend package="tf"/> <depend package="smartcam_msgs"/> <depend package="anchor_mod"/>
For adding "/scripts" to python path when the node starts solving the second point I have created a module named "rospy_helper". And "rospy_helper" that adds the "/scripts" directory to python path when the node starts. I use it after importing "rospy".
import roslib; roslib.load_manifest('anchor_mod') import rospy import rospy_helper; rospy_helper.add_modules_to_path();
Although I have solved the problem, if someone knows the reason please explain me. I would like to understand what is really happening. Thanks.