Open whatis777 opened 3 years ago
It seems that everything has been set properly, normally this kind of issue was caused by not sourcing the setup.bash
for ROS2. Can you run the examples of rclpy?
I have a python-based custom node up & running properly & publishing ROS2 messages if that helps. If not please let me know which example I should run
I just want to confirm whether the librcl.so
could be found because rclpy is similar to rclnodejs by wrapping the librcl.so
library. Currently, I have no idea what causes it, but I suggest you could try to use https://github.com/ros2/ros2/releases/download/release-foxy-20201211/ros2-foxy-20201211-linux-focal-arm64.tar.bz2 package to see if it works.
Performing npm install
already shows a similar error at the end of the build:
....
....
make: Leaving directory '/home/ubuntu/webbridgetest/ros2-web-bridge/node_modules/rclnodejs/build'
> rclnodejs@0.17.0 postinstall /home/ubuntu/webbridgetest/ros2-web-bridge/node_modules/rclnodejs
> node scripts/generate_messages.js
Start JavaScript message generation...
Caught error: Error: librcl.so: cannot open shared object file: No such file or directory
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
added 414 packages from 318 contributors and audited 415 packages in 396.636s
The file is there and the path is known:
LD_LIBRARY_PATH=/home/ubuntu/ros2_foxy/ros2-linux/opt/yaml_cpp_vendor/lib:/home/ubuntu/ros2_foxy/ros2-linux/opt/rviz_ogre_vendor/lib:/home/ubuntu/ros2_foxy/ros2-linux/lib
-rw-r--r-- 1 ubuntu ubuntu 829216 Dec 11 19:05 /home/ubuntu/ros2_foxy/ros2-linux/lib/librcl.so
When trying to start ros2-web-bridge with
node bin/rosbridge.js
, it aborts with this error message:The setup is:
librcl.so
is located in/opt/ros/foxy/lib
:-rw-r--r-- 1 root root 223912 Dec 10 11:48 librcl.so
echo $LD_LIBRARY_PATH
prints/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/lib/aarch64-linux-gnu:/opt/ros/foxy/lib
The terminals are sourced by default (
echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc
)ros2-web-bridge was installed in a directory besides the ROS2 workspace using these commands to install it:
Can you please help me here?