RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
320 stars 70 forks source link

sros2 support for rclnodejs #794

Open AnushaPulichintha opened 3 years ago

AnushaPulichintha commented 3 years ago

Hi, We are using sros2 for secure communication for our ros2 nodes. Recently we added ros node using rclnodejs library which communicates with our ros2 nodes.

I tried to add the sros2 for the ros node running using rclnodejs library but it did not work.

Does rclnodejs library support sros2?

Thanks in advance

minggangw commented 3 years ago

We haven't tested with sros2 enabled before, I checked out the usage of sros2 and it seems that the encryption should be supported by the middle ware layer, would you please try (I haven't tried it myself, just guess we should pass the args to the rcl)

rclnodejs.init(rclnodejs.Context.defaultContext(), ['--ros-args', '--enclave']);
AnushaPulichintha commented 3 years ago

No, it did not work. Normally for ros2 we set some environment variables. I also set same variables for nodejs application.

export ROS_SECURITY_KEYSTORE=~/<ros2ws_dir>/keys
export ROS_SECURITY_ENABLE=true
export ROS_SECURITY_STRATEGY=Enforce
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export ROS_DOMAIN_ID=5

do you know I should pass any of those varaibles to init() method?

minggangw commented 3 years ago

I'm not clear about the exact params needed for this case, I will have a try.