rapp-project / rapp-api

The Robotic Applications API
http://rapp-project.eu
Other
6 stars 4 forks source link

Error in sample codes for Python documentation #24

Closed etsardou closed 8 years ago

etsardou commented 8 years ago

The sample is:

from RappCloud.CloudMsgs import OntologySubclasses
from RappCloud import RappPlatformService

svc = RappPlatformService()
msg = OntologySubclasses()
# Ontology subclasses of Oven query
msg.ontology_class = 'Oven'
msg.recursive = False

response = svc.call(msg)

But the respective ROS service gets no input (ontology_class=""). If transformed to the one below it works:

from RappCloud.CloudMsgs import OntologySubclasses
from RappCloud import RappPlatformService

mesg= OntologySubclasses(ontology_class='Oven', recursive=False)
svc = RappPlatformService(msg=mesg)

response = svc.call()
klpanagi commented 8 years ago

Cloud Messages has-a Request object:

msg.req

So, if for example you want to set the ontology_class attribute of the Request object:

msg.req.ontology_class = 'Oven'

Wrongly written in the documentation. Patch applied. Closing this issue.