Open matthias-mayr opened 8 months ago
Currently the SkillManagerNode that brings up the skill manager needs spinning during the __init__ function to register the skills with the world model: https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_skill/skiros2_skill/ros/skill_manager.py#L187-L188
SkillManagerNode
__init__
However after we're done starting up the SkillManagerNode, we enter a rclpy.spin. This means that the WorldModelInterface that is used inside the SkillManager must not spin anymore. https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_skill/skiros2_skill/ros/skill_manager.py#L498-L501
rclpy.spin
WorldModelInterface
SkillManager
Currently this is resolved by setting an allow_spinning variable in the WorldModelInterface that is used here: https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_world_model/skiros2_world_model/ros/ontology_interface.py#L299-L310
allow_spinning
That works, but it's not a very sound solution.
Currently the
SkillManagerNode
that brings up the skill manager needs spinning during the__init__
function to register the skills with the world model: https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_skill/skiros2_skill/ros/skill_manager.py#L187-L188However after we're done starting up the
SkillManagerNode
, we enter arclpy.spin
. This means that theWorldModelInterface
that is used inside theSkillManager
must not spin anymore. https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_skill/skiros2_skill/ros/skill_manager.py#L498-L501Currently this is resolved by setting an
allow_spinning
variable in theWorldModelInterface
that is used here: https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_world_model/skiros2_world_model/ros/ontology_interface.py#L299-L310That works, but it's not a very sound solution.