RobotLabLTH / skiros2

A skill-based platform for ROS v.2
Other
163 stars 20 forks source link

SkillManagerNode startup needs to turn on and off spinning #98

Open matthias-mayr opened 8 months ago

matthias-mayr commented 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

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

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

That works, but it's not a very sound solution.