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

ImportError: No module named QtCore [closed]

asked 2016-06-14 11:50:01 -0600

bhavyadoshi26 gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by bhavyadoshi26
close date 2016-09-07 09:26:41.681369

Comments

Please explain why you have a clone of the robot_model source repository in your workspace.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-14 12:22:28 -0600 )edit

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?

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2016-06-16 07:29:49 -0600 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-16 08:03:01 -0600 )edit

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 have sourced the appropriate setup.bash). That installs all dependencies for you.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-16 08:04:03 -0600 )edit

How do I use apt-get to install binary ROS packages in the root directory?

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2016-06-16 08:30:29 -0600 )edit

What is the "root directory"? apt-get will always install packages system-wide. The fact that you run rosdep install .. and point it to your catkin workspace has nothing to do with where it installs packages.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-16 08:33:26 -0600 )edit

I did the rosdep install .. and all the dependencies were satisfied. But the error still persists. What could be the issue?

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2016-06-16 09:00:00 -0600 )edit

Have you removed all the robot_model packages from your catkin_ws/src directory? If you are not planning on working on robot_model or any of its packages, remove it from your workspace. Then run rosdep install .. again. Then remove your devel and build folder and rebuild your ws.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-16 09:19:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-16 11:05:29 -0600

bhavyadoshi26 gravatar image

The last comment of gvdhoorn was the solution. I removed robot_model packages and ran rosdep install .. and then removed the devel and build folders and ran catkin_make. That did the trick.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-14 11:50:01 -0600

Seen: 2,198 times

Last updated: Jun 16 '16