0
$\begingroup$

Rosanswers logo

I have a package running a service (package A) and another running a client for that service (package B) both implemented in c++. Package B has build/exec dependency on package A for that service. Both compile and work fine when they are in the same workspace of a single machine.

Now if I want to run a distributed system and move package A on machine A and package B on machine B , what would be the best way to handle this build dependency?

or in other words, how can i build package B on machine B without having package A on that machine?

I am sorry if there is an obvious answer but I am having trouble researching this information.


Originally posted by nikkoun on ROS Answers with karma: 3 on 2020-12-14

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

how can i build package B on machine B without having package A on that machine?

best practice would be to refactor package A into package A and a separate package which hosts just the messages/services/action definitions.

Then both A and B depend on the message package.

What you describe is the main rationale for doing that: you can build subscribers and clients without needing the packages containing the publishers or servers in the same workspace.


Originally posted by gvdhoorn with karma: 86574 on 2020-12-14

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.