ros-naoqi / naoqi_dashboard

Visualization (dashboard) for the Nao in ROS
4 stars 7 forks source link

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

Open kochigami opened 2 years ago

kochigami commented 2 years ago

Related issue: https://github.com/ros-naoqi/naoqi_dashboard/issues/5 (My environment is Ubuntu 18.04, ROS melodic, naoqi_dashboard from source (branch: kochigami:modify-for-kinetic))

Edit: I also confirmed this PR works in Ubuntu 16.04, ROS kinetic.

First, I searched for files which use gobject

kochigami@kochigami-desktop:~/catkin_ws/src/naoqi_dashboard$ grep "gobject" -rl /home/kochigami/catkin_ws/src/naoqi_dashboard/
/home/kochigami/catkin_ws/src/naoqi_dashboard/src/naoqi_dashboard/avahi.pyc
/home/kochigami/catkin_ws/src/naoqi_dashboard/src/naoqi_dashboard/avahi.py

and then I modified import gi to from gi.repository import GObject as gobject in avahi.py. I referenced this page: Install gobject module?

With this PR, I confirmed the error disappeared when doing roslaunch naoqi_dashboard naoqi_dashboard.launch .

Also,

roslaunch pepper_bringup pepper_full.launch network_interface:=<My network interface>
roslaunch naoqi_dashboard naoqi_dashboard.launch 

made a NAOqi dashboard.