Unity-Technologies / ROS-TCP-Endpoint

ROS package used to create an endpoint to accept ROS messages sent from a Unity scene using the ROS TCP Connector scripts
Apache License 2.0
178 stars 118 forks source link

Fix/python3 install #114

Closed rokusottervanger closed 1 year ago

rokusottervanger commented 2 years ago

Proposed change(s)

Added catkin_install_python in CMakeLists to fix compatibility with Python3 installations

Useful links (GitHub issues, JIRA tickets, forum threads, etc.)

Provide any relevant links here.

Types of change(s)

Testing and Verification

Running the ROS node before this change results in errors such as no module named yaml because of a Python version mismatch.

Running with this change succesfully starts the ROS node.

Test Configuration:

Checklist

Other comments

unity-cla-assistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

ahuard0 commented 2 years ago

I implemented a similar fix today before I found this thread. My fix works for Python 3.8. Posted as Issue #120.

ipa-lth commented 2 years ago

Please merge this. The addition is fully ROS-conform: http://wiki.ros.org/UsingPython3/SourceCodeChanges#Changing_shebangs https://github.com/ros/catkin/blob/0baff3a78c3ca1fcbf65493a8d656054a61a6c12/cmake/catkin_install_python.cmake#L1-L13

ShubhamNandi commented 1 year ago

I changed the shebang in the '_default_serverendpoint.py' from '#!/usr/bin/env python' -> '#!/usr/bin/env python3' have tested it and works fine with ros noetic and python3

rokusottervanger commented 1 year ago

That's not a fix, it's a workaround. Handling different python versions is implemented in this CMake macro that I proposed in this PR.

rokusottervanger commented 1 year ago

But this was fixed in #141, so I'm closing this.