rosbridge can't locate node, possibly due to "symlink issue" in rosbridge_server
Second edit: Problem solved. We pushed the source code through Windows, which created a few strange symlinks that referred to rosbridge scripts.
I updated the CMakeLists.txt
in the rosbridge_server
folder (removed mentions of .py
files) and made sure the scripts in the scripts
folder had no .py
ending. It works now.
Edited; See at the bottom for the new error.
This issue occured out of the blue after a colleague changed something on the rosbridge package. The error message I receive is:
ERROR: cannot launch node of type [rosbridge_server/rosbridge_websocket]: can't locate node [rosbridge_websocket] in package [rosbridge_server]
We faced an error of symlinks, where git complained that filename too long
, which we "fixed" by deleting the offending files in rosbridge_suite-develop/rosbridge_server/scripts
and only leaving the .py
files. On my side, however, this somehow broke rosbridge and it does not start.
It is a very confusing issue and I am not that versed in ROS. So I hope you guys have a few hints where I can look for errors.
- I did source
devel/setup.bash
correctly, as well asros/indigo/...
and so on. - I also reverted to an earlier commit (before my colleague, unbeknownst to him, changed the files in rosbridgeserver). The change included deleting a call to `./rosbridgetcp.py` from the top of a file with no signature that my OS thought was a symlink. When reverting, rosbridge does start. But I do need the new features from newer commits as well...
Thanks for your help, and sorry for the confusing question!
Edit: After I changed all the script's permissions to +x
in the rosbridge_server/scripts
folder, I now get a new error message:
/home/martin/CrESt/SIM/CrESt_simulator/sim/src/rosbridge_suite-develop/rosbridge_server/scripts/rosbridge_websocket: line 3: ./rosbridge_websocket.py: No such file or directory
But the file is right there! The process dies and rosbridge is never launched. Why does this happen?
Asked by mneumann on 2018-11-28 11:27:19 UTC
Answers
We solved the problem. By moving code from Linux to Windows, our SVN (or the OS itself, not sure) changed something in the rosbridge_server/scripts
folder. Scripts were linked against each other through something similar to symbolic links, which broke git when I tried to pull from a Linux system.
Now, since script names were all wrong, the node could not be found.
We fixed it be checking our CMakeLists.txt
, removed all .py
file references and renamed the .py
files in the scripts
folder to just the file name, no file extension. Then, rosbridge worked like normal.
I guess we learn from this that mixing operating systems can break a few things, and to always check CMakeLists
.
Asked by mneumann on 2018-11-29 08:01:28 UTC
Comments
Can you please post your last edit as an answer and then accept your own answer?
We try to not close questions here on ROS Answers that actually have an answer.
Asked by gvdhoorn on 2018-11-29 07:36:54 UTC
Btw: the edits to the
CMakeLists.txt
and some of the other things you mention don't really sound like solutions, more work-arounds.Asked by gvdhoorn on 2018-11-29 07:37:52 UTC
Yes, I will post this as an answer. They were solutions in the sense that we fixed the
CMakeLists.txt
we broke by shifting stuff around different OS (Windows and Linux), which made us encounter the issues mentioned above. In the end, it's just thatCMakeLists.txt
was wrong.Asked by mneumann on 2018-11-29 07:50:11 UTC