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

Viewing custom messages from a ROS node that is on a different ROS install

asked 2016-10-02 03:52:09 -0600

hez gravatar image

I have ROS running on a robot with a raspberry Pi. I have several custom messages that I would like to echo and view on rqt_plot from my laptop. However as the robot package is only installed on the pi, the custom messages do not exist on the laptop so I cannot view them.

What is usually done in this case? Should I move my messages to a different package so I can just install that on other devices?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-10-02 04:29:08 -0600

gvdhoorn gravatar image

updated 2016-10-02 06:02:15 -0600

Should I move my messages to a different package so I can just install that on other devices?

Yes, that is actually the best practice for message, services and actions.

Being able to re-use messages without having to install also the other parts of a package is one part of the rationale. Separating the messages from the rest of your packages also clearly separates your ROS API from your implementation, further enhancing separation of concerns and re-usability.

edit flag offensive delete link more

Comments

Thanks that makes sense.

I keep all of my code in a github repo, I have just created a new package with the postfix _msgs to store messages - and with that a second git repository. Is it also best practice to distribute code like that? One repo for the messages package and one for the main package?

hez gravatar image hez  ( 2016-10-02 05:01:04 -0600 )edit

Depends. Some ppl like to keep _msgs pkgs in the same repository as the nodes that use that pkg, to make releases easier (_msgs is dependency of other pkgs, so needs to be released first). Others like to separate. Smallest re-usable artefact vs distribution convenience is always a trade-off.

gvdhoorn gravatar image gvdhoorn  ( 2016-10-02 05:12:21 -0600 )edit

Note that if you release the pkg (through the ROS buildfarm), it doesn't matter (for your users) whether the pkg is in a separate repository or not, they can always install your _msgs pkg separately.

gvdhoorn gravatar image gvdhoorn  ( 2016-10-02 05:13:19 -0600 )edit

Question Tools

Stats

Asked: 2016-10-02 03:52:09 -0600

Seen: 380 times

Last updated: Oct 02 '16