Jetbot catkin_make error in ros_deep_learning

I was completely stuck at the step while building jetbot ros_deep_learning. I googled everything, hardly find the right solution to overcome the issue…Please, anyone can give me a heads up? much appreciated.
The command is:jetbot@jetbot:~/workspace/catkin_ws$ catkin_make

Base path: /home/jetbot/workspace/catkin_ws
Source space: /home/jetbot/workspace/catkin_ws/src
Build space: /home/jetbot/workspace/catkin_ws/build
Devel space: /home/jetbot/workspace/catkin_ws/devel
Install space: /home/jetbot/workspace/catkin_ws/install


– Build files have been written to: /home/jetbot/workspace/catkin_ws/build

Running command: “make -j2 -l2” in “/home/jetbot/workspace/catkin_ws/build”

Scanning dependencies of target imagenet
Scanning dependencies of target segnet
[ 8%] Building CXX object ros_deep_learning/CMakeFiles/imagenet.dir/src/node_imagenet.cpp.o
[ 16%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘int main(int, char**)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:254:28: error: ‘class segNet’ has no member named ‘GetClassDesc’; did you mean ‘GetClassPath’?
const char* label = net->GetClassDesc(n);
^~~~~~~~~~~~
GetClassPath
ros_deep_learning/CMakeFiles/segnet.dir/build.make:62: recipe for target ‘ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o’ failed
make[2]: *** [ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o] Error 1
CMakeFiles/Makefile2:530: recipe for target ‘ros_deep_learning/CMakeFiles/segnet.dir/all’ failed
make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 25%] Building CXX object ros_deep_learning/CMakeFiles/imagenet.dir/src/image_converter.cpp.o
[ 33%] Linking CXX executable /home/jetbot/workspace/catkin_ws/devel/lib/ros_deep_learning/imagenet
/usr/bin/ld: cannot find -lQt4::QtGui
collect2: error: ld returned 1 exit status
ros_deep_learning/CMakeFiles/imagenet.dir/build.make:153: recipe for target ‘/home/jetbot/workspace/catkin_ws/devel/lib/ros_deep_learning/imagenet’ failed
make[2]: *** [/home/jetbot/workspace/catkin_ws/devel/lib/ros_deep_learning/imagenet] Error 1
CMakeFiles/Makefile2:1367: recipe for target ‘ros_deep_learning/CMakeFiles/imagenet.dir/all’ failed
make[1]: *** [ros_deep_learning/CMakeFiles/imagenet.dir/all] Error 2
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2
Invoking “make -j2 -l2” failed

Hi, this issue was fixed a couple weeks ago - can you delete and re-clone your copies of ros_deep_learning and jetbot_ros?

Yes, I have deleted and re-clone the copies of ros_deep_learning and jetbot_ros,and I reinstalled libqt4.It remains the same.

/usr/bin/ld: cannot find -lQt4::QtGui

I downloaded the ros_deep_learning and jetbot_ros package today in another jetbot, the problem is the same too.

That is strange, as I re-downloaded here and they compiled and installed OK.

So this error seems to indicate that your ros_deep_learning repo is up-to-date, but perhaps your jetson-inference needs updating. Can you try re-installing jetson-inference (master branch) if you haven’t already?

Neither jetson-inference or ros_deep_learning depend on Qt4 anymore, as you can see from ros_deep_learning/CMakeLists.txt it is commented out. Can you confirm that your CMakeLists.txt shows the same?

Thank you very much.Today I delete the whole directory “catkin_ws”,and recloned the package.It’s all working well. But when I run the “roscore” and “rosrun jetbot_motor” ,another problem happened,just like the following:
jetbot@jetbot:~$ rosrun jetbot_ros jetbot_motors.py
Traceback (most recent call last):
File “/home/jetbot/workspace/catkin_ws/src/jetbot_ros/scripts/jetbot_motors.py”, line 75, in
motor_driver = Adafruit_MotorHAT(i2c_bus=1)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_MotorHAT/Adafruit_MotorHAT_Motors.py”, line 231, in init
self._pwm = PWM(addr, debug=False, i2c=i2c, i2c_bus=i2c_bus)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py”, line 59, in init
self.setAllPWM(0, 0)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py”, line 95, in setAllPWM
self.i2c.write8(self.__ALL_LED_ON_L, on & 0xFF)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py”, line 114, in write8
self._bus.write_byte_data(self._address, register, value)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_PureIO/smbus.py”, line 256, in write_byte_data
self._device.write(data)
IOError: [Errno 121] Remote I/O error

and it is the same error with “pioled” too,as the following:
jetbot@jetbot:~$ rosrun jetbot_ros jetbot_oled.py
Traceback (most recent call last):
File “/home/jetbot/workspace/catkin_ws/src/jetbot_ros/scripts/jetbot_oled.py”, line 43, in
disp.begin()
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_SSD1306/SSD1306.py”, line 148, in begin
self._initialize()
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_SSD1306/SSD1306.py”, line 292, in _initialize
self.command(SSD1306_DISPLAYOFF) # 0xAE
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_SSD1306/SSD1306.py”, line 129, in command
self._i2c.write8(control, c)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py”, line 114, in write8
self._bus.write_byte_data(self._address, register, value)
File “/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_PureIO/smbus.py”, line 256, in write_byte_data
self._device.write(data)
IOError: [Errno 121] Remote I/O error

When I use the command i2c detect,there is a warning:
jetbot@jetbot:~/workspace/catkin_ws$ i2cdetect -y 1
Warning: Can’t use SMBus Quick Write command, will skip some addresses
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30: – -- – -- – -- – --
40:
50: – -- – -- – -- – -- – -- – -- – 5d – --
60:
70:

Glad that you got it building - is your user a member of the i2c usergroup?

See the usermod command from this step: https://github.com/dusty-nv/jetbot_ros#install-adafruit-libraries

$ sudo usermod -aG i2c $USER

Yes, I have run the command

I can run the camera.“rosrun jetbot_ros jetbot_camera” ,that command is OK

I have run the command “$ sudo usermod -aG i2c $USER”,the problem remains the same.

and I reinstalled the lib: Adafruit-MotorHAT and Adafruit-SSD1306

Hi xiaohuih, unfortunately I am unsure what the i2c issue you face is, as I don’t see this problem here with my JetBot.

Is this a JetBot that you sourced the parts for yourself, or did you order it from one of these vendors?

If you use the default JetBot software from https://github.com/nvidia-ai-iot/jetbot, do you see the i2c problem? If so, maybe best to double-check the wiring.

Yes,I ordered it from Sparkfun,https://www.sparkfun.com/products/15365,which is SparkFun JetBot AI Kit.The wield thing is that both two jetbot had been well at the command “rosrun jetbot_ros jetbot_motors.py” before,but now they do not response to the command and the reminder is the same "IOError: [Errno 121] Remote I/O error "

Hi, I bought it from Sparkfun also. The command rosrun jetbot_ros jetbot_camera works. It is publishing the camera frames. However when I run
rosrun jetbot_ros jetbot_motors.py and
rosrun jetbot_ros jetbot_oled.py

I get similar errors, respectively.

Traceback (most recent call last):
File “/home/jetbot/workspace/catkin_ws/src/jetbot_ros/scripts/jetbot_motors.py”, line 5, in
import qwiic_scmd
ImportError: No module named qwiic_scmd

and

Traceback (most recent call last):
File “/home/jetbot/workspace/catkin_ws/src/jetbot_ros/scripts/jetbot_oled.py”, line 5, in
import Adafruit_SSD1306
ImportError: No module named Adafruit_SSD1306

Sparkfun’s jetbot_ros has updated the jetbot_motors.py so instead of Adafruit_MotorHAT, the code imports qwiic scmd

I tried using the following in the .bashrc
export LD_LIBRARY_PATH=/usr/local/lib:/opt/ros/melodic/lib

It did not work.

I can see both the qwiic modules (oled and scmd) on i2c bus

jetbot@jetson:~$ i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using receive byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – 3d – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – 5d – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Any help will be appreciated.

Hi akhondke,

Please help to open a new topic for your issue. Thanks