Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ImportError: No module named gobject (for ROS kinetic, melodic) #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/naoqi_dashboard/avahi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

import dbus, gobject, dbus.glib

from python_qt_binding.QtGui import QComboBox
import dbus, dbus.glib
from gi.repository import GObject as gobject

from distutils.version import LooseVersion
import python_qt_binding
if LooseVersion(python_qt_binding.QT_BINDING_VERSION).version[0] >= 5:
from python_qt_binding.QtWidgets import QComboBox
else:
from python_qt_binding.QtGui import QComboBox

import collections

Expand Down
9 changes: 7 additions & 2 deletions src/naoqi_dashboard/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@
from rqt_robot_dashboard.monitor_dash_widget import MonitorDashWidget
from rqt_robot_dashboard.console_dash_widget import ConsoleDashWidget

from PyQt4 import QtGui, QtCore
from distutils.version import LooseVersion
import python_qt_binding
if LooseVersion(python_qt_binding.QT_BINDING_VERSION).version[0] >= 5:
from python_qt_binding.QtWidgets import QLabel
else:
from PyQt4.QtGui import QLabel

class NAOqiDashboard(Dashboard):

Expand Down Expand Up @@ -110,7 +115,7 @@ def get_widgets(self):
self._motors_button],
[self._power_state_ctrl],
#[self.posture_combobox, self.posture_button]
[QtGui.QLabel("Posture"), self._postures]
[QLabel("Posture"), self._postures]
]


Expand Down
7 changes: 6 additions & 1 deletion src/naoqi_dashboard/motors.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
# Ported from pr2_motors: Vincent Rabaud, Aldebaran Robotics, 2014
#

from python_qt_binding.QtGui import QMessageBox
from distutils.version import LooseVersion
import python_qt_binding
if LooseVersion(python_qt_binding.QT_BINDING_VERSION).version[0] >= 5:
from python_qt_binding.QtWidgets import QMessageBox
else:
from python_qt_binding.QtGui import QMessageBox

import actionlib
import rospy
Expand Down
7 changes: 6 additions & 1 deletion src/naoqi_dashboard/posture.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
import actionlib
import rospy

from python_qt_binding.QtGui import QComboBox, QMessageBox
from distutils.version import LooseVersion
import python_qt_binding
if LooseVersion(python_qt_binding.QT_BINDING_VERSION).version[0] >= 5:
from python_qt_binding.QtWidgets import QComboBox, QMessageBox
else:
from python_qt_binding.QtGui import QComboBox, QMessageBox
from naoqi_bridge_msgs.msg import BodyPoseWithSpeedAction, BodyPoseWithSpeedGoal

class PostureWidget(QComboBox):
Expand Down