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 translator package #461

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

sktometometo
Copy link
Contributor

This PR add a ROS package for language translation.
This package uses Python package deep-translator as a backend.

Demo

roslaunch ros_translator demo

And then, please input any text to xterm prompt. You will get a translated text.

Input any text >沙羅双樹の花の色、盛者必衰の理をあらはす
[INFO] [WallTime: 1682560820.715069] [node:/demo_output_node] [func:DEMO.callback]: Translated text: The color of the flowers of the sal tree reveals the reason why prosperity must decline

ros_translator/requirements.txt Outdated Show resolved Hide resolved
ros_translator/python/ros_translator/core.py Outdated Show resolved Hide resolved
ros_translator/package.xml Outdated Show resolved Hide resolved
ros_translator/package.xml Outdated Show resolved Hide resolved
ros_translator/package.xml Outdated Show resolved Hide resolved
self.param_srv = Server(ROSTranslatorConfig, self.param_callback)
self.pub = rospy.Publisher('~output_text', String, queue_size=1)
self.sub = rospy.Subscriber('~input_text', String, self.callback)

Copy link
Member

Choose a reason for hiding this comment

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

How about adding actionlib server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think actionlib server is not necessary since if we just want to translate some text in one node. It is enough to use deep-translator library directory.

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

Successfully merging this pull request may close these issues.

2 participants