ImportError: No module named msg
While i am launching roslaunch my_dynamixel_tutorial controller_manager.launch i am getting this error. It works fine till yesterday & i controlled dynamixel motors with my algorithm. But all of sudden it appears today after i run catkin_make
F File "/home/adirosgaz/catkin_ws/src/dynamixel_motor/dynamixel_controllers/nodes/controller_manager.py", line 52, in <module> from dynamixel_driver.dynamixel_serial_proxy import SerialProxy File "/home/adirosgaz/catkin_ws/src/dynamixel_motor/dynamixel_driver/src/dynamixel_driver/dynamixel_serial_proxy.py", line 63, in <module> from dynamixel_msgs.msg import MotorState ImportError: No module named msg
Thanks for all, for your valuable suggestions & support.
i am working with ros & dynamixel motors for past 10 months. few days back i observed dynamixel_sdk & dynamixel_workbench packages & i installed it to see what extra features in it. As a process of installing, i cloned some files form git hub, in that files some consists of same package. while i am running my code it is calling that file instead of the original file. After a long detailed observation i found this.
I resolved my issue now.
Once again thanks for all.
Hi, add the following lines to the .bashrc file as well as update the current bash shell with it so that we don't get any build errors. #Update ROS path to ROS environment export
ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/<path_to_work_space_of_ros>
and then $ source ~/.bashrc
i did that but there is no change in that error
Can you run the command
printenv | grep ROS && printenv | grep PY
in a terminal and edit the question with the results please? Also, what changed between it working and not working? Was it just a catkin_make? Why did you catkin_make it, what was changed code-wise?@Akhilesh: please don't advise people to change
ROS_PACKAGE_PATH
by hand. It should not be necessary (setup.(ba)sh
does this for you) and can actually make problems harder to diagnose.@gvdhoorn: Actually, I have faced somewhat same problem that I fixed with the same as I mentioned above. If you think it's not at all correct way to solve this, then how to solve. And what should I call it, an error or an issue in ROS. Or am I making any mistake while installation.
Without more information I can't say anything about your problem or why changing
ROS_PACKAGE_PATH
worked in that case.With Catkin -- and any ROS version more recent than Hydro -- changing that variable manually should only be needed in very few cases.
In almost all other cases, modules ..
.. or packages not being found is caused by a workspace not having been setup correctly, missing dependency declarations in pkg manifests and / or
CMakeLists.txt
, manual editing of environment variables, incorrect workspace overlaying, forgetting tosource
the propersetup.bash
, etc, etc. .... All of those are fixable without manually changing
ROS_PACKAGE_PATH
.