rosserial "NameError: name 'client' is not defined"
I am very new to ROS and Arduino, I am trying to use rosserial to realize the communication between my computer and Arduino. I can upload the program to Arduino successfully. But when I run rosserial_python,there is error:
ImportError: No module named queue
I changed import queue into import Queue in file SerialClient.py, then new error appear as:
[INFO] [1603106570.886915]: ROS Serial Python Node
[INFO] [1603106570.897550]: Connecting to /dev/ttyACM0 at 57600 baud
[WARN] [1603106570.900234]: Unexpected Error: <type 'exceptions.NameError'>
Traceback (most recent call last):
File "/home/xiao/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 99, in <module>
client.port.close()
NameError: name 'client' is not defined
So what is the problem here? how should I fix it? Thanks for any advice
Add the relevant code please.