Timeline for Using .pyc files instead .py with roslaunch [closed]
Current License: CC BY-SA 4.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 29, 2023 at 17:53 | comment | added | aarsht7 | I tried the solution mentioned above by Lucas and it worked for me. TO BE MENTIONED HERE, I tried everything on the docker and it has only one version of python3 installed that delivered with installation of the ros from the official ros-docker image. So at the end it seem to be a problem of the roslaunch and the python version it might be using on backend and not the python3. I felt it was bit rude the closing of the question without listining or understanding the issue but anyway. | |
Dec 29, 2023 at 17:28 | comment | added | aarsht7 |
When you see RLException: Unable to launch If it is a script,.. It is because you forgot to give excecution permission ig. I faced the same error but after chmod +x filename.* it gave the Bad magic error
|
|
Dec 23, 2023 at 9:16 | history | left closed in review |
cst0 Mike973 sempaiscuba |
Original close reason(s) were not resolved | |
Dec 20, 2023 at 15:38 | comment | added | Lucas Walter |
I tried docker and see the same RLException: Unable to launch If it is a script,.. (I think any time you saw Bad magic that's from running a pyc from a different python version, probably the outside one)- but the wrapper worked. So the issue is something different with any combination of ros or python versions or the docker environment vs. outside docker.
|
|
Dec 19, 2023 at 8:48 | comment | added | aarsht7 | Thing is pyc files worked on the local machine as well. it's just docker that is struggling with pyc. I will try your suggestion in docker for confirmation. But for now, I have decided to try pyinstaller to generate distributable bundle file. Just that it take up more storage than the pyc file as it packs all the dependancy togather so I am not sure if I will continue using pyinstaller | |
Dec 18, 2023 at 17:19 | comment | added | Lucas Walter |
I'll convert this to an answer if this gets reopened, this worked (outside of docker at least, haven't tested inside it) using python 3.11: python -m compileall `rospack find talker` , <node pkg="talker" type="talker.sh" name="talker_pyc" output="screen"/> then in scripts/talker.sh wrapper script: #!/bin/bash python `rospack find talker`/scripts/__pycache__/talker.cpython-311.pyc
|
|
S Dec 18, 2023 at 9:29 | review | Reopen votes | |||
Dec 23, 2023 at 9:16 | |||||
S Dec 18, 2023 at 9:29 | history | edited | aarsht7 | CC BY-SA 4.0 |
Added reproducible example with code and readme
Added to review
|
S Dec 16, 2023 at 23:23 | history | migration rejected | |||
S Dec 16, 2023 at 23:23 | history | unlocked | CommunityBot | ||
S Dec 15, 2023 at 0:21 | history | migrated | Tully♦ | to stackoverflow.com | |
S Dec 15, 2023 at 0:21 | history | locked | CommunityBot | ||
S Dec 15, 2023 at 0:21 | history | closed | Tully♦ | Not suitable for this site | |
Dec 15, 2023 at 0:20 | comment | added | Tully♦ | This seems to be a generic python problem and only related to robotics by where you want to use it. | |
Dec 14, 2023 at 17:23 | history | edited | aarsht7 | CC BY-SA 4.0 |
added 365 characters in body
|
Dec 14, 2023 at 16:32 | comment | added | aarsht7 | I checked python version on both, they are similar. I tried to complie the file on the docker and use that file instead of cloning pyc generated on local machine, did not worked. same error in both the cases | |
S Dec 14, 2023 at 15:29 | review | First questions | |||
Dec 15, 2023 at 0:21 | |||||
S Dec 14, 2023 at 15:29 | history | asked | aarsht7 | CC BY-SA 4.0 |