To define dependency on a package or resource that's only needed after a process initialized
Similar to #q264270but different question. In Catkin (or any modern package manifest formats defined in ros.org), what is the appropriate way to define a dependency on a resource that is NOT required to start and complete initializing a node/process (e.g. dynamic linking. Import in Python), but IS required later during runtime? A good example in ROS (or any distributed system) is the package name of the publisher of a topic that your package subscribes to.
What I described above doesn't sound like to be in the scope of exec_depend
(rep-0140).
I'm only using ROS1 but I assume this question is valid in ROS2 (not really sure though). To be more specific, this isn't even a ROS question. Ffrom ROS1 perspective, this is a Catkin package (which is technically ROS-agnostic) question.
Update: Elaborating an example per request. An example in ROS (or any distributed system) is when a node/process in your package subscribes to a topic/message that the process of another package/software publish. What are good and/or systematic ways to describe such dependency?. My primary usecase is in private company's product development so it can be narrow-sighted though, I'm seeing not defining this type of dependency put people in confusion. The issue I'm raising shouldn't be specific to ROS/Catkin though, I haven't found a good answer.
UPDATE2.
@Mike Scheutzow Thanks for deepening the conversation!
I think the user is abusing this dependency mechanism for the purpose they describe.
I dis/agree.
ros node A does not ordinarily declare a dependency on ros node B just because they have a pub/sub relationship.
Is your statement based on ROS practice? Or is that based even on the general software architecture broader than ROS? If the former I see why you say so, but it's never claried, hence my question on this page. If the latter, I don't have a clear answer but I'd be surprised if there's no software framework that allows to define this sort of dependency.
In general, there is no expectation that node B even runs on the same host as node A, so there should be no "requirement" that it be installed there.
My question is irrelevant to the location of nodes to be installed.
@gijs
Personally, I feel the dependency is on a type of information, not on any specific node or package.
Agreed. "Type of information" exactly (I used "resource" to mean that). That "information/resource" can be running nodes, publishers, or running processes (e.g. Docker engine), static files, etc. etc. I continue to be stuck with package name only because the framework I have an immediate need with, which is obviously Catkin, uses package name for dependency definition.
My initial motivation to ask this was that I've seen issues so many times found during runtime that turned out to be due to missing dependent resource that should be available during runtime but ...
It could help if you could give an example -- or describe what it is you actually want to do.
I'm not sure I understand this: publishers are bound by name, not by their location. What makes the package it is hosted by important in your system?
"packages" don't subscribe, nodes do.
I added an update to elaborate my specific need, hope that helps