-
Notifications
You must be signed in to change notification settings - Fork 71
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
Static build rclnodejs.node problem #718
Comments
Thanks for your question. I haven't tried to build rclnodejs.node as a static library because node loads C++ addon as a dynamically-linked shared library when |
Sorry , I missuse static build word. I'm trying to |
Currently, rclnodejs/src/rcl_utilities.cpp Lines 57 to 68 in d41f7e9
so you have to use dynamic libraries.
I'm not sure whether it's feasible to do so, it sounds you want to link all ROS2 into |
Due to ROS2's design, it is very hard to link everything statically, the biggest problem is the middleware layer and typesupport libraries, as @minggangw mentioned, the typesupport for each message is loaded dynamically because we cannot know ahead of time which messages are installed in the system (and also which middleware is used). In theory you could achieve "one click" launch by adding a level of indirection, i.e. have a script that scans for installed ros location, source it and launch your electron app. |
If we don't have more discussion here, I will close this issue. Please reopen it if you still have problems, thanks! |
@cwyark I have a similar requirement to you where I would like to maintain the production release capability enabled by Electron's While ideally static ROS2 could be bundled in this Electron application I understand that to be inaccessible. So, assuming the end-user's environment has ROS2 installed, I was curious if you went down the path of using Also, in either scenario did you get Thanks in advance. |
As distributing After evaluating the alternatives discussed here (including building This is not an ideal solution in production, since it requires the distribution of 2 files (the Electron executable, and the Nonetheless, a well-designed distribution strategy (e.g., through a tar and some good instructions on how to launch to the end-user) should generally be sufficient. |
Has any one tried static build rclnodejs.node with ROS2 foxy ?
I'm trying to use rclnodejs with electron, but rclnodejs.node relies on librcl.so, librmw.so, and some ros2 core shared libraries. One approach is
source /opt/ros/foxy/setup.bash
every time when electron start, but personally I don't prefer this approach, because most electron application is a deliverable software, it supposed to double clicked to launch this app.The text was updated successfully, but these errors were encountered: