UART communication problem with board using odrivetool for python 2.7

I stacked upon weird (at least for me) issue, that I can’t connect to odrive board via UART, while using python 2.7 version of odrivetool. At the same time, if use python 3 version, I can connect without problem. The problem is - I have to use python 2.7 as main version of python, cause I working on autonomous robot, that is controlled under ROS melodic, which is heavily relying on 2.7 python for internal calculations. So, is there any way on how I can connect to board, while using older version of odrivetool, or I have to work on ROS side, and make it (somehow) fully compatible with python3?

Unfortunately we dropped support for Python 2.7. Odrivetool now uses some async language constructs which are not available in Python 2.7. Those changes are not yet on pip but we stopped testing on Python 2.7 since Spring 2020 I believe.

Note that Python 2.7 is End-Of-Life since Jan 1st 2020 and as such I would recommend against using it at all. I don’t know why ROS melodic would ship in 2018 with Python 2.7 since its EOL has been known since 2014.

So if you can I would suggest upgrading ROS to Python 3.x or upgrading to a newer ROS release. If not, maybe it’s possible to run your ODrive-node in Python 3.x and everything else in Python 2.7.

Thanks for the reply. The problem mainly in nvidia Jetson and its variation of Ubuntu. Its based currently on Ubuntu 18.04 and not really supports Python 3 (only dev version). And cause its 18.04, I can’t really move to newer ROS release, otherwise I would already move everything to latest version and Python 3.

This sounds strange, Ubuntu – Details of package python3 in bionic indicates that Ubuntu 18.04 has a python3 package for AArch64 (aka arm64). So unless you’re using a custom distribution with alternative package repositories you should be able to obtain it through sudo apt-get install python3.

It is indeed custom distribution made by nvidia for their boards. For some reason they are not providing standard python 3 in it (which is known problem both by peoples in nvidia and by community, but the solution for how to get python 3 scripts to work not exactly works well with ROS).