Recently was exploring the use of plugin for behaviortree_ros2, after colcon build, I ran the command "ros2 run ros2 run btcpp_ros2_samples sleep_server" on one terminal and another command "ros2 run btcpp_ros2_samples sleep_client_dyn
" in another terminal. But the client terminal was unable to run and return the following error:
`terminate called after throwing an instance of 'BT::RuntimeError'
what(): Could not load library: ../lib/libsleep_action_plugin.so: cannot open shared object file: No such file or directory
`
So i tried to copy the relative path of the .so file in the install directory and paste it into line 80 of the code. Below is the before change and after change.
I then colcon build and tried to run the code again, but it said that the ID "Sleep" is already registered.
`terminate called after throwing an instance of 'BT::BehaviorTreeException'
what(): ID [Sleep] already registered
`
Not sure if this is an issue or I am doing something wrong. Please do provide guidance. Thank you.
UPDATE:
Was able to resolve the issue by redoing the git clone for this package and installing all the dependencies and changing the path of the .so file to the correct path.
Recently was exploring the use of plugin for behaviortree_ros2, after colcon build, I ran the command "ros2 run ros2 run btcpp_ros2_samples sleep_server" on one terminal and another command "ros2 run btcpp_ros2_samples sleep_client_dyn " in another terminal. But the client terminal was unable to run and return the following error:
`terminate called after throwing an instance of 'BT::RuntimeError' what(): Could not load library: ../lib/libsleep_action_plugin.so: cannot open shared object file: No such file or directory
`
So i tried to copy the relative path of the .so file in the install directory and paste it into line 80 of the code. Below is the before change and after change.
BEFORE:
AFTER:
I then colcon build and tried to run the code again, but it said that the ID "Sleep" is already registered. `terminate called after throwing an instance of 'BT::BehaviorTreeException' what(): ID [Sleep] already registered
` Not sure if this is an issue or I am doing something wrong. Please do provide guidance. Thank you.
UPDATE: Was able to resolve the issue by redoing the git clone for this package and installing all the dependencies and changing the path of the .so file to the correct path.