ImportError: No module named QtCore [closed]
I have my robot model as a URDF file and when I launch it in a launch file to display it in Rviz, I get the following error :
Traceback (most recent call last):
File "/home/****/first_workspace/src/robot_model/joint_state_publisher/joint_state_publisher/joint_state_publisher", line 6, in <module>
from python_qt_binding.QtCore import Qt
ImportError: No module named QtCore
[joint_state_publisher-2] process has died [pid 44456, exit code 1, cmd /home/****/first_workspace/src/robot_model/joint_state_publisher/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/****/.ros/log/8bb4a410-324b-11e6-812c-480fcf447f3c/joint_state_publisher-2.log].
log file: /home/***/.ros/log/8bb4a410-324b-11e6-812c-480fcf447f3c/joint_state_publisher-2*.log
What could be the issue here?
Please explain why you have a clone of the
robot_model
source repository in your workspace.When I checked for the package dependency of
robot_model
, it was not satisfied. So I decided to clone it in my workspace and try to satisfy all the dependencies. Is that a wrong method?It depends: by default, you'll want to install binary packages. On Ubuntu, those are installed using
apt-get
or the Software Centre. Only if you want to develop the package your installing, or are running a system for which no binaries exist, you compile from source.As to how to then satisfy dependencies (for packages you created yourself, or cloned from someone else): run
rosdep install --from-paths /path/to/your/catkin_ws/src --ignore-src
(after you havesource
d the appropriatesetup.bash
). That installs all dependencies for you.How do I use
apt-get
to install binary ROS packages in the root directory?What is the "root directory"?
apt-get
will always install packages system-wide. The fact that you runrosdep install ..
and point it to your catkin workspace has nothing to do with where it installs packages.I did the
rosdep install ..
and all the dependencies were satisfied. But the error still persists. What could be the issue?Have you removed all the
robot_model
packages from yourcatkin_ws/src
directory? If you are not planning on working onrobot_model
or any of its packages, remove it from your workspace. Then runrosdep install ..
again. Then remove yourdevel
andbuild
folder and rebuild your ws.