-
Notifications
You must be signed in to change notification settings - Fork 143
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
Ubuntu focal/ROS noetic compatibility #30
Comments
Hm. Could have sworn this was working. I'll work on this today and hopefully have an answer for you |
It appears that the way Python3 handles relative imports has changed between 3.6 and 3.8 (or at least the issue is replicable with those versions; I have 3.6.9 on my Melodic dev machine, and 3.8.5 in my Noetic VM). At this point it may be worthwhile to have separate melodic & noetic branches and merge @heuristicus' noetic branch into that. I tried the python-package-structure-noetic fork on my Melodic dev machine, and unfortunately it doesn't work on 18.04. |
I'm not super familiar with the guts of python but if you compare https://docs.python.org/3.6/reference/import.html and https://docs.python.org/3.7/reference/import.html#package-relative-imports, it looks like the relative imports change was introduced somewhere in 3.7. I suspect that if we remove the changes I made to the import lines but maintain the package structure changes, it would work on melodic as well. Since there are still a few years before melodic is end-of-life it might be good to have a noetic and melodic branch. Alternatively, and I don't know if this is a good idea, it should be possible to switch how imports work depending on which version of python is running, something like
This would save having to maintain two branches. If you're interested I could update my branch to use this mechanism and make a PR. |
Aha! I think the problem I was having on 18.04 was 2 things, both in the modified scripts/spot_ros file: Original:
Changed:
Applying those changes to your fork should enable everything to work correctly in 18.04 and 20.04. I am able to bring up the driver on my machine, but I don't have access to Spot hardware right now, so I can't verify that everything works. But Python doesn't throw a fit anymore immediately upon starting, which is a good sign. @dniewinski if you're able, can you try checking out the |
Ah, good catch. When using During our conversion of other code we initially explicitly specified that python 3 should be used, but since some of our code still needs to run melodic using |
Since #32 has been merged, I will close this issue. Thanks for the help in making this work. |
Our lab has recently moved to ubuntu 20.04/ROS noetic so I'm trying to set up our spot payload with that.
With the package set up as it currently is, I was unable to run spot_ros, due to various issues, some of which I have fixed in #29, which I did not encounter when we were still using melodic.
With those fixes I was still not able to run it, getting this error, or similar:
To me this seemed to be related to the set up of the python package, so I went ahead and created a branch which includes a modified package structure which works on noetic and which I believe is closer to the usual ros python package structure. You can find it at https://github.com/ori-drs/spot_ros/tree/python-package-structure-noetic.
Can anyone else share their experience of using this repository on noetic/focal?
The text was updated successfully, but these errors were encountered: