0
$\begingroup$

Rosanswers logo

Hello,

I have the following configuration:

  • laptop 1 that is the master (it runs "roscore") - it doesn't have the package or messages used by nodes

  • laptop 2 that has two running nodes

I try to use "rostopic pub -1 /input_topic component_adder/inputMsg -- '15' '13'" from laptop 1 (master) to the topic "input_topic" from one node from laptop 2 but I get the following error: ERROR: invalid message type: component_adder/inputMsg. If this is a valid message type, perhaps you need to type 'rosmake component_adder'

I want to mention that in laptop 1 (master) I don't have the messages or anything related to project. I exported ROS_MASTER_URI and ROS_IP properly, nodes can see the master because I can use the same rostopic command from above in laptop 2 and it works.

Please let me know if there's a way to use the rostopic command from above in laptop 1 (master) without having the package from laptop 2 (nodes).

Thank you,

Eduard.


Originally posted by Eduard Visinescu on ROS Answers with karma: 3 on 2018-11-05

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Please let me know if there's a way to use the rostopic command from above in laptop 1 (master) without having the package from laptop 2 (nodes).

If you mean: without the nodes, then the answer can only be yes if the messages are stored in a separate package (which is a best practice for precisely this reason: use of ROS API without having to compile/install everything else).

If component_adder mixes msg/srv/action definitions with nodes in a single package, then the answer would be no, this is not possible, unless you are willing to edit the build script and disable compilation of the nodes in component_adder.


Edit: the above answer is correct in the general / default case.

For the more adventurous approach, see uts-magic-lab/message_thief.

Note: this is not the recommended way to approach these kind of situations!


Originally posted by gvdhoorn with karma: 86574 on 2018-11-05

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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