ROS2 compiled node release executable crashes when launched from a different computer
- OS : Windows 10 x64 PRO
- ROS 2 distribution : Foxy Fitzroy (precompiled)
Issue :
- On the PC my node is developed on, the .EXE from build/Release runs perfectly. I don't need to source ROS2, just launching the node works.
- On the second PC I want to deploy the node, I have the ros2 Foxy binaries set up at the same exact location, and Path set up properly. However, when I run the node in the same way on this PC, the node crashes instantly, shutting down as soon as it is launched.
I can confirm that the shared ros2 libraries (rclcpp.dll, rcl.dll and such) are found at the Path, as when I remove ros2-foxy/bin from it, I get this error message.
Note : sourcing ROS2 is not an option for me. It must work without this step. Edit : even if I source ROS2 on my second PC, it still crashes.
Therefore the question is : how to make it run on the second PC as it runs on the first?
Thank you very much, any help is greatly appreciated.
I assume you intended to post a screenshot.
Seeing as this is Windows, that's probably the only/best way to show the crash dialog, so I've given you sufficient karma to be able to attach images.
For console text, please do not post screenshots. Instead, copy-paste the text into your question.
@gvdhoorn, thank you for your answer. Yes, that error message is not important as it is controlled, only arises when I intentionally hide my ros2 distribution.
The way my node crashes when deploying on a target (second PC) is not verbose, the console just shuts down the same instant.