hi Peshala,<div><br></div><div>This is very simple, say you have packages packagex and packagey</div><div><br></div><div>And have designed messages in either of them, or even both</div><div><br></div><div>Say you have a message X.msg in packagex and want to use in packagey</div>
<div><br></div><div>in the manifest.xml of packagex, you need to add the following line</div><div><br></div><div><export></div><div>    <cpp cflags="-I{prefix}/msg/cpp/"/></div><div></export><br>
<br></div><div><br></div><div>then in manifest.xml of packagey you need to add the following line</div><div><br></div><div><depend package="packagex"/></div><div><br></div><div>The you should be set. To use the message in the cpp code all you need to do is now include the message headers as</div>
<div><br></div><div>#include <packagex/X.h></div><div><br></div><div>and proceed to use it in the code. For python you will just need to use 'from packagex import *'</div><div><br></div><div><br></div><div>There are also a number of tutorials online which explain this.</div>
<div><br></div><div>Have fun</div><div><br></div><div>billy</div><div><br><div class="gmail_quote">On 5 October 2010 09:49, Peshala Jayasekara <span dir="ltr"><<a href="mailto:peshala_24@yahoo.com">peshala_24@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Dear all,<br><br>
How can we communicate between two user created packages using a user created ROS msg?<br>When I referred the tutorials, it only provides a scenario when the two executables (publisher and listener) are in the same package.<br>
Do we have to create the same msg in both the packages?<br>Also, I'm having trouble figuring out how to include headers from a user created package to another package. <br><br>Any advise would be greatly appreciated, since I'm a beginner.<br>
<br>Thanks<br>Peshala<br></div>
</div><br></div><br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div>Viele Gruss/Best Regards,</div><div>Billy Okal</div><div>Jacobs University Bremen</div><div>#5383, MA 333</div><div>-------------------------------------------------------------------------------------------------------</div>
"sure vi is user friendly, its just particular about who to be friends with"<br>
</div>