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

add services for get and set language #87

Merged
merged 3 commits into from
Feb 6, 2018

Conversation

kochigami
Copy link
Contributor

reference: http://doc.aldebaran.com/2-4/naoqi/audio/altexttospeech-api.html#altexttospeech-api
ALTextToSpeechProxy::setLanguage and ALTextToSpeechProxy::getLanguage

requires: ros-naoqi/naoqi_bridge_msgs#32

I tried it with pepper, naoqi 2.5.5.5, ros indigo

roslaunch naoqi_driver naoqi_driver.launch
kochigami@kochigami-ThinkPad-T450:~/catkin_ws/src/naoqi_driver/src/services$ rosservice list | grep lang
/naoqi_driver/get_language
/naoqi_driver/set_language

kochigami@kochigami-ThinkPad-T450:~/catkin_ws/src/naoqi_driver/src/services$ rosservice call /naoqi_driver/set_language "language: 'English'" 
success: True

kochigami@kochigami-ThinkPad-T450:~/catkin_ws/src/naoqi_driver/src/services$ rosservice call /naoqi_driver/get_language "{}" 
language: English


robot_url = session->url();

// Get the robot type
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo: need to modify this


robot_url = session->url();

// Get the robot type
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo: need to modify this

@nlyubova
Copy link
Member

+1 fine for me. @suryaambrose what do you think?

@nlyubova
Copy link
Member

@kochigami can you do a pull request with a data format to nao_interaction?

@kochigami
Copy link
Contributor Author

@nlyubova

can you do a pull request with a data format to nao_interaction?

I'm sorry for my late response.
Could you tell me where I should refer to in nao_interaction?
I couldn't find the related function of setting/ getting a language.

Copy link
Member

@nlyubova nlyubova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me!
Let's keep them in naoqi_bridge_msgs as it is.

@kochigami
Copy link
Contributor Author

confirmed with:

  • Pepper + indigo
  • Pepper + kinetic
  • NAO + indigo
  • NAO + kinetic

@kochigami
Copy link
Contributor Author

I found there are some errors when executing it with ros kinetic (both NAO and Pepper).

I will report and update tomorrow.
I'm sorry for lack of information.

@nlyubova
Copy link
Member

nlyubova commented Feb 1, 2018

Thank you so much for testing!
Please keep us updated.

@kochigami
Copy link
Contributor Author

I'm trying to fix this pull-request, but it may take a long time...
I'm not good at C++. I'm sorry.
My working tree is here:
kochigami#1

problem: rosservice call /naoqi_driver/get_language is not executed correctly.

status:

  1. when executing it on kinetic: (069536b)
    rosservice call /naoqi_driver/get_language "{}"
    => ERROR: transport error completing service call: unable to receive data from sender, check sender's logs for details

I found resp.data = helpers::driver::getLanguage(session_, req); in get_language.cpp was never executed and the error above appeared.

  1. when executing it on kinetic (kochigami@68fb075)
    rosservice call /naoqi_driver/get_language "{}" returns language name,
    but I found getLanguageLocal function in drivers_helpers.cpp is executed only once.
rosservice call /naoqi_driver/set_language "data: "English"` => pepper speaks English
rosservice call /naoqi_driver/get_language "{}" => English

rosservice call /naoqi_driver/set_language "data: "Japanese"`=> pepper speaks Japanese
rosservice call /naoqi_driver/get_language "{}" => English, This is a problem.

@kochigami
Copy link
Contributor Author

I modified my pull request as for the problem above.
(not using constand set/getLanguageLocal function)
If there is any problem, please let me know.

I confirmed with:

  • Pepper (NAOqi 2.5.5.5) + ros indigo
  • Pepper (NAOqi 2.5.5.5) + ros kinetic
  • NAO (NAOqi 2.1.4) + ros indigo
  • NAO (NAOqi 2.1.4) + ros kinetic

@kochigami kochigami force-pushed the add-set-language-srv branch from cb22750 to c6565d6 Compare February 6, 2018 01:19
@nlyubova
Copy link
Member

nlyubova commented Feb 6, 2018

Thank you!
Just merged required ros-naoqi/naoqi_bridge_msgs#38

@nlyubova nlyubova merged commit 9fe18ba into ros-naoqi:master Feb 6, 2018
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

Successfully merging this pull request may close these issues.

2 participants