Ask Your Question
0

custom message from other host

asked 2015-02-09 06:44:14 -0600

nios gravatar image

Hello everyone,

this is a small design question. I have a Rasberry PI that runs ros and gets everything from the sensors on the robot. It is all working great while sending standard messages, but I bumped into an issue with the custom ones.

Say, I want to send a string name of the button, a boolean of its state and a timestamp. I would need to define a new msg for this purpose. The question is: how can I include this message's header, when receiving this message on another machine?

Can I just create a message with the same parameters in the recipient package? I believe this cannot work, because the type will be different.

Any ideas are greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-02-09 07:40:51 -0600

dornhege gravatar image

You have to have the same message (as in package + name + content) on both machines. If the issue is building the code on different machines, that is why often messages are put into separate ..._msgs packages.

Besides this, there might be workarounds to make that work anyways, but I would not recommend any such hacks.

edit flag offensive delete link more

Comments

Avoiding the hacks is exactly the reason for posting this question! :)

Thanks for the nice idea, I didn't think of putting the messages into a separate package, it seems to fit the need.

nios gravatar imagenios ( 2015-02-10 02:38:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-02-09 06:44:14 -0600

Seen: 94 times

Last updated: Feb 09 '15