Skip to content

Commit

Permalink
fix py
Browse files Browse the repository at this point in the history
  • Loading branch information
antbono committed Apr 17, 2024
1 parent 9f9879e commit 51fb213
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 6 deletions.
6 changes: 3 additions & 3 deletions hni_cpp/launch/chat_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ def generate_launch_description():
),
Node(
package='hni_py',
executable='gstt_service.py',
executable='g2stt_service',
name='gstt_service_node',
output='screen'
),
Node(
package='hni_py',
executable='chat_service.py',
executable='chat_service',
name='chat_service_node',
output='screen'
),
Node(
package='hni_py',
executable='gtts_service.py',
executable='gtts_service',
name='gtts_service_node',
output='screen'
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def generate_launch_description():
package='nao_lola_client',
executable='nao_lola_client',
name='lola_node',
output='screen'
output='screen',
),
IncludeLaunchDescription(
PythonLaunchDescriptionSource([
Expand Down
14 changes: 14 additions & 0 deletions hni_cpp/launch/experiment_pc_launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
return LaunchDescription([
Node(
package='hni_py', executable='face_track_server', name='usb_cam_node',
output='screen',
),
Node(
package='hni_cpp', executable='chat_action_server', name='chat_action_server',
prefix=['xterm -e'],
),
])
Empty file modified hni_py/hni_py/chat_client.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion hni_py/hni_py/chat_service.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import rclpy
from rclpy.node import Node

from hri_interfaces.srv import Chat
from hni_interfaces.srv import Chat

import openai
import os
Expand Down
Empty file modified hni_py/hni_py/face_track_client.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion hni_py/hni_py/face_track_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self):
self.br = CvBridge()

# Load the YOLOv8 model
self.model = YOLO('/home/toto/Gdrive/uni/robocup/robocup_ws/src/hri/hri_vision/hri_vision/models/yolov8n-face.pt')
self.model = YOLO('src/hni/hni_py/hni_py/models/yolov8n-face.pt')

# Store the track history
self.track_history = defaultdict(lambda: [])
Expand Down
Empty file modified hni_py/hni_py/g2stt_service.py
100644 → 100755
Empty file.
File renamed without changes.
57 changes: 57 additions & 0 deletions hni_py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,61 @@
'gtts_service = hni_py.gtts_service:main',
],
},

)

"""
import os
from glob import glob
from setuptools import setup
package_name = 'my_package'
setup(
name=package_name,
version='1.0.0',
# Packages to export
packages=[package_name],
# Files we want to install, specifically launch files
data_files=[
# Install marker file in the package index
('share/ament_index/resource_index/packages', ['resource/' + package_name]),
# Include our package.xml file
(os.path.join('share', package_name), ['package.xml']),
# Include all launch files.
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*.launch.py'))),
],
# This is important as well
install_requires=['setuptools'],
zip_safe=True,
author='ROS 2 Developer',
author_email='[email protected]',
maintainer='ROS 2 Developer',
maintainer_email='[email protected]',
keywords=['foo', 'bar'],
classifiers=[
'Intended Audience :: Developers',
'License :: TODO',
'Programming Language :: Python',
'Topic :: Software Development',
],
description='My awesome package.',
license='TODO',
# Like the CMakeLists add_executable macro, you can add your python
# scripts here.
entry_points={
'console_scripts': [
'chat_client = hni_py.chat_client:main',
'chat_service = hni_py.chat_service:main',
'face_track_client = hni_py.face_track_client:main',
'face_track_server = hni_py.face_track_server:main',
'g2stt_service = hni_py.g2stt_service:main',
'gstt_client = hni_py.gstt_client:main',
'gstt_service = hni_py.gstt_service:main',
'gtts_client = hni_py.gtts_client:main',
'gtts_service = hni_py.gtts_service:main',
],
},
)
"""

0 comments on commit 51fb213

Please sign in to comment.