Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noetic support #27

Open
simonbogh opened this issue Oct 21, 2020 · 8 comments
Open

Noetic support #27

simonbogh opened this issue Oct 21, 2020 · 8 comments

Comments

@simonbogh
Copy link

simonbogh commented Oct 21, 2020

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()).

@jeevan-git

This comment was marked as outdated.

@juluwuu
Copy link

juluwuu commented Jan 18, 2022

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

@chaitanyantr
Copy link

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

@AlexGarciaG
Copy link

I think that the solution is in this pull request #31 (comment)
I tested it, and it worked properly.

@chaitanyantr
Copy link

Thankyou will try it.

@leonsuetfeld
Copy link

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

@JChiaHH
Copy link

JChiaHH commented Jun 24, 2023

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
Copy link

JChiaHH commented Jun 24, 2023

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants