roboclaw_ros icon indicating copy to clipboard operation
roboclaw_ros copied to clipboard

Noetic support

Open simonbogh opened this issue 4 years ago • 8 comments

Hi,

Has anyone succeeded in using the package in ROS Noetic on Ubuntu 20.04?

My roboclaw_node process dies during launch, and running the python file directly gives the following error:

TypeError: unicode strings are not supported, please encode to bytes: '\x80'

I suspect this has something to do with the python environment being Python 3.x and the lines containing port.write(chr()).

simonbogh avatar Oct 21 '20 11:10 simonbogh

same here does any one has used this package for ROS Noetic on Ubuntu 20.04?

jeevan-git avatar Mar 24 '21 04:03 jeevan-git

Hello,

I am using ROS Noetic and Ubuntu 20.04 and had the same problem with this package.

Apparently it was because roboclaw_driver.py was not the latest version for Python 3.x. A similar problem is discussed in this forum entry: https://forums.basicmicro.com/viewtopic.php?f=2&t=815&sid=dabc655ec1568e78b3e884020364eb1a&start=10.

You can copy the roboclaw_3.py library and rename it to roboclaw_driver.py and delet the old driver file. Download of the roboclaw_3.py library can be found here under "Python Example for Raspberry Pi, OSX, Linux, Windows": https://www.basicmicro.com/downloads

juluwuu avatar Jan 18 '22 09:01 juluwuu

Any one succed in ROS roboclaw package in noetic(python3). I still have this issue.

chaitanyantr avatar Oct 30 '22 03:10 chaitanyantr

I think that the solution is in this pull request https://github.com/sonyccd/roboclaw_ros/pull/31#issue-1114432419 I tested it, and it worked properly.

AlexGarciaG avatar Oct 31 '22 03:10 AlexGarciaG

Thankyou will try it.

chaitanyantr avatar Oct 31 '22 05:10 chaitanyantr

In my case, replacing the file roboclaw.py by roboclaw_3.py (both in /roboclaw_python/) fixed it.

leonsuetfeld avatar Jan 20 '23 12:01 leonsuetfeld

Hi i've also tried to use the amended roboclaw_3 driver in the pull request, however the roboclaw driver is unresponsive only when using the new driver on ROS Noetic with python2. It is responsive on ROS Melodic with python3.

i also noticed that there when the self.port command was used this way in roboclaw_driver.py: self._port.write(chr(address)) on python2, the roboclaw is able to receive data from my python script. However when edited command in the roboclaw_driver in the pull request self._port.write(address.to_bytes(1, 'big')) on python3, the driver is not receiving data from my python script.

I have tried multiple ways but i could not get the driver to receive data from my script, does anyone know how I can overcome this problem?

JChiaHH avatar Jun 24 '23 20:06 JChiaHH

could it be because the motor driver receive commands in unicode strings only and it is unable to receive in bytes (i'm not sure)?

JChiaHH avatar Jun 24 '23 20:06 JChiaHH