Cyber-physical systems (CPS), robotics, Internet of Things, information and communication technologies have become more and more popular over the last several years. These topics open new perspectives and scenarios that can automate processes in human life. CPS are aimed at interaction support in information space for physical entities communicated in physical space in real time. At the same time the blockchain technology that becomes popular last years allows to organize immutable distributed database that store all significant information and provide access for CPS participants. The paper proposes an approach that is based on ontology-based context management, publish/subscribe semantic interoperability support, and blockchain techniques. Utilization of these techniques provide possibilities to develop CPS that supports dynamic, distributed, and stable coalition formation of the resources. The case study presented has been implemented for the scenario of heterogeneous mobile robots' collaboration for the overcoming of obstacles. There are two types of robots and an information service participating in the scenario. Evaluation shows that the proposed approach is applicable for the presented class of scenarios.