ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
523 stars 527 forks source link

rosrun rosserial_python serial_node.py not work #561

Open Keddie-yang opened 3 years ago

Keddie-yang commented 3 years ago

ROS version: Melodic Operating System: Ubuntu 18.04 Bionic Processor: Xavier AGX

Question: I create custom message by rosserial_arduino.

rosrun rosserial_arduino make_libraries.py /home/agx/Arduino/libraries my_msg

Then I star rosserial_python to let ros&arduino connection, but occur error

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=9600

error messages show:

Traceback (most recent call last):
  File "/home/agx/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 39, in <module>
    from rosserial_python import SerialClient, RosSerialServer
  File "/home/agx/catkin_ws/devel/lib/python2.7/dist-packages/rosserial_python/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 1, in <module>
  File "/home/agx/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 41, in <module>
    import queue
ImportError: No module named queue

Does anyone can help?

seyit05 commented 2 years ago

i have same problem could you help?

grammers commented 2 years ago

I hade the same issue. I changed import queue to from Queue import Queue in the file /home/agx/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py