Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[/nao_audio/master_volume] responded with an error: service cannot process request: handler returned invalid value #9

Open
FelipMarti opened this issue Sep 8, 2017 · 1 comment

Comments

@FelipMarti
Copy link

FelipMarti commented Sep 8, 2017

Hello,

I'm trying to use the nao_audio node of the nao_interaction package to change the volume of NAO, but I'm having the following error when calling the /nao_audio/master_volume ROS Service:

$ roslaunch nao_bringup nao_full_py.launch nao_ip:=nao.local

$ roslaunch nao_interaction_launchers nao_audio_interface.launch nao_ip:=nao.local

$ rosservice call /nao_audio/master_volume "master_volume:
  data: 0" 
ERROR: service [/nao_audio/master_volume] responded with an error: 
service cannot process request: handler returned invalid value: 
Invalid number of arguments, args should be [] args are(<class 'std_srvs.srv._Empty.EmptyResponse'>,)

I'm using ROS Kinetic, however, I'm not sure if this error is related to the ROS version. I'm not very familiar with ROS in Python, but I had a look to the node nao_audio/nodes/nao_audio.py

All the returns are:
return EmptyResponse

Shouldn't be?:
return EmptyResponse()

I have replaced all the returns and now I have this error:

$ rosservice call /nao_audio/master_volume "master_volume:
  data: 0" 
ERROR: service [/nao_audio/master_volume] responded with an error: 
service cannot process request: handler returned invalid value: 
Invalid number of arguments, args should be [] args are(,)

Any suggestions?

Thanks!

@kochigami
Copy link
Contributor

Hello,

I had the same error in ros indigo, and I found that returning value of service handler was wrong.
self.handleAudioMasterVolumeSrv uses AudioMasterVolume as service message, and I think it should return AudioMasterVolumeResponse, not EmptyResponse,

I just fixed it in #10.
I found same lines in another service handlers. I'll fix it in a next pull-request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants