[python2] Roboclaw instance has no attribute '_port'
Posted: Tue Dec 15, 2020 8:19 am
Hi,
I'm currently duplicating the code to control my 2x60A roboclaws on a new robot.
When trying to execute my code, I get a strange error :
Do you have any idea what might be wrong?
I already installed pyserial, added the user to dialout group, and checked that the port /dev/ttyTHS0 exist
Hardware : Jeton xavier AGX developper kit, connected to 2 roboclaws 2x60A in serial (using GPIO, not USB)
Thanks a lot in advance
Felix
PS : please fin attached the corresponding ros node :
I'm currently duplicating the code to control my 2x60A roboclaws on a new robot.
When trying to execute my code, I get a strange error :
Code: Select all
Traceback (most recent call last):
File "/home/boroboxavier1/catkin_ws/src/borobo_ros/roboclaw/script/roboclaw_node.py", line 266, in <module>
roboclaw_node.runRoboClawNode()
File "/home/boroboxavier1/catkin_ws/src/borobo_ros/roboclaw/script/roboclaw_node.py", line 205, in runRoboClawNode
self.getSpeed()
File "/home/boroboxavier1/catkin_ws/src/borobo_ros/roboclaw/script/roboclaw_node.py", line 230, in getSpeed
buffer_g_front = roboclaw.ReadSpeedM1(ADDRESS_FRONT)
File "/home/boroboxavier1/catkin_ws/src/borobo_ros/roboclaw/script/roboclaw.py", line 697, in ReadSpeedM1
return self._read4_1(address,self.Cmd.GETM1SPEED)
File "/home/boroboxavier1/catkin_ws/src/borobo_ros/roboclaw/script/roboclaw.py", line 253, in _read4_1
self._port.flushInput()
AttributeError: Roboclaw instance has no attribute '_port'
I already installed pyserial, added the user to dialout group, and checked that the port /dev/ttyTHS0 exist
Hardware : Jeton xavier AGX developper kit, connected to 2 roboclaws 2x60A in serial (using GPIO, not USB)
Thanks a lot in advance
Felix
PS : please fin attached the corresponding ros node :