Skip to content
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

Electron Renderer Process #924

Open
KhalilSelyan opened this issue Jun 23, 2023 · 6 comments
Open

Electron Renderer Process #924

KhalilSelyan opened this issue Jun 23, 2023 · 6 comments
Labels

Comments

@KhalilSelyan
Copy link

Description
It seems as though you can only access rclnodejs on the electron main process (node backend) and not on the frontend the renderer process. Is there any way to get it running directly from the frontend ?

  • Library Version: 0.22.2
  • ROS Version: humble
  • Platform / OS: ubuntu 22.04

Steps To Reproduce

create a electron project and add rclnodejs and try to access it in the front end
because of electron updates since i believe electron 11 "non context-aware native modules are not allowed"
i need to be able to run the native connection directly from the frontend because of buffering issues when trying to send from main process to renderer process because pointclouds and image messages are too big

image

Expected Behavior

Actual Behavior

@minggangw
Copy link
Member

Based on my limited knowledge about Electron, this is how Electron supports nodejs modules. Please see https://www.electronjs.org/docs/latest/tutorial/process-model#the-main-process
image

@Tombliboo96
Copy link

@KhalilSelyan Hello, may I ask how you dealt with this problem? I encountered the same problem as you

@KhalilSelyan
Copy link
Author

I moved away from rclnodejs and used ros-foxglove-bridge with ws-protocol both from foxglove

@minggangw
Copy link
Member

Hi @KhalilSelyan, how about the performance using ros-bridge? As I understand, the current ros-bridge depends on websocket and needs to copy the data either, I'm trying to figure out if it's possible to avoid the memory allocation using web technology, or you leverage other tech, like video streaming, to solve the problem? thanks!

@KhalilSelyan
Copy link
Author

i remember the issues i had with the ros-bridge was that it was slow and couldn't handle big pointcloud messages + other stuff -- i'm working with the autoware software -- although after finding the foxglove rosbridge it was much better at handling all those with barely any lag , still not as perfect as a native connection i would assume but definitely good enough if configured correctly in my opinion, but for your other question i'm not entirely sure how to answer them sorry

@minggangw
Copy link
Member

@KhalilSelyan please check with rclnodejs Electron demo just added https://github.com/RobotWebTools/rclnodejs/tree/develop/electron_demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants