<<<<<<< HEAD
RobotSample是一个基于Android平台的机器人功能演示应用,提供了丰富的机器人交互功能,包括人脸识别、语音交互、运动控制、导航引领等,同时展示了如何使用机器人API实现各种智能服务
├─app 业务代码
│ ├─robotos
│ │ ├─application 应用配置
│ │ │ ├─ ModuleCallback.java 获取CoreService层底层回调接口
│ │ │ ├─ RobotOSApplication.java 当前Application入口,用来连接CoreService和初始化语音
│ │ │ ├─ SpeechCallback.java 获取语音SkillApi回调接口
│ │ ├─fragment 业务场景
│ │ │ ├─ BaseFragment.java 基础业务场景配置,加载公共组件部分
│ │ │ ├─ ChargeFragment.java 充电业务模块
│ │ │ ├─ LeadFragment.java 引领业务模块
│ │ │ ├─ LocationFragment.java 定位相关模块
│ │ │ ├─ MainFragment.java 场景模块主入口
│ │ │ ├─ NavigationFragment.java 导航业务模块
│ │ │ ├─ SpeechFragment.java 语音业务模块
│ │ │ ├─ SportFragment.java 基础运动业务模块
│ │ │ ├─ VisionFragment.java 视觉业务模块
│ │ │ ├─ ElectricDoorControlFragment.java 电动门业务模块
│ │ │ ├─ WelcomeFragment.java 迎宾功能模块(新增)
│ │ │ ├─ BodyFollowFragment.java 人体跟随模块
│ │ ├─ view 公共组件
│ │ │ ├─ BackView.java 返回控件
│ │ │ ├─ ResultView.java 结果显示控件
│ │ ├─ maputils 地图工具类
│ │ ├─ audio 音频处理相关
│ │ ├─ LogTools.java 日志收集工具
│ │ ├─ MainActivity.java App主页面入口
│ ├─ res 资源目录
│ ├─ libs 依赖库
│ │ └── robotservice.jar 机器人服务API库
│ ├─AndroidManifest.xml App的清单文件
功能描述:实现智能迎宾功能,能够识别陌生人并主动询问名字,记住访客并在下次见面时主动称呼问好。
核心特性:
- 人脸识别和人员检测
- 陌生人识别与名字询问
- 人员信息注册与记忆
- 熟人主动称呼与问好
- 语音交互反馈
使用方法:
- 在主界面点击"Welcome Mode"按钮进入迎宾模式
- 点击"开始迎宾"按钮启动迎宾功能
- 系统会自动识别前方人员
- 对于陌生人,机器人会询问名字并记住
- 对于已记住的熟人,机器人会主动称呼并问好
- 点击"停止迎宾"按钮结束功能
功能描述:提供文本到语音(TTS)播放、语音停止和文本查询功能。
使用方法:
- 在文本框中输入要播放的内容
- 点击播放按钮进行语音播放
- 点击停止按钮终止语音播放
- 点击查询按钮进行文本查询
功能描述:提供人脸识别、人脸注册等视觉相关功能。
主要特性:
- 人脸检测与识别
- 人脸信息注册
- 人脸特征提取
功能描述:控制机器人的基础运动,包括前进、后退、转向等。
功能描述:实现机器人引领访客到指定地点的功能。
功能描述:提供地图导航功能,支持路径规划和导航执行。
功能描述:控制机器人的充电行为,包括前往充电点等。
功能描述:控制电动门的开关操作。
主要功能:
- 第一扇门开关控制
- 第二扇门开关控制
- 所有门的统一开关控制
- 门状态查询
功能描述:实现机器人跟随人体移动的功能。
机器人应用的开发需要依赖Android开发环境、IDE工具。详细配置请参考以下文档。 若要直接编译本示例代码运行,需要JDK1.8(Java 8),请手动从机器人屏幕点击启动本App而不是从IDE上的debug按钮,以免无法获得api权限。
机器人系统是基于Android定制开发,所以我们在开发机器人应用的时候需要配置Android开发环境。具体Android开发环境配置,请参考:Android开发者文档。 <<<<<<< HEAD
- robotservice.jar:机器人服务API库,提供核心功能接口
- gson:2.10.1:用于JSON数据处理
本项目支持多种语言,包括但不限于:
- 简体中文
- 繁体中文
- 英文
- 日文
- 韩文
- 法文
- 德文
- 俄文
- 等多种欧洲和亚洲语言
语言资源文件位于res/values-*目录下,可根据需要添加更多语言支持。
- 权限问题:请确保应用具有所需的所有权限,特别是相机、麦克风等敏感权限
- API连接:确保机器人CoreService正常运行,应用能够正确连接
- 网络连接:某些功能(如人脸注册)可能需要网络连接,请确保网络通畅
- 启动方式:请从机器人屏幕手动启动应用,而不是通过IDE的debug按钮
- 版本兼容性:确保使用JDK 1.8进行编译
- 创建新的Fragment类,继承自BaseFragment
- 实现onCreateView方法,加载相应的布局文件
- 在MainFragment中添加相应的入口按钮和点击事件
- 在strings.xml中添加相关的字符串资源
- 在相应的布局文件中添加UI元素
- 语音API:通过RobotOSApplication.getInstance().getSkillApi()获取
- 机器人控制API:通过RobotApi.getInstance()获取
- 人脸识别API:通过PersonApi相关接口获取
RobotSample is an Android-based robot function demonstration application that provides rich robot interaction features, including face recognition, voice interaction, motion control, navigation guidance, and more. This project demonstrates how to use robot APIs to implement various intelligent services, suitable for commercial, medical, educational and other scenarios.
├─app Business code
│ ├─robotos
│ │ ├─application Application configuration
│ │ │ ├─ ModuleCallback.java Get the underlying callback interface of the CoreService layer
│ │ │ ├─ RobotOSApplication.java Current Application entry point, used to connect CoreService and initialize voice
│ │ │ ├─ SpeechCallback.java Get the callback interface of the voice SkillApi
│ │ ├─fragment Business scenes
│ │ │ ├─ BaseFragment.java Basic business scene configuration, loading common components
│ │ │ ├─ ChargeFragment.java Charging business module
│ │ │ ├─ LeadFragment.java Leading business module
│ │ │ ├─ LocationFragment.java Location-related module
│ │ │ ├─ MainFragment.java Scene module main entry
│ │ │ ├─ NavigationFragment.java Navigation business module
│ │ │ ├─ SpeechFragment.java Voice business module
│ │ │ ├─ SportFragment.java Basic sports business module
│ │ │ ├─ VisionFragment.java Vision business module
│ │ │ ├─ ElectricDoorControlFragment.java Electric door service module
│ │ │ ├─ WelcomeFragment.java Welcome function module (New)
│ │ │ ├─ BodyFollowFragment.java Body following module
│ │ ├─ view Common components
│ │ │ ├─ BackView.java Back control
│ │ │ ├─ ResultView.java Result display control
│ │ ├─ maputils Map utilities
│ │ ├─ audio Audio processing
│ │ ├─ LogTools.java Log collection tool
│ │ ├─ MainActivity.java App main page entry
│ ├─ res Resource directory
│ ├─ libs Dependent libraries
│ │ └── robotservice.jar Robot service API library
│ ├─AndroidManifest.xml Manifest file of the App
Description: Implements intelligent welcome function, capable of recognizing strangers and actively asking for their names, remembering visitors and greeting them by name when they meet again.
Core Features:
- Face recognition and person detection
- Stranger recognition and name inquiry
- Person information registration and memory
- Active greeting to acquaintances by name
- Voice interaction feedback
Usage:
- Click the "Welcome Mode" button on the main interface to enter welcome mode
- Click the "Start Welcome" button to activate the welcome function
- The system will automatically recognize people in front
- For strangers, the robot will ask for their names and remember them
- For remembered acquaintances, the robot will greet them by name
- Click the "Stop Welcome" button to end the function
Description: Provides text-to-speech (TTS) playback, voice stop and text query functions.
Usage:
- Enter the content to be played in the text box
- Click the play button for voice playback
- Click the stop button to terminate voice playback
- Click the query button for text query
Description: Provides face recognition, face registration and other vision-related functions.
Main Features:
- Face detection and recognition
- Face information registration
- Face feature extraction
Description: Controls the basic movement of the robot, including forward, backward, turning, etc.
Description: Implements the function of the robot leading visitors to designated locations.
Description: Provides map navigation functions, supporting path planning and navigation execution.
Description: Controls the charging behavior of the robot, including going to charging points.
Description: Controls the opening and closing operations of electric doors.
Main Functions:
- First door opening and closing control
- Second door opening and closing control
- Unified opening and closing control of all doors
- Door status query
Description: Implements the function of the robot following human movement.
Robot application development requires the Android development environment and IDE tools. For detailed configuration, please refer to the following documents. To compile and run this sample code directly, you will need JDK 1.8 (Java 8). Please manually click on the app launch from the robot's screen instead of using the debug button in the IDE to ensure that you obtain the necessary API permissions.
The robot system is based on customized development on Android, so when developing robot applications, we need to configure the Android development environment. For specific Android development environment configuration, please refer to: Android Developer Documentation.
- robotservice.jar: Robot service API library, providing core function interfaces
- gson:2.10.1: Used for JSON data processing
This project supports multiple languages, including but not limited to:
- Simplified Chinese
- Traditional Chinese
- English
- Japanese
- Korean
- French
- German
- Russian
- Many other European and Asian languages
Language resource files are located in the res/values-* directory, and more language support can be added as needed.
- Permission Issues: Ensure that the application has all required permissions, especially sensitive permissions such as camera and microphone
- API Connection: Ensure that the robot's CoreService is running normally and the application can connect correctly
- Network Connection: Some functions (such as face registration) may require network connection, please ensure network connectivity
- Startup Method: Please start the application manually from the robot screen, not through the debug button in the IDE
- Version Compatibility: Ensure compilation using JDK 1.8
- Create a new Fragment class, inheriting from BaseFragment
- Implement the onCreateView method and load the corresponding layout file
- Add the corresponding entry button and click event in MainFragment
- Add relevant string resources in strings.xml
- Add UI elements in the corresponding layout file
- Voice API: Obtain through RobotOSApplication.getInstance().getSkillApi()
- Robot Control API: Obtain through RobotApi.getInstance()
- Face Recognition API: Obtain through PersonApi related interfaces
=======
0ae9bd90ceed8834a07b045ccfa62360dd762d3d