question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Static build rclnodejs.node problem

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anmilleriiicommented, Oct 6, 2021

As distributing rclnodejs in a bundle was a hard requirement for my use case, I spent the time to develop a workaround and have compiled it in this example repository for posterity.

After evaluating the alternatives discussed here (including building rclnodejs statically or using a launch file), I wrote a launch file (similar to sourcing from ~/.bashsrc as suggested by @minggangw).

This is not an ideal solution in production, since it requires the distribution of 2 files (the Electron executable, and the launch executable). This introduces challenges in automatically updating the entire distributed code (i.e., the Electron app is auto-updatable but the launch file is not).

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.

0reactions
anmilleriiicommented, Aug 4, 2021

@cwyark I have a similar requirement to you where I would like to maintain the production release capability enabled by Electron’s autoUpdater, if possible without the additional liability/complexity of an external script that the end-user may need to update as well.

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 source /opt/ros/foxy/setup.bash or instead had made headway with a static version of rclnodejs.

Also, in either scenario did you get rclnodejs working beyond an Electron development server and into a bundled distributable executable?

Thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

codeLive: Creating LWR Static Sites on Node.js - YouTube
Learn how to create a static site with LWR (Lightning Web Runtime)Connect with Salesforce Developers:Website: ...
Read more >
rclnodejs - npm
rclnodejs is a Node.js client for the Robot Operating System (ROS 2). It provides a simple and easy JavaScript API for ROS 2...
Read more >
About ROS 2 client libraries - ROS Documentation
Node.js rclnodejs is a Node.js client for the Robot Operating System (ROS 2). It provides a simple and easy JavaScript API for ROS...
Read more >
Deploy an Express server that uses express.static to serve a ...
I had similar issue: serve some static content and use /api routes. ... Build separately serverless and static content.
Read more >
initial (6a97978c) · Commits · Oleg Dzhimiev / rclnodejs-testing
app.use('/node_modules',express.static(path.join(__dirname, ... #!/usr/bin/env node ... Event listener for HTTP server "error" event.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found