BehaviorTree / BehaviorTree.ROS2

BehaviorTree.CPP utilities to work with ROS2
Apache License 2.0
145 stars 60 forks source link

fix "ID [Sleep] already registered" #22

Closed nerovalerius closed 1 year ago

nerovalerius commented 1 year ago

Running the sleep client throws the following error:

terminate called after throwing an instance of 'BT::BehaviorTreeException'
  what():  ID [Sleep] already registered
[ros2run]: Aborted

This error is caused by trying to register the Sleep Action with the Name "Sleep", which is likely due to the fact that behaviortree CPP already registers this ID as seen here:

BehaviorTree.CPP/src/bt_factory.cpp - Line 82

One Workaround to keep the Examples in this repo working is to rename the ID "Sleep" to "SleepAction". This fixes the issue and one can then run succesfully the sleep_server and then the sleep_client.

facontidavide commented 1 year ago

fixed