Missing packages to use odrive via ROS melodic

Hi, currently I’m having some trouble in usage of ros package of this fantastic motor driver.
I referred this topic and I’m sure installed related packages.

After launching the launch file that is included in the package, by the command: roslaunch odrive_ros odrive.launch, while odrive_ros is my package name, the error occurs as below.

Traceback (most recent call last):
File “/home/ktd/catkin_ws/src/odrive_ros/nodes/odrive_node”, line 5, in
import odrive_ros
File “/home/ktd/catkin_ws/devel/lib/python2.7/dist-packages/odrive_ros/init.py”, line 34, in
exec(__fh.read())
File “”, line 1, in
File “/home/ktd/catkin_ws/src/odrive_ros/src/odrive_ros/odrive_node.py”, line 8, in
import tf_conversions
File “/opt/ros/melodic/lib/python2.7/dist-packages/tf_conversions/init.py”, line 30, in
from .posemath import *
File “/opt/ros/melodic/lib/python2.7/dist-packages/tf_conversions/posemath.py”, line 34, in
from PyKDL import *
ImportError: No module named sip
[odrive/odrive-2] process has died [pid 26242, exit code 1, cmd /home/ktd/catkin_ws/src/odrive_ros/nodes/odrive_node __name:=odrive __log:=/home/ktd/.ros/log/6ebcde8e-3fbd-11eb-92f4-7085c25ebdcc/odrive-odrive-2.log].
log file: /home/ktd/.ros/log/6ebcde8e-3fbd-11eb-92f4-7085c25ebdcc/odrive-odrive-2*.log

I can see there is an problem that I’ve not installed the module named sip, but I can’t install it by the command pip install sip.
The error message is as below:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement sip (from versions: none)
ERROR: No matching distribution found for sip
WARNING: You are using pip version 20.3.1; however, version 20.3.3 is available.
You should consider upgrading via the ‘/home/ktd/.pyenv/versions/2.7.17/envs/odrive_ros/bin/python -m pip install --upgrade pip’ command.

I know it’s not a matter of this motor driver, but I couldn’t find a possible solution for this problem as far as I’ve searched.
Is there anyone else that have overcame this problem? I’m glad if I can have some suggestions… thankyou.

lmgtfy:



apt-get install python-sip
:stuck_out_tongue_winking_eye:

@towen Thank you for your reply.

Sorry but I think I should post the list of what I’ve done before consulting this forum(actually, I forgot them…), but that haven’t work.

sudo apt-get install python-sip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-sip is already the newest version (4.19.7+dfsg-1ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.

I also tried to install PyKDL that is indicated in the middle of the error message, and neither it worked.

pip install PyKDL
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting PyKDL
  Using cached PyKDL-1.4.0-cp27-cp27mu-manylinux1_x86_64.whl (2.0 MB)
ERROR: Could not find a version that satisfies the requirement sip (from PyKDL) (from versions: none)
ERROR: No matching distribution found for sip (from PyKDL)
WARNING: You are using pip version 20.3.1; however, version 20.3.3 is available.
You should consider upgrading via the '/home/ktd/.pyenv/versions/2.7.17/envs/odrive_ros/bin/python -m pip install --upgrade pip' command.

Hmm. Have you tried migrating to python3 for everything? You might find that it all works in there.
As your PIP warns, python2 will be deprecated in 3 weeks’ time, so you should not expect Debian, pip etc to work for it in future!

Thanks, and that’s totally right… currently I’m using python2.7 intentionally to have every packages to be compatible to ROS melodic in Ubuntu18.04.

Maybe I should make my own package with python3 (or 2.7 without provided ROS packages, since at least I can import odrive package in python2 too)

@towen @KTD-prototype I faced the same issue on Melodic ROS. I am running from Jetson platform on Jetpack 4.5. ROS2 does not support every libraries yet. What should I do?

expert-bot@expertbot-desktop:~$ rosrun odrive_ros odrive_node
Traceback (most recent call last):
File “/home/expert-bot/catkin_ws/src/odrive_ros/nodes/odrive_node”, line 5, in
import odrive_ros
File “/home/expert-bot/catkin_ws/devel/lib/python2.7/dist-packages/odrive_ros/init.py”, line 34, in
exec(__fh.read())
File “”, line 1, in
File “/home/expert-bot/catkin_ws/src/odrive_ros/src/odrive_ros/odrive_node.py”, line 26, in
from odrive_interface import ODriveInterfaceAPI, ODriveFailure
File “/home/expert-bot/catkin_ws/src/odrive_ros/src/odrive_ros/odrive_interface.py”, line 9, in
import odrive
ImportError: No module named odrive