clearpathrobotics / robot_upstart

ROS package of helper functions related to bringing up roslaunch on system startup.
BSD 3-Clause "New" or "Revised" License
196 stars 96 forks source link

updated to work with python3 #96

Closed Crowdedlight closed 3 years ago

Crowdedlight commented 4 years ago

To be able to use upstart on my RPI4 running ubuntu server 20.04 with only python3 installed I had to apply these changes.

I changed from pickle to json as pickle created zero-bytes in the file, which gives error when provided as a cmd argument.

I just wanted let you know this is how I solved it, if anyone else have the same issue as I did.

This would partly solve #94

graemerae commented 4 years ago

I had to make several additional changes to get this to work:

In mutate_files: <<paths.sort(key=len, reverse=True)

paths=sorted(paths,key=len,reverse=True)

In install_script.py

<<import providers

from .import providers

In providers.py

<<import StringIO

import os

<<self.interpreter.output = StringIO.StringIO()

self.interpreter.output = io.StringIO()

Now robot_upstart is running completely under python3

mikaelarguedas commented 4 years ago

I confirm that using this branch worked for me on an ubuntu 20.04 workstation with ROS Noetic :+1:

I didnt need the changes mentionned in https://github.com/clearpathrobotics/robot_upstart/pull/96#issuecomment-647717844 as they are aleady on the noetic-devel branch of this repo

the-xareth commented 4 years ago

Wish I fount this pull request earlier. Was halfway through making some of the same changes myself. Worked for me with ROS Noetic on RPi4 Ubuntu 20.04. I also didnt need the changes in #96 comment.

agutenkunst commented 3 years ago

This was working for me on Ubuntu 20. The PR seems only to miss some minor roslint fixes. Would be great to have this merged soon!

mikaelarguedas commented 3 years ago

This was working for me on Ubuntu 20. The PR seems only to miss some minor roslint fixes. Would be great to have this merged soon!

A PR including these changes and the roslint fixes is available at https://github.com/clearpathrobotics/robot_upstart/pull/98

tonybaltovski commented 3 years ago

Closing in favour of #98. Thanks for the update!