ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how to build dependant packages across multiple machines

asked 2020-12-14 10:48:19 -0500

nikkoun gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-12-14 15:16:11 -0500

gvdhoorn gravatar image

updated 2020-12-14 15:17:01 -0500

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.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2020-12-14 09:43:05 -0500

Seen: 139 times

Last updated: Dec 14 '20