[ros-users] Importing external srv in Python
Ken Conley
kwc at willowgarage.com
Fri Jul 9 15:52:25 UTC 2010
Based on your e-mails, I think the correct line is:
from cyberglove.srv import Start
- Ken
On Fri, Jul 9, 2010 at 8:42 AM, Sacha Aury <sacha at shadowrobot.com> wrote:
> Thanks for the help, but it did not work, the error is still the same :
>
> from Start.srv import *
> ImportError: No module named Start.srv
>
> I added <depend package="cyberglove"/> to the manifest, and I rosmaked
> my package.
>
> I had a look to the links below, but nothing was dealing with importing
> a service.
>
> Le vendredi 09 juillet 2010 à 08:24 -0700, Ken Conley a écrit :
>> Hi Sacha,
>>
>> Your package needs to have a <depend package="model"/> in the
>> manifest.xml that points to the model package. This tutorial here:
>>
>> http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28python%29
>>
>> as well as here:
>>
>> http://www.ros.org/wiki/ROS/Tutorials/CreatingPackage
>>
>> Should provide any other details you may need.
>>
>> Hope this helps,
>> Ken
>>
>> On Fri, Jul 9, 2010 at 6:54 AM, Sacha Aury <sacha at shadowrobot.com> wrote:
>> > Hi all,
>> >
>> > I have some trouble to find how to import a .srv file in Python. The
>> > problem is that my Python code and my srv are not in the same package :
>> > the srv is in a "model" package and Python is used to build a GUI, so I
>> > separated it from the model.
>> >
>> > Does anyone know how to do that, or even if it is possible ?
>> >
>> > Cheers
>> >
>> > Sacha
>> >
>> > _______________________________________________
>> > ros-users mailing list
>> > ros-users at code.ros.org
>> > https://code.ros.org/mailman/listinfo/ros-users
>> >
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
More information about the ros-users
mailing list