[python2] Roboclaw instance has no attribute '_port'
[python2] Roboclaw instance has no attribute '_port'
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 :
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: [python2] Roboclaw instance has no attribute '_port'
This indicates opening the virtual comport failed. Make sure you used the proper name of the comport. Windows and Linux use completely different naming conventions.
Re: [python2] Roboclaw instance has no attribute '_port'
Hi,
Thanks.
The problem happens to be quite specific to the Jetson computer : the UART output is by default reserved for Serial debugging : in order to use it with the roboclaws, I had to disable the UART debugging.
Thanks.
The problem happens to be quite specific to the Jetson computer : the UART output is by default reserved for Serial debugging : in order to use it with the roboclaws, I had to disable the UART debugging.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: [python2] Roboclaw instance has no attribute '_port'
Thank you for posting this. We have had multiple Jetson users in the past that had issues and never had a resolution. This will help immensely.