<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi Billy,<br><br>Thanks for your reply.<br>Now, I am having a linking error where I want to use a class from packageX in packageY.<br>I did<br><div><export></div><div>    <cpp cflags="-I{prefix}/include"/></div></export><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">in the manifest.xml of packageX<br>and <br><depend package="packageX"/><br>in the manifest.xml of packageY<br><br>#include <packageX/X.h> works fine with no compilation errors but<br>having a linking error.<br><br>undefined reference to `my_namespace::X::X()`<br><br>What am I missing here?<br><br>Thanks in advance<br>Peshala<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr
 size="1"><b><span style="font-weight: bold;">From:</span></b> Billy Okal <b.okal@jacobs-university.de><br><b><span style="font-weight: bold;">To:</span></b> User discussions <ros-users@code.ros.org><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, October 5, 2010 20:40:30<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [ros-users] Communicating between two user created packages<br></font><br>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 rel="nofollow" ymailto="mailto:peshala_24@yahoo.com" target="_blank" href="mailto:peshala_24@yahoo.com">peshala_24@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);"><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 rel="nofollow" ymailto="mailto:ros-users@code.ros.org" target="_blank" href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a rel="nofollow" target="_blank" href="https://code.ros.org/mailman/listinfo/ros-users">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>
</div></div>
</div><br></body></html>