Hi peshala,<div><br></div><div>If the class in defined in some file in the include like classX.h and a classX.cpp, then after including</div><div><br></div><div>#include <packageX/classX.h></div><div><br></div><div>you should be able to use the namespaces defined thereof as this is equivalent to having the file in the same dir and including it using the "" directives. The manifest just makes the include process nicer and avoid copying files all over. I dont think its related to any namespace issues AFAIK. Maybe someone else on the list has a better idea.</div>
<div><br></div><div><br></div><div>billy<br><br><div class="gmail_quote">On 6 October 2010 04:42, 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"><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 <<a href="mailto:b.okal@jacobs-university.de" target="_blank">b.okal@jacobs-university.de</a>><br><b><span style="font-weight:bold">To:</span></b> User discussions <<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a>><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><div>
<div></div><div class="h5"><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" href="mailto:peshala_24@yahoo.com" target="_blank">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" href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a rel="nofollow" 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>
</div></div></div></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>