navel-remote 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- navel_remote-0.0.1/LICENSE +25 -0
- navel_remote-0.0.1/PKG-INFO +19 -0
- navel_remote-0.0.1/README.md +3 -0
- navel_remote-0.0.1/pyproject.toml +22 -0
- navel_remote-0.0.1/setup.cfg +4 -0
- navel_remote-0.0.1/src/navel_remote.egg-info/PKG-INFO +19 -0
- navel_remote-0.0.1/src/navel_remote.egg-info/SOURCES.txt +9 -0
- navel_remote-0.0.1/src/navel_remote.egg-info/dependency_links.txt +1 -0
- navel_remote-0.0.1/src/navel_remote.egg-info/requires.txt +2 -0
- navel_remote-0.0.1/src/navel_remote.egg-info/top_level.txt +1 -0
- navel_remote-0.0.1/src/nvr/remote.py +69 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, UH Robot House / User Projects
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
17
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
19
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
20
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
21
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
22
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
23
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
24
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
25
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: navel-remote
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A remote interface to control navel robot
|
|
5
|
+
Author-email: Patrick Holthaus <patrick.holthaus@googlemail.com>
|
|
6
|
+
License-Expression: BSD-2-Clause
|
|
7
|
+
Project-URL: Homepage, https://gitlab.com/robothouse/rh-projects/hospital-at-home/navel-remote/
|
|
8
|
+
Project-URL: Bug Tracker, https://gitlab.com/robothouse/rh-projects/hospital-at-home/navel-remote/issues/
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: ztl
|
|
14
|
+
Requires-Dist: navel
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# Navel Remote
|
|
18
|
+
|
|
19
|
+
This project will be deployed on the navel robot to enable remote control via ZTL
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "navel-remote"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name="Patrick Holthaus", email="patrick.holthaus@googlemail.com" },
|
|
6
|
+
]
|
|
7
|
+
description = "A remote interface to control navel robot"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
license = "BSD-2-Clause"
|
|
10
|
+
license-files = [ "LICENSE" ]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python",
|
|
13
|
+
"Operating System :: OS Independent"
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"ztl",
|
|
17
|
+
"navel"
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
"Homepage" = "https://gitlab.com/robothouse/rh-projects/hospital-at-home/navel-remote/"
|
|
22
|
+
"Bug Tracker" = "https://gitlab.com/robothouse/rh-projects/hospital-at-home/navel-remote/issues/"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: navel-remote
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A remote interface to control navel robot
|
|
5
|
+
Author-email: Patrick Holthaus <patrick.holthaus@googlemail.com>
|
|
6
|
+
License-Expression: BSD-2-Clause
|
|
7
|
+
Project-URL: Homepage, https://gitlab.com/robothouse/rh-projects/hospital-at-home/navel-remote/
|
|
8
|
+
Project-URL: Bug Tracker, https://gitlab.com/robothouse/rh-projects/hospital-at-home/navel-remote/issues/
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: ztl
|
|
14
|
+
Requires-Dist: navel
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# Navel Remote
|
|
18
|
+
|
|
19
|
+
This project will be deployed on the navel robot to enable remote control via ZTL
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/navel_remote.egg-info/PKG-INFO
|
|
5
|
+
src/navel_remote.egg-info/SOURCES.txt
|
|
6
|
+
src/navel_remote.egg-info/dependency_links.txt
|
|
7
|
+
src/navel_remote.egg-info/requires.txt
|
|
8
|
+
src/navel_remote.egg-info/top_level.txt
|
|
9
|
+
src/nvr/remote.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nvr
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import logging
|
|
5
|
+
logging.basicConfig(level=logging.INFO)
|
|
6
|
+
|
|
7
|
+
import yaml
|
|
8
|
+
|
|
9
|
+
from ztl.core.server import TaskServer
|
|
10
|
+
from ztl.core.task import ExecutableTask, TaskController
|
|
11
|
+
|
|
12
|
+
import navel
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class NavelTTS(ExecutableTask):
|
|
16
|
+
|
|
17
|
+
def __init__(self, goal):
|
|
18
|
+
self.logger = logging.getLogger('navel-tts')
|
|
19
|
+
self.goal = goal
|
|
20
|
+
|
|
21
|
+
def execute(self):
|
|
22
|
+
try:
|
|
23
|
+
self.logger.info("Uttering: %s" % self.goal)
|
|
24
|
+
with navel.Robot() as robot:
|
|
25
|
+
robot.say(self.goal)
|
|
26
|
+
|
|
27
|
+
except Exception as e:
|
|
28
|
+
self.logger.error("Exception while uttering: %s" % repr(e))
|
|
29
|
+
raise e
|
|
30
|
+
|
|
31
|
+
def abort(self):
|
|
32
|
+
return False
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class NavelController(TaskController):
|
|
36
|
+
|
|
37
|
+
def __init__(self):
|
|
38
|
+
super(NavelController, self).__init__()
|
|
39
|
+
self.logger = logging.getLogger('navel-controller')
|
|
40
|
+
|
|
41
|
+
def assign(self, handler, component, goal):
|
|
42
|
+
if handler == "navel":
|
|
43
|
+
if component == "tts":
|
|
44
|
+
self.logger.debug("Creating TTS task with goal '%s' for %s/%s..." % (goal, handler, component))
|
|
45
|
+
return NavelTTS, goal
|
|
46
|
+
else:
|
|
47
|
+
self.logger.error("unknown component: %s" % component)
|
|
48
|
+
else:
|
|
49
|
+
self.logger.error("unknown robot: %s" % handler)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def main_cli():
|
|
53
|
+
|
|
54
|
+
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
|
55
|
+
parser.add_argument("-p", "--port", type=int,
|
|
56
|
+
help="The port to listen listen on.", default=5565)
|
|
57
|
+
parser.add_argument("-s", "--scope", type=str,
|
|
58
|
+
help="The scope that to respond to.", default="/navel")
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
args, unknown = parser.parse_known_args()
|
|
62
|
+
|
|
63
|
+
server = TaskServer(args.port)
|
|
64
|
+
server.register(args.scope, NavelController())
|
|
65
|
+
server.listen()
|
|
66
|
+
|
|
67
|
+
if __name__ == "__main__":
|
|
68
|
+
|
|
69
|
+
main_cli()
|