parent
aa7f826eaf
commit
808b2033cc
|
@ -1,36 +1,36 @@
|
||||||
# Generated by MacOS
|
# Generated by MacOS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# Generated by Windows
|
# Generated by Windows
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
# Applications
|
# Applications
|
||||||
*.app
|
*.app
|
||||||
*.exe
|
*.exe
|
||||||
*.war
|
*.war
|
||||||
|
|
||||||
# Large media files
|
# Large media files
|
||||||
*.mp4
|
*.mp4
|
||||||
*.tiff
|
*.tiff
|
||||||
*.avi
|
*.avi
|
||||||
*.flv
|
*.flv
|
||||||
*.mov
|
*.mov
|
||||||
*.wmv
|
*.wmv
|
||||||
*.jpg
|
*.jpg
|
||||||
*.png
|
*.png
|
||||||
|
|
||||||
# VS Code
|
# VS Code
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
# other
|
# other
|
||||||
*.egg-info
|
*.egg-info
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
# IDEs
|
# IDEs
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
# cache
|
# cache
|
||||||
.pytest_cache
|
.pytest_cache
|
||||||
|
|
||||||
# JetBrains IDE
|
# JetBrains IDE
|
||||||
.idea/
|
.idea/
|
||||||
|
|
58
LICENSE
58
LICENSE
|
@ -1,29 +1,29 @@
|
||||||
BSD 3-Clause License
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2016-2024 HangZhou YuShu TECHNOLOGY CO.,LTD. ("Unitree Robotics")
|
Copyright (c) 2016-2024 HangZhou YuShu TECHNOLOGY CO.,LTD. ("Unitree Robotics")
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
list of conditions and the following disclaimer.
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
* Neither the name of the copyright holder nor the names of its
|
* Neither the name of the copyright holder nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
242
README zh.md
242
README zh.md
|
@ -1,121 +1,121 @@
|
||||||
# unitree_sdk2_python
|
# unitree_sdk2_python
|
||||||
unitree_sdk2 python 接口
|
unitree_sdk2 python 接口
|
||||||
|
|
||||||
# 安装
|
# 安装
|
||||||
## 依赖
|
## 依赖
|
||||||
- python>=3.8,<3.11
|
- python>=3.8,<3.11
|
||||||
- cyclonedds==0.10.2
|
- cyclonedds==0.10.2
|
||||||
- numpy
|
- numpy
|
||||||
- opencv-python
|
- opencv-python
|
||||||
|
|
||||||
## 安装 unitree_sdk2_python
|
## 安装 unitree_sdk2_python
|
||||||
在终端中执行:
|
在终端中执行:
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
sudo apt install python3-pip
|
sudo apt install python3-pip
|
||||||
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
|
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
|
||||||
cd unitree_sdk2_python
|
cd unitree_sdk2_python
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
```
|
```
|
||||||
## FAQ
|
## FAQ
|
||||||
##### 1. `pip3 install -e .` 遇到报错
|
##### 1. `pip3 install -e .` 遇到报错
|
||||||
```bash
|
```bash
|
||||||
Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH
|
Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH
|
||||||
```
|
```
|
||||||
该错误提示找不到 cyclonedds 路径。首先编译安装cyclonedds:
|
该错误提示找不到 cyclonedds 路径。首先编译安装cyclonedds:
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
|
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
|
||||||
cd cyclonedds && mkdir build install && cd build
|
cd cyclonedds && mkdir build install && cd build
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=../install
|
cmake .. -DCMAKE_INSTALL_PREFIX=../install
|
||||||
cmake --build . --target install
|
cmake --build . --target install
|
||||||
```
|
```
|
||||||
进入 unitree_sdk2_python 目录,设置 `CYCLONEDDS_HOME` 为刚刚编译好的 cyclonedds 所在路径,再安装 unitree_sdk2_python
|
进入 unitree_sdk2_python 目录,设置 `CYCLONEDDS_HOME` 为刚刚编译好的 cyclonedds 所在路径,再安装 unitree_sdk2_python
|
||||||
```bash
|
```bash
|
||||||
cd ~/unitree_sdk2_python
|
cd ~/unitree_sdk2_python
|
||||||
export CYCLONEDDS_HOME="~/cyclonedds/install"
|
export CYCLONEDDS_HOME="~/cyclonedds/install"
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
```
|
```
|
||||||
|
|
||||||
详细见:
|
详细见:
|
||||||
https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries
|
https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries
|
||||||
|
|
||||||
# 使用
|
# 使用
|
||||||
python sdk2 接口与 unitree_skd2的接口保持一致,通过请求响应或订阅发布topic实现机器人的状态获取和控制。相应的例程位于`/example`目录下。在运行例程前,需要根据文档 https://support.unitree.com/home/zh/developer/Quick_start 配置好机器人的网络连接。
|
python sdk2 接口与 unitree_skd2的接口保持一致,通过请求响应或订阅发布topic实现机器人的状态获取和控制。相应的例程位于`/example`目录下。在运行例程前,需要根据文档 https://support.unitree.com/home/zh/developer/Quick_start 配置好机器人的网络连接。
|
||||||
## DDS通讯
|
## DDS通讯
|
||||||
在终端中执行:
|
在终端中执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/helloworld/publisher.py
|
python3 ./example/helloworld/publisher.py
|
||||||
```
|
```
|
||||||
打开新的终端,执行:
|
打开新的终端,执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/helloworld/subscriber.py
|
python3 ./example/helloworld/subscriber.py
|
||||||
```
|
```
|
||||||
可以看到终端输出的数据信息。`publisher.py` 和 `subscriber.py` 传输的数据定义在 `user_data.py` 中,用户可以根据需要自行定义需要传输的数据结构。
|
可以看到终端输出的数据信息。`publisher.py` 和 `subscriber.py` 传输的数据定义在 `user_data.py` 中,用户可以根据需要自行定义需要传输的数据结构。
|
||||||
|
|
||||||
## 高层状态和控制
|
## 高层状态和控制
|
||||||
高层接口的数据结构和控制方式与unitree_sdk2一致。具体可见:https://support.unitree.com/home/zh/developer/sports_services
|
高层接口的数据结构和控制方式与unitree_sdk2一致。具体可见:https://support.unitree.com/home/zh/developer/sports_services
|
||||||
### 高层状态
|
### 高层状态
|
||||||
终端中执行:
|
终端中执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/high_level/read_highstate.py enp2s0
|
python3 ./example/high_level/read_highstate.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
||||||
### 高层控制
|
### 高层控制
|
||||||
终端中执行:
|
终端中执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/high_level/sportmode_test.py enp2s0
|
python3 ./example/high_level/sportmode_test.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
||||||
该例程提供了几种测试方法,可根据测试需要选择:
|
该例程提供了几种测试方法,可根据测试需要选择:
|
||||||
```python
|
```python
|
||||||
test.StandUpDown() # 站立趴下
|
test.StandUpDown() # 站立趴下
|
||||||
# test.VelocityMove() # 速度控制
|
# test.VelocityMove() # 速度控制
|
||||||
# test.BalanceAttitude() # 姿态控制
|
# test.BalanceAttitude() # 姿态控制
|
||||||
# test.TrajectoryFollow() # 轨迹跟踪
|
# test.TrajectoryFollow() # 轨迹跟踪
|
||||||
# test.SpecialMotions() # 特殊动作
|
# test.SpecialMotions() # 特殊动作
|
||||||
|
|
||||||
```
|
```
|
||||||
## 底层状态和控制
|
## 底层状态和控制
|
||||||
底层接口的数据结构和控制方式与unitree_sdk2一致。具体可见:https://support.unitree.com/home/zh/developer/Basic_services
|
底层接口的数据结构和控制方式与unitree_sdk2一致。具体可见:https://support.unitree.com/home/zh/developer/Basic_services
|
||||||
### 底层状态
|
### 底层状态
|
||||||
终端中执行:
|
终端中执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/low_level/lowlevel_control.py enp2s0
|
python3 ./example/low_level/lowlevel_control.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。程序会输出右前腿hip关节的状态、IMU和电池电压信息。
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。程序会输出右前腿hip关节的状态、IMU和电池电压信息。
|
||||||
|
|
||||||
### 底层电机控制
|
### 底层电机控制
|
||||||
首先使用 app 关闭高层运动服务(sport_mode),否则会导致指令冲突。
|
首先使用 app 关闭高层运动服务(sport_mode),否则会导致指令冲突。
|
||||||
终端中执行:
|
终端中执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/low_level/lowlevel_control.py enp2s0
|
python3 ./example/low_level/lowlevel_control.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。左后腿 hip 关节会保持在0角度 (安全起见,这里设置 kp=10, kd=1),左后腿 calf 关节将持续输出 1Nm 的转矩。
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。左后腿 hip 关节会保持在0角度 (安全起见,这里设置 kp=10, kd=1),左后腿 calf 关节将持续输出 1Nm 的转矩。
|
||||||
|
|
||||||
## 遥控器状态获取
|
## 遥控器状态获取
|
||||||
终端中执行:
|
终端中执行:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/wireless_controller/wireless_controller.py enp2s0
|
python3 ./example/wireless_controller/wireless_controller.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
||||||
终端将输出每一个按键的状态。对于遥控器按键的定义和数据结构可见: https://support.unitree.com/home/zh/developer/Get_remote_control_status
|
终端将输出每一个按键的状态。对于遥控器按键的定义和数据结构可见: https://support.unitree.com/home/zh/developer/Get_remote_control_status
|
||||||
|
|
||||||
## 前置摄像头
|
## 前置摄像头
|
||||||
使用opencv获取前置摄像头(确保在有图形界面的系统下运行, 按 ESC 退出程序):
|
使用opencv获取前置摄像头(确保在有图形界面的系统下运行, 按 ESC 退出程序):
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/front_camera/camera_opencv.py enp2s0
|
python3 ./example/front_camera/camera_opencv.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。
|
||||||
|
|
||||||
## 避障开关
|
## 避障开关
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0
|
python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。机器人将循环开启和关闭避障功能。关于避障服务,详细见 https://support.unitree.com/home/zh/developer/ObstaclesAvoidClient
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。机器人将循环开启和关闭避障功能。关于避障服务,详细见 https://support.unitree.com/home/zh/developer/ObstaclesAvoidClient
|
||||||
|
|
||||||
## 灯光音量控制
|
## 灯光音量控制
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/vui_client/vui_client_example.py enp2s0
|
python3 ./example/vui_client/vui_client_example.py enp2s0
|
||||||
```
|
```
|
||||||
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。机器人将循环调节音量和灯光亮度。该接口详细见 https://support.unitree.com/home/zh/developer/VuiClient
|
其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。机器人将循环调节音量和灯光亮度。该接口详细见 https://support.unitree.com/home/zh/developer/VuiClient
|
||||||
|
|
222
README.md
222
README.md
|
@ -1,112 +1,112 @@
|
||||||
# unitree_sdk2_python
|
# unitree_sdk2_python
|
||||||
Python interface for unitree sdk2
|
Python interface for unitree sdk2
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
## Dependencies
|
## Dependencies
|
||||||
- Python >= 3.8, < 3.11
|
- Python >= 3.8, < 3.11
|
||||||
- cyclonedds == 0.10.2
|
- cyclonedds == 0.10.2
|
||||||
- numpy
|
- numpy
|
||||||
- opencv-python
|
- opencv-python
|
||||||
## Install unitree_sdk2_python
|
## Install unitree_sdk2_python
|
||||||
Execute the following commands in the terminal:
|
Execute the following commands in the terminal:
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
sudo apt install python3-pip
|
sudo apt install python3-pip
|
||||||
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
|
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
|
||||||
cd unitree_sdk2_python
|
cd unitree_sdk2_python
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
```
|
```
|
||||||
## FAQ
|
## FAQ
|
||||||
##### 1. Error when `pip3 install -e .`:
|
##### 1. Error when `pip3 install -e .`:
|
||||||
```bash
|
```bash
|
||||||
Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH
|
Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH
|
||||||
```
|
```
|
||||||
This error mentions that the cyclonedds path could not be found. First compile and install cyclonedds:
|
This error mentions that the cyclonedds path could not be found. First compile and install cyclonedds:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
|
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
|
||||||
cd cyclonedds && mkdir build install && cd build
|
cd cyclonedds && mkdir build install && cd build
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=../install
|
cmake .. -DCMAKE_INSTALL_PREFIX=../install
|
||||||
cmake --build . --target install
|
cmake --build . --target install
|
||||||
```
|
```
|
||||||
Enter the unitree_sdk2_python directory, set `CYCLONEDDS_HOME` to the path of the cyclonedds you just compiled, and then install unitree_sdk2_python.
|
Enter the unitree_sdk2_python directory, set `CYCLONEDDS_HOME` to the path of the cyclonedds you just compiled, and then install unitree_sdk2_python.
|
||||||
```bash
|
```bash
|
||||||
cd ~/unitree_sdk2_python
|
cd ~/unitree_sdk2_python
|
||||||
export CYCLONEDDS_HOME="~/cyclonedds/install"
|
export CYCLONEDDS_HOME="~/cyclonedds/install"
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
```
|
```
|
||||||
For details, see: https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries
|
For details, see: https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
The Python sdk2 interface maintains consistency with the unitree_sdk2 interface, achieving robot status acquisition and control through request-response or topic subscription/publishing. Example programs are located in the `/example` directory. Before running the examples, configure the robot's network connection as per the instructions in the document at https://support.unitree.com/home/en/developer/Quick_start.
|
The Python sdk2 interface maintains consistency with the unitree_sdk2 interface, achieving robot status acquisition and control through request-response or topic subscription/publishing. Example programs are located in the `/example` directory. Before running the examples, configure the robot's network connection as per the instructions in the document at https://support.unitree.com/home/en/developer/Quick_start.
|
||||||
## DDS Communication
|
## DDS Communication
|
||||||
In the terminal, execute:
|
In the terminal, execute:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/helloworld/publisher.py
|
python3 ./example/helloworld/publisher.py
|
||||||
```
|
```
|
||||||
Open a new terminal and execute:
|
Open a new terminal and execute:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/helloworld/subscriber.py
|
python3 ./example/helloworld/subscriber.py
|
||||||
```
|
```
|
||||||
You will see the data output in the terminal. The data structure transmitted between `publisher.py` and `subscriber.py` is defined in `user_data.py`, and users can define the required data structure as needed.
|
You will see the data output in the terminal. The data structure transmitted between `publisher.py` and `subscriber.py` is defined in `user_data.py`, and users can define the required data structure as needed.
|
||||||
## High-Level Status and Control
|
## High-Level Status and Control
|
||||||
The high-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/sports_services.
|
The high-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/sports_services.
|
||||||
### High-Level Status
|
### High-Level Status
|
||||||
Execute the following command in the terminal:
|
Execute the following command in the terminal:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/high_level/read_highstate.py enp2s0
|
python3 ./example/high_level/read_highstate.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected,.
|
Replace `enp2s0` with the name of the network interface to which the robot is connected,.
|
||||||
### High-Level Control
|
### High-Level Control
|
||||||
Execute the following command in the terminal:
|
Execute the following command in the terminal:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/high_level/sportmode_test.py enp2s0
|
python3 ./example/high_level/sportmode_test.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected. This example program provides several test methods, and you can choose the required tests as follows:
|
Replace `enp2s0` with the name of the network interface to which the robot is connected. This example program provides several test methods, and you can choose the required tests as follows:
|
||||||
```python
|
```python
|
||||||
test.StandUpDown() # Stand up and lie down
|
test.StandUpDown() # Stand up and lie down
|
||||||
# test.VelocityMove() # Velocity control
|
# test.VelocityMove() # Velocity control
|
||||||
# test.BalanceAttitude() # Attitude control
|
# test.BalanceAttitude() # Attitude control
|
||||||
# test.TrajectoryFollow() # Trajectory tracking
|
# test.TrajectoryFollow() # Trajectory tracking
|
||||||
# test.SpecialMotions() # Special motions
|
# test.SpecialMotions() # Special motions
|
||||||
```
|
```
|
||||||
## Low-Level Status and Control
|
## Low-Level Status and Control
|
||||||
The low-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/Basic_services.
|
The low-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/Basic_services.
|
||||||
### Low-Level Status
|
### Low-Level Status
|
||||||
Execute the following command in the terminal:
|
Execute the following command in the terminal:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/low_level/lowlevel_control.py enp2s0
|
python3 ./example/low_level/lowlevel_control.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected. The program will output the state of the right front leg hip joint, IMU, and battery voltage.
|
Replace `enp2s0` with the name of the network interface to which the robot is connected. The program will output the state of the right front leg hip joint, IMU, and battery voltage.
|
||||||
### Low-Level Motor Control
|
### Low-Level Motor Control
|
||||||
First, use the app to turn off the high-level motion service (sport_mode) to prevent conflicting instructions.
|
First, use the app to turn off the high-level motion service (sport_mode) to prevent conflicting instructions.
|
||||||
Execute the following command in the terminal:
|
Execute the following command in the terminal:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/low_level/lowlevel_control.py enp2s0
|
python3 ./example/low_level/lowlevel_control.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected. The left hind leg hip joint will maintain a 0-degree position (for safety, set kp=10, kd=1), and the left hind leg calf joint will continuously output 1Nm of torque.
|
Replace `enp2s0` with the name of the network interface to which the robot is connected. The left hind leg hip joint will maintain a 0-degree position (for safety, set kp=10, kd=1), and the left hind leg calf joint will continuously output 1Nm of torque.
|
||||||
## Wireless Controller Status
|
## Wireless Controller Status
|
||||||
Execute the following command in the terminal:
|
Execute the following command in the terminal:
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/wireless_controller/wireless_controller.py enp2s0
|
python3 ./example/wireless_controller/wireless_controller.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected. The terminal will output the status of each key. For the definition and data structure of the remote control keys, refer to https://support.unitree.com/home/en/developer/Get_remote_control_status.
|
Replace `enp2s0` with the name of the network interface to which the robot is connected. The terminal will output the status of each key. For the definition and data structure of the remote control keys, refer to https://support.unitree.com/home/en/developer/Get_remote_control_status.
|
||||||
## Front Camera
|
## Front Camera
|
||||||
Use OpenCV to obtain the front camera (ensure to run on a system with a graphical interface, and press ESC to exit the program):
|
Use OpenCV to obtain the front camera (ensure to run on a system with a graphical interface, and press ESC to exit the program):
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/front_camera/camera_opencv.py enp2s0
|
python3 ./example/front_camera/camera_opencv.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected.
|
Replace `enp2s0` with the name of the network interface to which the robot is connected.
|
||||||
|
|
||||||
## Obstacle Avoidance Switch
|
## Obstacle Avoidance Switch
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0
|
python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected. The robot will cycle obstacle avoidance on and off. For details on the obstacle avoidance service, see https://support.unitree.com/home/en/developer/ObstaclesAvoidClient
|
Replace `enp2s0` with the name of the network interface to which the robot is connected. The robot will cycle obstacle avoidance on and off. For details on the obstacle avoidance service, see https://support.unitree.com/home/en/developer/ObstaclesAvoidClient
|
||||||
|
|
||||||
## Light and volume control
|
## Light and volume control
|
||||||
```bash
|
```bash
|
||||||
python3 ./example/vui_client/vui_client_example.py enp2s0
|
python3 ./example/vui_client/vui_client_example.py enp2s0
|
||||||
```
|
```
|
||||||
Replace `enp2s0` with the name of the network interface to which the robot is connected.T he robot will cycle the volume and light brightness. The interface is detailed at https://support.unitree.com/home/en/developer/VuiClient
|
Replace `enp2s0` with the name of the network interface to which the robot is connected.T he robot will cycle the volume and light brightness. The interface is detailed at https://support.unitree.com/home/en/developer/VuiClient
|
|
@ -1,41 +1,41 @@
|
||||||
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.go2.video.video_client import VideoClient
|
from unitree_sdk2py.go2.video.video_client import VideoClient
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
|
|
||||||
client = VideoClient() # Create a video client
|
client = VideoClient() # Create a video client
|
||||||
client.SetTimeout(3.0)
|
client.SetTimeout(3.0)
|
||||||
client.Init()
|
client.Init()
|
||||||
|
|
||||||
code, data = client.GetImageSample()
|
code, data = client.GetImageSample()
|
||||||
|
|
||||||
# Request normal when code==0
|
# Request normal when code==0
|
||||||
while code == 0:
|
while code == 0:
|
||||||
# Get Image data from Go2 robot
|
# Get Image data from Go2 robot
|
||||||
code, data = client.GetImageSample()
|
code, data = client.GetImageSample()
|
||||||
|
|
||||||
# Convert to numpy image
|
# Convert to numpy image
|
||||||
image_data = np.frombuffer(bytes(data), dtype=np.uint8)
|
image_data = np.frombuffer(bytes(data), dtype=np.uint8)
|
||||||
image = cv2.imdecode(image_data, cv2.IMREAD_COLOR)
|
image = cv2.imdecode(image_data, cv2.IMREAD_COLOR)
|
||||||
|
|
||||||
# Display image
|
# Display image
|
||||||
cv2.imshow("front_camera", image)
|
cv2.imshow("front_camera", image)
|
||||||
# Press ESC to stop
|
# Press ESC to stop
|
||||||
if cv2.waitKey(20) == 27:
|
if cv2.waitKey(20) == 27:
|
||||||
break
|
break
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("Get image sample error. code:", code)
|
print("Get image sample error. code:", code)
|
||||||
else:
|
else:
|
||||||
# Capture an image
|
# Capture an image
|
||||||
cv2.imwrite("front_image.jpg", image)
|
cv2.imwrite("front_image.jpg", image)
|
||||||
|
|
||||||
cv2.destroyWindow("front_camera")
|
cv2.destroyWindow("front_camera")
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.go2.video.video_client import VideoClient
|
from unitree_sdk2py.go2.video.video_client import VideoClient
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
|
|
||||||
client = VideoClient()
|
client = VideoClient()
|
||||||
client.SetTimeout(3.0)
|
client.SetTimeout(3.0)
|
||||||
client.Init()
|
client.Init()
|
||||||
|
|
||||||
print("##################GetImageSample###################")
|
print("##################GetImageSample###################")
|
||||||
code, data = client.GetImageSample()
|
code, data = client.GetImageSample()
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("get image sample error. code:", code)
|
print("get image sample error. code:", code)
|
||||||
else:
|
else:
|
||||||
imageName = "./img.jpg"
|
imageName = "./img.jpg"
|
||||||
print("ImageName:", imageName)
|
print("ImageName:", imageName)
|
||||||
|
|
||||||
with open(imageName, "+wb") as f:
|
with open(imageName, "+wb") as f:
|
||||||
f.write(bytes(data))
|
f.write(bytes(data))
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unitree_sdk2py.core.channel import ChannelPublisher, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelPublisher, ChannelFactoryInitialize
|
||||||
from user_data import *
|
from user_data import *
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
ChannelFactoryInitialize()
|
ChannelFactoryInitialize()
|
||||||
|
|
||||||
# Create a publisher to publish the data defined in UserData class
|
# Create a publisher to publish the data defined in UserData class
|
||||||
pub = ChannelPublisher("topic", UserData)
|
pub = ChannelPublisher("topic", UserData)
|
||||||
pub.Init()
|
pub.Init()
|
||||||
|
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
# Create a Userdata message
|
# Create a Userdata message
|
||||||
msg = UserData(" ", 0)
|
msg = UserData(" ", 0)
|
||||||
msg.string_data = "Hello world"
|
msg.string_data = "Hello world"
|
||||||
msg.float_data = time.time()
|
msg.float_data = time.time()
|
||||||
|
|
||||||
# Publish message
|
# Publish message
|
||||||
if pub.Write(msg, 0.5):
|
if pub.Write(msg, 0.5):
|
||||||
print("Publish success. msg:", msg)
|
print("Publish success. msg:", msg)
|
||||||
else:
|
else:
|
||||||
print("Waitting for subscriber.")
|
print("Waitting for subscriber.")
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
pub.Close()
|
pub.Close()
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
||||||
from user_data import *
|
from user_data import *
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
ChannelFactoryInitialize()
|
ChannelFactoryInitialize()
|
||||||
# Create a subscriber to subscribe the data defined in UserData class
|
# Create a subscriber to subscribe the data defined in UserData class
|
||||||
sub = ChannelSubscriber("topic", UserData)
|
sub = ChannelSubscriber("topic", UserData)
|
||||||
sub.Init()
|
sub.Init()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
msg = sub.Read()
|
msg = sub.Read()
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
print("Subscribe success. msg:", msg)
|
print("Subscribe success. msg:", msg)
|
||||||
else:
|
else:
|
||||||
print("No data subscribed.")
|
print("No data subscribed.")
|
||||||
break
|
break
|
||||||
sub.Close()
|
sub.Close()
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from cyclonedds.idl import IdlStruct
|
from cyclonedds.idl import IdlStruct
|
||||||
|
|
||||||
|
|
||||||
# This class defines user data consisting of a float data and a string data
|
# This class defines user data consisting of a float data and a string data
|
||||||
@dataclass
|
@dataclass
|
||||||
class UserData(IdlStruct, typename="UserData"):
|
class UserData(IdlStruct, typename="UserData"):
|
||||||
string_data: str
|
string_data: str
|
||||||
float_data: float
|
float_data: float
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
||||||
|
|
||||||
from unitree_sdk2py.idl.default import unitree_go_msg_dds__SportModeState_
|
from unitree_sdk2py.idl.default import unitree_go_msg_dds__SportModeState_
|
||||||
from unitree_sdk2py.idl.unitree_go.msg.dds_ import SportModeState_
|
from unitree_sdk2py.idl.unitree_go.msg.dds_ import SportModeState_
|
||||||
|
|
||||||
|
|
||||||
def HighStateHandler(msg: SportModeState_):
|
def HighStateHandler(msg: SportModeState_):
|
||||||
print("Position: ", msg.position)
|
print("Position: ", msg.position)
|
||||||
print("Velocity: ", msg.velocity)
|
print("Velocity: ", msg.velocity)
|
||||||
print("Yaw velocity: ", msg.yaw_speed)
|
print("Yaw velocity: ", msg.yaw_speed)
|
||||||
print("Foot position in body frame: ", msg.foot_position_body)
|
print("Foot position in body frame: ", msg.foot_position_body)
|
||||||
print("Foot velocity in body frame: ", msg.foot_speed_body)
|
print("Foot velocity in body frame: ", msg.foot_speed_body)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
ChannelFactoryInitialize(0, "enp3s0")
|
ChannelFactoryInitialize(0, "enp3s0")
|
||||||
sub = ChannelSubscriber("rt/sportmodestate", SportModeState_)
|
sub = ChannelSubscriber("rt/sportmodestate", SportModeState_)
|
||||||
sub.Init(HighStateHandler, 10)
|
sub.Init(HighStateHandler, 10)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(10.0)
|
time.sleep(10.0)
|
||||||
|
|
|
@ -1,144 +1,144 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.idl.default import unitree_go_msg_dds__SportModeState_
|
from unitree_sdk2py.idl.default import unitree_go_msg_dds__SportModeState_
|
||||||
from unitree_sdk2py.idl.unitree_go.msg.dds_ import SportModeState_
|
from unitree_sdk2py.idl.unitree_go.msg.dds_ import SportModeState_
|
||||||
from unitree_sdk2py.go2.sport.sport_client import (
|
from unitree_sdk2py.go2.sport.sport_client import (
|
||||||
SportClient,
|
SportClient,
|
||||||
PathPoint,
|
PathPoint,
|
||||||
SPORT_PATH_POINT_SIZE,
|
SPORT_PATH_POINT_SIZE,
|
||||||
)
|
)
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
|
||||||
class SportModeTest:
|
class SportModeTest:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
# Time count
|
# Time count
|
||||||
self.t = 0
|
self.t = 0
|
||||||
self.dt = 0.01
|
self.dt = 0.01
|
||||||
|
|
||||||
# Initial poition and yaw
|
# Initial poition and yaw
|
||||||
self.px0 = 0
|
self.px0 = 0
|
||||||
self.py0 = 0
|
self.py0 = 0
|
||||||
self.yaw0 = 0
|
self.yaw0 = 0
|
||||||
|
|
||||||
self.client = SportClient() # Create a sport client
|
self.client = SportClient() # Create a sport client
|
||||||
self.client.SetTimeout(10.0)
|
self.client.SetTimeout(10.0)
|
||||||
self.client.Init()
|
self.client.Init()
|
||||||
|
|
||||||
def GetInitState(self, robot_state: SportModeState_):
|
def GetInitState(self, robot_state: SportModeState_):
|
||||||
self.px0 = robot_state.position[0]
|
self.px0 = robot_state.position[0]
|
||||||
self.py0 = robot_state.position[1]
|
self.py0 = robot_state.position[1]
|
||||||
self.yaw0 = robot_state.imu_state.rpy[2]
|
self.yaw0 = robot_state.imu_state.rpy[2]
|
||||||
|
|
||||||
def StandUpDown(self):
|
def StandUpDown(self):
|
||||||
self.client.StandDown()
|
self.client.StandDown()
|
||||||
print("Stand down !!!")
|
print("Stand down !!!")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self.client.StandUp()
|
self.client.StandUp()
|
||||||
print("Stand up !!!")
|
print("Stand up !!!")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self.client.StandDown()
|
self.client.StandDown()
|
||||||
print("Stand down !!!")
|
print("Stand down !!!")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self.client.Damp()
|
self.client.Damp()
|
||||||
|
|
||||||
def VelocityMove(self):
|
def VelocityMove(self):
|
||||||
elapsed_time = 1
|
elapsed_time = 1
|
||||||
for i in range(int(elapsed_time / self.dt)):
|
for i in range(int(elapsed_time / self.dt)):
|
||||||
self.client.Move(0.3, 0, 0.3) # vx, vy vyaw
|
self.client.Move(0.3, 0, 0.3) # vx, vy vyaw
|
||||||
time.sleep(self.dt)
|
time.sleep(self.dt)
|
||||||
self.client.StopMove()
|
self.client.StopMove()
|
||||||
|
|
||||||
def BalanceAttitude(self):
|
def BalanceAttitude(self):
|
||||||
self.client.Euler(0.1, 0.2, 0.3) # roll, pitch, yaw
|
self.client.Euler(0.1, 0.2, 0.3) # roll, pitch, yaw
|
||||||
self.client.BalanceStand()
|
self.client.BalanceStand()
|
||||||
|
|
||||||
def TrajectoryFollow(self):
|
def TrajectoryFollow(self):
|
||||||
time_seg = 0.2
|
time_seg = 0.2
|
||||||
time_temp = self.t - time_seg
|
time_temp = self.t - time_seg
|
||||||
path = []
|
path = []
|
||||||
for i in range(SPORT_PATH_POINT_SIZE):
|
for i in range(SPORT_PATH_POINT_SIZE):
|
||||||
time_temp += time_seg
|
time_temp += time_seg
|
||||||
|
|
||||||
px_local = 0.5 * math.sin(0.5 * time_temp)
|
px_local = 0.5 * math.sin(0.5 * time_temp)
|
||||||
py_local = 0
|
py_local = 0
|
||||||
yaw_local = 0
|
yaw_local = 0
|
||||||
vx_local = 0.25 * math.cos(0.5 * time_temp)
|
vx_local = 0.25 * math.cos(0.5 * time_temp)
|
||||||
vy_local = 0
|
vy_local = 0
|
||||||
vyaw_local = 0
|
vyaw_local = 0
|
||||||
|
|
||||||
path_point_tmp = PathPoint(0, 0, 0, 0, 0, 0, 0)
|
path_point_tmp = PathPoint(0, 0, 0, 0, 0, 0, 0)
|
||||||
|
|
||||||
path_point_tmp.timeFromStart = i * time_seg
|
path_point_tmp.timeFromStart = i * time_seg
|
||||||
path_point_tmp.x = (
|
path_point_tmp.x = (
|
||||||
px_local * math.cos(self.yaw0)
|
px_local * math.cos(self.yaw0)
|
||||||
- py_local * math.sin(self.yaw0)
|
- py_local * math.sin(self.yaw0)
|
||||||
+ self.px0
|
+ self.px0
|
||||||
)
|
)
|
||||||
path_point_tmp.y = (
|
path_point_tmp.y = (
|
||||||
px_local * math.sin(self.yaw0)
|
px_local * math.sin(self.yaw0)
|
||||||
+ py_local * math.cos(self.yaw0)
|
+ py_local * math.cos(self.yaw0)
|
||||||
+ self.py0
|
+ self.py0
|
||||||
)
|
)
|
||||||
path_point_tmp.yaw = yaw_local + self.yaw0
|
path_point_tmp.yaw = yaw_local + self.yaw0
|
||||||
path_point_tmp.vx = vx_local * math.cos(self.yaw0) - vy_local * math.sin(
|
path_point_tmp.vx = vx_local * math.cos(self.yaw0) - vy_local * math.sin(
|
||||||
self.yaw0
|
self.yaw0
|
||||||
)
|
)
|
||||||
path_point_tmp.vy = vx_local * math.sin(self.yaw0) + vy_local * math.cos(
|
path_point_tmp.vy = vx_local * math.sin(self.yaw0) + vy_local * math.cos(
|
||||||
self.yaw0
|
self.yaw0
|
||||||
)
|
)
|
||||||
path_point_tmp.vyaw = vyaw_local
|
path_point_tmp.vyaw = vyaw_local
|
||||||
|
|
||||||
path.append(path_point_tmp)
|
path.append(path_point_tmp)
|
||||||
|
|
||||||
self.client.TrajectoryFollow(path)
|
self.client.TrajectoryFollow(path)
|
||||||
|
|
||||||
def SpecialMotions(self):
|
def SpecialMotions(self):
|
||||||
self.client.RecoveryStand()
|
self.client.RecoveryStand()
|
||||||
print("RecoveryStand !!!")
|
print("RecoveryStand !!!")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self.client.Stretch()
|
self.client.Stretch()
|
||||||
print("Sit !!!")
|
print("Sit !!!")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self.client.RecoveryStand()
|
self.client.RecoveryStand()
|
||||||
print("RecoveryStand !!!")
|
print("RecoveryStand !!!")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
# Robot state
|
# Robot state
|
||||||
robot_state = unitree_go_msg_dds__SportModeState_()
|
robot_state = unitree_go_msg_dds__SportModeState_()
|
||||||
def HighStateHandler(msg: SportModeState_):
|
def HighStateHandler(msg: SportModeState_):
|
||||||
global robot_state
|
global robot_state
|
||||||
robot_state = msg
|
robot_state = msg
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
|
|
||||||
sub = ChannelSubscriber("rt/sportmodestate", SportModeState_)
|
sub = ChannelSubscriber("rt/sportmodestate", SportModeState_)
|
||||||
sub.Init(HighStateHandler, 10)
|
sub.Init(HighStateHandler, 10)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
test = SportModeTest()
|
test = SportModeTest()
|
||||||
test.GetInitState(robot_state)
|
test.GetInitState(robot_state)
|
||||||
|
|
||||||
print("Start test !!!")
|
print("Start test !!!")
|
||||||
while True:
|
while True:
|
||||||
test.t += test.dt
|
test.t += test.dt
|
||||||
|
|
||||||
test.StandUpDown()
|
test.StandUpDown()
|
||||||
# test.VelocityMove()
|
# test.VelocityMove()
|
||||||
# test.BalanceAttitude()
|
# test.BalanceAttitude()
|
||||||
# test.TrajectoryFollow()
|
# test.TrajectoryFollow()
|
||||||
# test.SpecialMotions()
|
# test.SpecialMotions()
|
||||||
|
|
||||||
time.sleep(test.dt)
|
time.sleep(test.dt)
|
||||||
|
|
|
@ -1,60 +1,60 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from unitree_sdk2py.core.channel import ChannelPublisher, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelPublisher, ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowCmd_
|
from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowCmd_
|
||||||
from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowCmd_
|
from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowCmd_
|
||||||
from unitree_sdk2py.utils.crc import CRC
|
from unitree_sdk2py.utils.crc import CRC
|
||||||
from unitree_sdk2py.utils.thread import Thread
|
from unitree_sdk2py.utils.thread import Thread
|
||||||
import unitree_legged_const as go2
|
import unitree_legged_const as go2
|
||||||
|
|
||||||
crc = CRC()
|
crc = CRC()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
# Create a publisher to publish the data defined in UserData class
|
# Create a publisher to publish the data defined in UserData class
|
||||||
pub = ChannelPublisher("rt/lowcmd", LowCmd_)
|
pub = ChannelPublisher("rt/lowcmd", LowCmd_)
|
||||||
pub.Init()
|
pub.Init()
|
||||||
|
|
||||||
cmd = unitree_go_msg_dds__LowCmd_()
|
cmd = unitree_go_msg_dds__LowCmd_()
|
||||||
cmd.head[0]=0xFE
|
cmd.head[0]=0xFE
|
||||||
cmd.head[1]=0xEF
|
cmd.head[1]=0xEF
|
||||||
cmd.level_flag = 0xFF
|
cmd.level_flag = 0xFF
|
||||||
cmd.gpio = 0
|
cmd.gpio = 0
|
||||||
for i in range(20):
|
for i in range(20):
|
||||||
cmd.motor_cmd[i].mode = 0x01 # (PMSM) mode
|
cmd.motor_cmd[i].mode = 0x01 # (PMSM) mode
|
||||||
cmd.motor_cmd[i].q= go2.PosStopF
|
cmd.motor_cmd[i].q= go2.PosStopF
|
||||||
cmd.motor_cmd[i].kp = 0
|
cmd.motor_cmd[i].kp = 0
|
||||||
cmd.motor_cmd[i].dq = go2.VelStopF
|
cmd.motor_cmd[i].dq = go2.VelStopF
|
||||||
cmd.motor_cmd[i].kd = 0
|
cmd.motor_cmd[i].kd = 0
|
||||||
cmd.motor_cmd[i].tau = 0
|
cmd.motor_cmd[i].tau = 0
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# Toque controle, set RL_2 toque
|
# Toque controle, set RL_2 toque
|
||||||
cmd.motor_cmd[go2.LegID["RL_2"]].q = 0.0 # Set to stop position(rad)
|
cmd.motor_cmd[go2.LegID["RL_2"]].q = 0.0 # Set to stop position(rad)
|
||||||
cmd.motor_cmd[go2.LegID["RL_2"]].kp = 0.0
|
cmd.motor_cmd[go2.LegID["RL_2"]].kp = 0.0
|
||||||
cmd.motor_cmd[go2.LegID["RL_2"]].dq = 0.0 # Set to stop angular velocity(rad/s)
|
cmd.motor_cmd[go2.LegID["RL_2"]].dq = 0.0 # Set to stop angular velocity(rad/s)
|
||||||
cmd.motor_cmd[go2.LegID["RL_2"]].kd = 0.0
|
cmd.motor_cmd[go2.LegID["RL_2"]].kd = 0.0
|
||||||
cmd.motor_cmd[go2.LegID["RL_2"]].tau = 1.0 # target toque is set to 1N.m
|
cmd.motor_cmd[go2.LegID["RL_2"]].tau = 1.0 # target toque is set to 1N.m
|
||||||
|
|
||||||
# Poinstion(rad) control, set RL_0 rad
|
# Poinstion(rad) control, set RL_0 rad
|
||||||
cmd.motor_cmd[go2.LegID["RL_0"]].q = 0.0 # Taregt angular(rad)
|
cmd.motor_cmd[go2.LegID["RL_0"]].q = 0.0 # Taregt angular(rad)
|
||||||
cmd.motor_cmd[go2.LegID["RL_0"]].kp = 10.0 # Poinstion(rad) control kp gain
|
cmd.motor_cmd[go2.LegID["RL_0"]].kp = 10.0 # Poinstion(rad) control kp gain
|
||||||
cmd.motor_cmd[go2.LegID["RL_0"]].dq = 0.0 # Taregt angular velocity(rad/ss)
|
cmd.motor_cmd[go2.LegID["RL_0"]].dq = 0.0 # Taregt angular velocity(rad/ss)
|
||||||
cmd.motor_cmd[go2.LegID["RL_0"]].kd = 1.0 # Poinstion(rad) control kd gain
|
cmd.motor_cmd[go2.LegID["RL_0"]].kd = 1.0 # Poinstion(rad) control kd gain
|
||||||
cmd.motor_cmd[go2.LegID["RL_0"]].tau = 0.0 # Feedforward toque 1N.m
|
cmd.motor_cmd[go2.LegID["RL_0"]].tau = 0.0 # Feedforward toque 1N.m
|
||||||
|
|
||||||
cmd.crc = crc.Crc(cmd)
|
cmd.crc = crc.Crc(cmd)
|
||||||
|
|
||||||
#Publish message
|
#Publish message
|
||||||
if pub.Write(cmd):
|
if pub.Write(cmd):
|
||||||
print("Publish success. msg:", cmd.crc)
|
print("Publish success. msg:", cmd.crc)
|
||||||
else:
|
else:
|
||||||
print("Waitting for subscriber.")
|
print("Waitting for subscriber.")
|
||||||
|
|
||||||
time.sleep(0.002)
|
time.sleep(0.002)
|
|
@ -1,27 +1,27 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowState_
|
from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowState_
|
||||||
from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowState_
|
from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowState_
|
||||||
|
|
||||||
import unitree_legged_const as go2
|
import unitree_legged_const as go2
|
||||||
|
|
||||||
|
|
||||||
def LowStateHandler(msg: LowState_):
|
def LowStateHandler(msg: LowState_):
|
||||||
|
|
||||||
# print front right hip motor states
|
# print front right hip motor states
|
||||||
print("FR_0 motor state: ", msg.motor_state[go2.LegID["FR_0"]])
|
print("FR_0 motor state: ", msg.motor_state[go2.LegID["FR_0"]])
|
||||||
print("IMU state: ", msg.imu_state)
|
print("IMU state: ", msg.imu_state)
|
||||||
print("Battery state: voltage: ", msg.power_v, "current: ", msg.power_a)
|
print("Battery state: voltage: ", msg.power_v, "current: ", msg.power_a)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
sub = ChannelSubscriber("rt/lowstate", LowState_)
|
sub = ChannelSubscriber("rt/lowstate", LowState_)
|
||||||
sub.Init(LowStateHandler, 10)
|
sub.Init(LowStateHandler, 10)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(10.0)
|
time.sleep(10.0)
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
LegID = {
|
LegID = {
|
||||||
"FR_0": 0, # Front right hip
|
"FR_0": 0, # Front right hip
|
||||||
"FR_1": 1, # Front right thigh
|
"FR_1": 1, # Front right thigh
|
||||||
"FR_2": 2, # Front right calf
|
"FR_2": 2, # Front right calf
|
||||||
"FL_0": 3,
|
"FL_0": 3,
|
||||||
"FL_1": 4,
|
"FL_1": 4,
|
||||||
"FL_2": 5,
|
"FL_2": 5,
|
||||||
"RR_0": 6,
|
"RR_0": 6,
|
||||||
"RR_1": 7,
|
"RR_1": 7,
|
||||||
"RR_2": 8,
|
"RR_2": 8,
|
||||||
"RL_0": 9,
|
"RL_0": 9,
|
||||||
"RL_1": 10,
|
"RL_1": 10,
|
||||||
"RL_2": 11,
|
"RL_2": 11,
|
||||||
}
|
}
|
||||||
|
|
||||||
HIGHLEVEL = 0xEE
|
HIGHLEVEL = 0xEE
|
||||||
LOWLEVEL = 0xFF
|
LOWLEVEL = 0xFF
|
||||||
TRIGERLEVEL = 0xF0
|
TRIGERLEVEL = 0xF0
|
||||||
PosStopF = 2.146e9
|
PosStopF = 2.146e9
|
||||||
VelStopF = 16000.0
|
VelStopF = 16000.0
|
||||||
|
|
|
@ -1,94 +1,94 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.go2.obstacles_avoid.obstacles_avoid_client import ObstaclesAvoidClient
|
from unitree_sdk2py.go2.obstacles_avoid.obstacles_avoid_client import ObstaclesAvoidClient
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
|
|
||||||
client = ObstaclesAvoidClient()
|
client = ObstaclesAvoidClient()
|
||||||
client.SetTimeout(3.0)
|
client.SetTimeout(3.0)
|
||||||
client.Init()
|
client.Init()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
print("##################GetServerApiVersion###################")
|
print("##################GetServerApiVersion###################")
|
||||||
code, serverAPiVersion = client.GetServerApiVersion()
|
code, serverAPiVersion = client.GetServerApiVersion()
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("get server api error. code:", code)
|
print("get server api error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("get server api version:", serverAPiVersion)
|
print("get server api version:", serverAPiVersion)
|
||||||
|
|
||||||
if serverAPiVersion != client.GetApiVersion():
|
if serverAPiVersion != client.GetApiVersion():
|
||||||
print("api version not equal.")
|
print("api version not equal.")
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
print("##################SwitchGet###################")
|
print("##################SwitchGet###################")
|
||||||
code, enable = client.SwitchGet()
|
code, enable = client.SwitchGet()
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch get error. code:", code)
|
print("switch get error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch get success. enable:", enable)
|
print("switch get success. enable:", enable)
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
print("##################SwitchSet (on)###################")
|
print("##################SwitchSet (on)###################")
|
||||||
code = client.SwitchSet(True)
|
code = client.SwitchSet(True)
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch set error. code:", code)
|
print("switch set error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch set success.")
|
print("switch set success.")
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
print("##################SwitchGet###################")
|
print("##################SwitchGet###################")
|
||||||
code, enable1 = client.SwitchGet()
|
code, enable1 = client.SwitchGet()
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch get error. code:", code)
|
print("switch get error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch get success. enable:", enable1)
|
print("switch get success. enable:", enable1)
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
print("##################SwitchSet (off)###################")
|
print("##################SwitchSet (off)###################")
|
||||||
code = client.SwitchSet(False)
|
code = client.SwitchSet(False)
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch set error. code:", code)
|
print("switch set error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch set success.")
|
print("switch set success.")
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
print("##################SwitchGet###################")
|
print("##################SwitchGet###################")
|
||||||
code, enable1 = client.SwitchGet()
|
code, enable1 = client.SwitchGet()
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch get error. code:", code)
|
print("switch get error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch get success. enable:", enable1)
|
print("switch get success. enable:", enable1)
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
|
|
||||||
print("##################SwitchSet (enable)###################")
|
print("##################SwitchSet (enable)###################")
|
||||||
|
|
||||||
code = client.SwitchSet(enable)
|
code = client.SwitchSet(enable)
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch set error. code:", code)
|
print("switch set error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch set success. enable:", enable)
|
print("switch set success. enable:", enable)
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
print("##################SwitchGet###################")
|
print("##################SwitchGet###################")
|
||||||
code, enable = client.SwitchGet()
|
code, enable = client.SwitchGet()
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("switch get error. code:", code)
|
print("switch get error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("switch get success. enable:", enable)
|
print("switch get success. enable:", enable)
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
|
@ -1,77 +1,77 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelFactoryInitialize
|
||||||
from unitree_sdk2py.go2.vui.vui_client import VuiClient
|
from unitree_sdk2py.go2.vui.vui_client import VuiClient
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
|
|
||||||
client = VuiClient()
|
client = VuiClient()
|
||||||
client.SetTimeout(3.0)
|
client.SetTimeout(3.0)
|
||||||
client.Init()
|
client.Init()
|
||||||
|
|
||||||
for i in range(1, 11):
|
for i in range(1, 11):
|
||||||
print("#################GetBrightness####################")
|
print("#################GetBrightness####################")
|
||||||
code, level = client.GetBrightness()
|
code, level = client.GetBrightness()
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("get brightness error. code:", code)
|
print("get brightness error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("get brightness success. level:", level)
|
print("get brightness success. level:", level)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
print("#################SetBrightness####################")
|
print("#################SetBrightness####################")
|
||||||
|
|
||||||
code = client.SetBrightness(i)
|
code = client.SetBrightness(i)
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("set brightness error. code:", code)
|
print("set brightness error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("set brightness success. level:", i)
|
print("set brightness success. level:", i)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
print("#################SetBrightness 0####################")
|
print("#################SetBrightness 0####################")
|
||||||
|
|
||||||
code = client.SetBrightness(0)
|
code = client.SetBrightness(0)
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("set brightness error. code:", code)
|
print("set brightness error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("set brightness 0 success.")
|
print("set brightness 0 success.")
|
||||||
|
|
||||||
for i in range(1, 11):
|
for i in range(1, 11):
|
||||||
print("#################GetVolume####################")
|
print("#################GetVolume####################")
|
||||||
code, level = client.GetVolume()
|
code, level = client.GetVolume()
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("get volume error. code:", code)
|
print("get volume error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("get volume success. level:", level)
|
print("get volume success. level:", level)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
print("#################SetVolume####################")
|
print("#################SetVolume####################")
|
||||||
|
|
||||||
code = client.SetVolume(i)
|
code = client.SetVolume(i)
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("set volume error. code:", code)
|
print("set volume error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("set volume success. level:", i)
|
print("set volume success. level:", i)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
print("#################SetVolume 0####################")
|
print("#################SetVolume 0####################")
|
||||||
|
|
||||||
code = client.SetVolume(0)
|
code = client.SetVolume(0)
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print("set volume error. code:", code)
|
print("set volume error. code:", code)
|
||||||
else:
|
else:
|
||||||
print("set volume 0 success.")
|
print("set volume 0 success.")
|
||||||
|
|
|
@ -1,55 +1,55 @@
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize
|
||||||
|
|
||||||
from unitree_sdk2py.idl.default import unitree_go_msg_dds__WirelessController_
|
from unitree_sdk2py.idl.default import unitree_go_msg_dds__WirelessController_
|
||||||
from unitree_sdk2py.idl.unitree_go.msg.dds_ import WirelessController_
|
from unitree_sdk2py.idl.unitree_go.msg.dds_ import WirelessController_
|
||||||
|
|
||||||
|
|
||||||
key_state = [
|
key_state = [
|
||||||
["R1", 0],
|
["R1", 0],
|
||||||
["L1", 0],
|
["L1", 0],
|
||||||
["start", 0],
|
["start", 0],
|
||||||
["select", 0],
|
["select", 0],
|
||||||
["R2", 0],
|
["R2", 0],
|
||||||
["L2", 0],
|
["L2", 0],
|
||||||
["F1", 0],
|
["F1", 0],
|
||||||
["F2", 0],
|
["F2", 0],
|
||||||
["A", 0],
|
["A", 0],
|
||||||
["B", 0],
|
["B", 0],
|
||||||
["X", 0],
|
["X", 0],
|
||||||
["Y", 0],
|
["Y", 0],
|
||||||
["up", 0],
|
["up", 0],
|
||||||
["right", 0],
|
["right", 0],
|
||||||
["down", 0],
|
["down", 0],
|
||||||
["left", 0],
|
["left", 0],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def WirelessControllerHandler(msg: WirelessController_):
|
def WirelessControllerHandler(msg: WirelessController_):
|
||||||
global key_state
|
global key_state
|
||||||
print("lx: ", msg.lx)
|
print("lx: ", msg.lx)
|
||||||
print("lx: ", msg.ly)
|
print("lx: ", msg.ly)
|
||||||
print("lx: ", msg.rx)
|
print("lx: ", msg.rx)
|
||||||
print("lx: ", msg.ry)
|
print("lx: ", msg.ry)
|
||||||
print("keys: ", msg.keys)
|
print("keys: ", msg.keys)
|
||||||
|
|
||||||
#Update key state
|
#Update key state
|
||||||
for i in range(16):
|
for i in range(16):
|
||||||
key_state[i][1] = (msg.keys & (1 << i)) >> i
|
key_state[i][1] = (msg.keys & (1 << i)) >> i
|
||||||
|
|
||||||
print(key_state)
|
print(key_state)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv)>1:
|
if len(sys.argv)>1:
|
||||||
ChannelFactoryInitialize(0, sys.argv[1])
|
ChannelFactoryInitialize(0, sys.argv[1])
|
||||||
else:
|
else:
|
||||||
ChannelFactoryInitialize(0)
|
ChannelFactoryInitialize(0)
|
||||||
|
|
||||||
sub = ChannelSubscriber("rt/wirelesscontroller", WirelessController_)
|
sub = ChannelSubscriber("rt/wirelesscontroller", WirelessController_)
|
||||||
sub.Init(WirelessControllerHandler, 10)
|
sub.Init(WirelessControllerHandler, 10)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(10.0)
|
time.sleep(10.0)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
numpy
|
numpy
|
||||||
opencv-python
|
opencv-python
|
||||||
cyclonedds==0.10.2
|
cyclonedds==0.10.2
|
38
setup.py
38
setup.py
|
@ -1,20 +1,20 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
||||||
def load_requirements(filename:str='requirements.txt') -> None:
|
def load_requirements(filename:str='requirements.txt') -> None:
|
||||||
with open(filename, 'r') as file:
|
with open(filename, 'r') as file:
|
||||||
return [line.strip() for line in file if line and not line.startswith("#")]
|
return [line.strip() for line in file if line and not line.startswith("#")]
|
||||||
|
|
||||||
requirements = load_requirements()
|
requirements = load_requirements()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='unitree_sdk2py',
|
name='unitree_sdk2py',
|
||||||
version='1.0.0',
|
version='1.0.0',
|
||||||
author='Unitree',
|
author='Unitree',
|
||||||
author_email='unitree@unitree.com',
|
author_email='unitree@unitree.com',
|
||||||
license="BSD-3-Clause",
|
license="BSD-3-Clause",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
description='Unitree robot sdk version 2 for python',
|
description='Unitree robot sdk version 2 for python',
|
||||||
python_requires='>=3.8,<3.11',
|
python_requires='>=3.8,<3.11',
|
||||||
install_requires=requirements
|
install_requires=requirements
|
||||||
)
|
)
|
|
@ -1,9 +1,9 @@
|
||||||
from . import idl, utils, core, rpc, go2
|
from . import idl, utils, core, rpc, go2
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"idl",
|
"idl",
|
||||||
"utils",
|
"utils",
|
||||||
"core",
|
"core",
|
||||||
"rpc",
|
"rpc",
|
||||||
"go2",
|
"go2",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,290 +1,290 @@
|
||||||
import time
|
import time
|
||||||
from typing import Any, Callable
|
from typing import Any, Callable
|
||||||
from threading import Thread, Event
|
from threading import Thread, Event
|
||||||
|
|
||||||
from cyclonedds.domain import Domain, DomainParticipant
|
from cyclonedds.domain import Domain, DomainParticipant
|
||||||
from cyclonedds.internal import dds_c_t
|
from cyclonedds.internal import dds_c_t
|
||||||
from cyclonedds.pub import DataWriter
|
from cyclonedds.pub import DataWriter
|
||||||
from cyclonedds.sub import DataReader
|
from cyclonedds.sub import DataReader
|
||||||
from cyclonedds.topic import Topic
|
from cyclonedds.topic import Topic
|
||||||
from cyclonedds.qos import Qos
|
from cyclonedds.qos import Qos
|
||||||
from cyclonedds.core import DDSException, Listener
|
from cyclonedds.core import DDSException, Listener
|
||||||
from cyclonedds.util import duration
|
from cyclonedds.util import duration
|
||||||
from cyclonedds.internal import dds_c_t, InvalidSample
|
from cyclonedds.internal import dds_c_t, InvalidSample
|
||||||
|
|
||||||
# for channel config
|
# for channel config
|
||||||
from .channel_config import ChannelConfigAutoDetermine, ChannelConfigHasInterface
|
from .channel_config import ChannelConfigAutoDetermine, ChannelConfigHasInterface
|
||||||
|
|
||||||
# for singleton
|
# for singleton
|
||||||
from ..utils.singleton import Singleton
|
from ..utils.singleton import Singleton
|
||||||
from ..utils.bqueue import BQueue
|
from ..utils.bqueue import BQueue
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class ChannelReader
|
" class ChannelReader
|
||||||
"""
|
"""
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class Channel
|
" class Channel
|
||||||
"""
|
"""
|
||||||
class Channel:
|
class Channel:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" internal class __Reader
|
" internal class __Reader
|
||||||
"""
|
"""
|
||||||
class __Reader:
|
class __Reader:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__reader = None
|
self.__reader = None
|
||||||
self.__handler = None
|
self.__handler = None
|
||||||
self.__queue = None
|
self.__queue = None
|
||||||
self.__queueEnable = False
|
self.__queueEnable = False
|
||||||
self.__threadEvent = None
|
self.__threadEvent = None
|
||||||
self.__threadReader = None
|
self.__threadReader = None
|
||||||
|
|
||||||
def Init(self, participant: DomainParticipant, topic: Topic, qos: Qos = None, handler: Callable = None, queueLen: int = 0):
|
def Init(self, participant: DomainParticipant, topic: Topic, qos: Qos = None, handler: Callable = None, queueLen: int = 0):
|
||||||
if handler is None:
|
if handler is None:
|
||||||
self.__reader = DataReader(participant, topic, qos)
|
self.__reader = DataReader(participant, topic, qos)
|
||||||
else:
|
else:
|
||||||
self.__handler = handler
|
self.__handler = handler
|
||||||
if queueLen > 0:
|
if queueLen > 0:
|
||||||
self.__queueEnable = True
|
self.__queueEnable = True
|
||||||
self.__queue = BQueue(queueLen)
|
self.__queue = BQueue(queueLen)
|
||||||
self.__threadEvent = Event()
|
self.__threadEvent = Event()
|
||||||
self.__threadReader = Thread(target=self.__ChannelReaderThreadFunc, name="ch_reader", daemon=True)
|
self.__threadReader = Thread(target=self.__ChannelReaderThreadFunc, name="ch_reader", daemon=True)
|
||||||
self.__threadReader.start()
|
self.__threadReader.start()
|
||||||
self.__reader = DataReader(participant, topic, qos, Listener(on_data_available=self.__OnDataAvailable))
|
self.__reader = DataReader(participant, topic, qos, Listener(on_data_available=self.__OnDataAvailable))
|
||||||
|
|
||||||
def Read(self, timeout: float = None):
|
def Read(self, timeout: float = None):
|
||||||
sample = None
|
sample = None
|
||||||
try:
|
try:
|
||||||
if timeout is None:
|
if timeout is None:
|
||||||
sample = self.__reader.take_one()
|
sample = self.__reader.take_one()
|
||||||
else:
|
else:
|
||||||
sample = self.__reader.take_one(timeout=duration(seconds=timeout))
|
sample = self.__reader.take_one(timeout=duration(seconds=timeout))
|
||||||
except DDSException as e:
|
except DDSException as e:
|
||||||
print("[Reader] catch DDSException msg:", e.msg)
|
print("[Reader] catch DDSException msg:", e.msg)
|
||||||
except TimeoutError as e:
|
except TimeoutError as e:
|
||||||
print("[Reader] take sample timeout")
|
print("[Reader] take sample timeout")
|
||||||
except:
|
except:
|
||||||
print("[Reader] take sample error")
|
print("[Reader] take sample error")
|
||||||
|
|
||||||
return sample
|
return sample
|
||||||
|
|
||||||
def Close(self):
|
def Close(self):
|
||||||
if self.__reader is not None:
|
if self.__reader is not None:
|
||||||
del self.__reader
|
del self.__reader
|
||||||
|
|
||||||
if self.__queueEnable:
|
if self.__queueEnable:
|
||||||
self.__threadEvent.set()
|
self.__threadEvent.set()
|
||||||
self.__queue.Interrupt()
|
self.__queue.Interrupt()
|
||||||
self.__queue.Clear()
|
self.__queue.Clear()
|
||||||
self.__threadReader.join()
|
self.__threadReader.join()
|
||||||
|
|
||||||
def __OnDataAvailable(self, reader: DataReader):
|
def __OnDataAvailable(self, reader: DataReader):
|
||||||
samples = []
|
samples = []
|
||||||
try:
|
try:
|
||||||
samples = reader.take(1)
|
samples = reader.take(1)
|
||||||
except DDSException as e:
|
except DDSException as e:
|
||||||
print("[Reader] catch DDSException error. msg:", e.msg)
|
print("[Reader] catch DDSException error. msg:", e.msg)
|
||||||
return
|
return
|
||||||
except TimeoutError as e:
|
except TimeoutError as e:
|
||||||
print("[Reader] take sample timeout")
|
print("[Reader] take sample timeout")
|
||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
print("[Reader] take sample error")
|
print("[Reader] take sample error")
|
||||||
return
|
return
|
||||||
|
|
||||||
if samples is None:
|
if samples is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
# check invalid sample
|
# check invalid sample
|
||||||
sample = samples[0]
|
sample = samples[0]
|
||||||
if isinstance(sample, InvalidSample):
|
if isinstance(sample, InvalidSample):
|
||||||
return
|
return
|
||||||
|
|
||||||
# do sample
|
# do sample
|
||||||
if self.__queueEnable:
|
if self.__queueEnable:
|
||||||
self.__queue.Put(sample)
|
self.__queue.Put(sample)
|
||||||
else:
|
else:
|
||||||
self.__handler(sample)
|
self.__handler(sample)
|
||||||
|
|
||||||
def __ChannelReaderThreadFunc(self):
|
def __ChannelReaderThreadFunc(self):
|
||||||
while not self.__threadEvent.is_set():
|
while not self.__threadEvent.is_set():
|
||||||
sample = self.__queue.Get()
|
sample = self.__queue.Get()
|
||||||
if sample is not None:
|
if sample is not None:
|
||||||
self.__handler(sample)
|
self.__handler(sample)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" internal class __Writer
|
" internal class __Writer
|
||||||
"""
|
"""
|
||||||
class __Writer:
|
class __Writer:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__writer = None
|
self.__writer = None
|
||||||
self.__publication_matched_count = 0
|
self.__publication_matched_count = 0
|
||||||
|
|
||||||
def Init(self, participant: DomainParticipant, topic: Topic, qos: Qos = None):
|
def Init(self, participant: DomainParticipant, topic: Topic, qos: Qos = None):
|
||||||
self.__writer = DataWriter(participant, topic, qos, Listener(on_publication_matched=self.__OnPublicationMatched))
|
self.__writer = DataWriter(participant, topic, qos, Listener(on_publication_matched=self.__OnPublicationMatched))
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
|
|
||||||
def Write(self, sample: Any, timeout: float = None):
|
def Write(self, sample: Any, timeout: float = None):
|
||||||
waitsec = 0.0 if timeout is None else timeout
|
waitsec = 0.0 if timeout is None else timeout
|
||||||
|
|
||||||
# check publication_matched_count
|
# check publication_matched_count
|
||||||
while waitsec > 0.0 and self.__publication_matched_count == 0:
|
while waitsec > 0.0 and self.__publication_matched_count == 0:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
waitsec = waitsec - 0.1
|
waitsec = waitsec - 0.1
|
||||||
# print(time.time())
|
# print(time.time())
|
||||||
|
|
||||||
# check waitsec
|
# check waitsec
|
||||||
if timeout is not None and waitsec <= 0.0:
|
if timeout is not None and waitsec <= 0.0:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.__writer.write(sample)
|
self.__writer.write(sample)
|
||||||
except DDSException as e:
|
except DDSException as e:
|
||||||
print("[Writer] catch DDSException error. msg:", e.msg)
|
print("[Writer] catch DDSException error. msg:", e.msg)
|
||||||
return False
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("[Writer] write sample error. msg:", e.args())
|
print("[Writer] write sample error. msg:", e.args())
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def Close(self):
|
def Close(self):
|
||||||
if self.__writer is not None:
|
if self.__writer is not None:
|
||||||
del self.__writer
|
del self.__writer
|
||||||
|
|
||||||
def __OnPublicationMatched(self, writer: DataWriter, status: dds_c_t.publication_matched_status):
|
def __OnPublicationMatched(self, writer: DataWriter, status: dds_c_t.publication_matched_status):
|
||||||
self.__publication_matched_count = status.current_count
|
self.__publication_matched_count = status.current_count
|
||||||
|
|
||||||
|
|
||||||
# channel __init__
|
# channel __init__
|
||||||
def __init__(self, participant: DomainParticipant, name: str, type: Any, qos: Qos = None):
|
def __init__(self, participant: DomainParticipant, name: str, type: Any, qos: Qos = None):
|
||||||
self.__reader = self.__Reader()
|
self.__reader = self.__Reader()
|
||||||
self.__writer = self.__Writer()
|
self.__writer = self.__Writer()
|
||||||
self.__participant = participant
|
self.__participant = participant
|
||||||
self.__topic = Topic(self.__participant, name, type, qos)
|
self.__topic = Topic(self.__participant, name, type, qos)
|
||||||
|
|
||||||
def SetWriter(self, qos: Qos = None):
|
def SetWriter(self, qos: Qos = None):
|
||||||
self.__writer.Init(self.__participant, self.__topic, qos)
|
self.__writer.Init(self.__participant, self.__topic, qos)
|
||||||
|
|
||||||
def SetReader(self, qos: Qos = None, handler: Callable = None, queueLen: int = 0):
|
def SetReader(self, qos: Qos = None, handler: Callable = None, queueLen: int = 0):
|
||||||
self.__reader.Init(self.__participant, self.__topic, qos, handler, queueLen)
|
self.__reader.Init(self.__participant, self.__topic, qos, handler, queueLen)
|
||||||
|
|
||||||
def Write(self, sample: Any, timeout: float = None):
|
def Write(self, sample: Any, timeout: float = None):
|
||||||
return self.__writer.Write(sample, timeout)
|
return self.__writer.Write(sample, timeout)
|
||||||
|
|
||||||
def Read(self, timeout: float = None):
|
def Read(self, timeout: float = None):
|
||||||
return self.__reader.Read(timeout)
|
return self.__reader.Read(timeout)
|
||||||
|
|
||||||
def CloseReader(self):
|
def CloseReader(self):
|
||||||
self.__reader.Close()
|
self.__reader.Close()
|
||||||
|
|
||||||
def CloseWriter(self):
|
def CloseWriter(self):
|
||||||
self.__writer.Close()
|
self.__writer.Close()
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class ChannelFactory
|
" class ChannelFactory
|
||||||
"""
|
"""
|
||||||
class ChannelFactory(Singleton):
|
class ChannelFactory(Singleton):
|
||||||
__domain = None
|
__domain = None
|
||||||
__participant = None
|
__participant = None
|
||||||
__qos = None
|
__qos = None
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def Init(self, id: int, networkInterface: str = None, qos: Qos = None):
|
def Init(self, id: int, networkInterface: str = None, qos: Qos = None):
|
||||||
config = None
|
config = None
|
||||||
# choose config
|
# choose config
|
||||||
if networkInterface is None:
|
if networkInterface is None:
|
||||||
config = ChannelConfigAutoDetermine
|
config = ChannelConfigAutoDetermine
|
||||||
else:
|
else:
|
||||||
config = ChannelConfigHasInterface.replace('$__IF_NAME__$', networkInterface)
|
config = ChannelConfigHasInterface.replace('$__IF_NAME__$', networkInterface)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.__domain = Domain(id, config)
|
self.__domain = Domain(id, config)
|
||||||
except DDSException as e:
|
except DDSException as e:
|
||||||
print("[ChannelFactory] create domain error. msg:", e.msg)
|
print("[ChannelFactory] create domain error. msg:", e.msg)
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
print("[ChannelFactory] create domain error.")
|
print("[ChannelFactory] create domain error.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.__participant = DomainParticipant(id)
|
self.__participant = DomainParticipant(id)
|
||||||
except DDSException as e:
|
except DDSException as e:
|
||||||
print("[ChannelFactory] create domain participant error. msg:", e.msg)
|
print("[ChannelFactory] create domain participant error. msg:", e.msg)
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
print("[ChannelFactory] create domain participant error")
|
print("[ChannelFactory] create domain participant error")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.__qos = qos
|
self.__qos = qos
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def CreateChannel(self, name: str, type: Any):
|
def CreateChannel(self, name: str, type: Any):
|
||||||
return Channel(self.__participant, name, type, self.__qos)
|
return Channel(self.__participant, name, type, self.__qos)
|
||||||
|
|
||||||
def CreateSendChannel(self, name: str, type: Any):
|
def CreateSendChannel(self, name: str, type: Any):
|
||||||
channel = self.CreateChannel(name, type)
|
channel = self.CreateChannel(name, type)
|
||||||
channel.SetWriter(None)
|
channel.SetWriter(None)
|
||||||
return channel
|
return channel
|
||||||
|
|
||||||
def CreateRecvChannel(self, name: str, type: Any, handler: Callable = None, queueLen: int = 0):
|
def CreateRecvChannel(self, name: str, type: Any, handler: Callable = None, queueLen: int = 0):
|
||||||
channel = self.CreateChannel(name, type)
|
channel = self.CreateChannel(name, type)
|
||||||
channel.SetReader(None, handler, queueLen)
|
channel.SetReader(None, handler, queueLen)
|
||||||
return channel
|
return channel
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class ChannelPublisher
|
" class ChannelPublisher
|
||||||
"""
|
"""
|
||||||
class ChannelPublisher:
|
class ChannelPublisher:
|
||||||
def __init__(self, name: str, type: Any):
|
def __init__(self, name: str, type: Any):
|
||||||
factory = ChannelFactory()
|
factory = ChannelFactory()
|
||||||
self.__channel = factory.CreateChannel(name, type)
|
self.__channel = factory.CreateChannel(name, type)
|
||||||
self.__inited = False
|
self.__inited = False
|
||||||
|
|
||||||
def Init(self):
|
def Init(self):
|
||||||
if not self.__inited:
|
if not self.__inited:
|
||||||
self.__channel.SetWriter(None)
|
self.__channel.SetWriter(None)
|
||||||
self.__inited = True
|
self.__inited = True
|
||||||
|
|
||||||
def Close(self):
|
def Close(self):
|
||||||
self.__channel.CloseWriter()
|
self.__channel.CloseWriter()
|
||||||
self.__inited = False
|
self.__inited = False
|
||||||
|
|
||||||
def Write(self, sample: Any, timeout: float = None):
|
def Write(self, sample: Any, timeout: float = None):
|
||||||
return self.__channel.Write(sample, timeout)
|
return self.__channel.Write(sample, timeout)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class ChannelSubscriber
|
" class ChannelSubscriber
|
||||||
"""
|
"""
|
||||||
class ChannelSubscriber:
|
class ChannelSubscriber:
|
||||||
def __init__(self, name: str, type: Any):
|
def __init__(self, name: str, type: Any):
|
||||||
factory = ChannelFactory()
|
factory = ChannelFactory()
|
||||||
self.__channel = factory.CreateChannel(name, type)
|
self.__channel = factory.CreateChannel(name, type)
|
||||||
self.__inited = False
|
self.__inited = False
|
||||||
|
|
||||||
def Init(self, handler: Callable = None, queueLen: int = 0):
|
def Init(self, handler: Callable = None, queueLen: int = 0):
|
||||||
if not self.__inited:
|
if not self.__inited:
|
||||||
self.__channel.SetReader(None, handler, queueLen)
|
self.__channel.SetReader(None, handler, queueLen)
|
||||||
self.__inited = True
|
self.__inited = True
|
||||||
|
|
||||||
def Close(self):
|
def Close(self):
|
||||||
self.__channel.CloseReader()
|
self.__channel.CloseReader()
|
||||||
self.__inited = False
|
self.__inited = False
|
||||||
|
|
||||||
def Read(self, timeout: int = None):
|
def Read(self, timeout: int = None):
|
||||||
return self.__channel.Read(timeout)
|
return self.__channel.Read(timeout)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" function ChannelFactoryInitialize. used to intialize channel everenment.
|
" function ChannelFactoryInitialize. used to intialize channel everenment.
|
||||||
"""
|
"""
|
||||||
def ChannelFactoryInitialize(id: int = 0, networkInterface: str = None):
|
def ChannelFactoryInitialize(id: int = 0, networkInterface: str = None):
|
||||||
factory = ChannelFactory()
|
factory = ChannelFactory()
|
||||||
if not factory.Init(id, networkInterface):
|
if not factory.Init(id, networkInterface):
|
||||||
raise Exception("channel factory init error.")
|
raise Exception("channel factory init error.")
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
ChannelConfigHasInterface = '''<?xml version="1.0" encoding="UTF-8" ?>
|
ChannelConfigHasInterface = '''<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<CycloneDDS>
|
<CycloneDDS>
|
||||||
<Domain Id="any">
|
<Domain Id="any">
|
||||||
<General>
|
<General>
|
||||||
<Interfaces>
|
<Interfaces>
|
||||||
<NetworkInterface name="$__IF_NAME__$" priority="default" multicast="default"/>
|
<NetworkInterface name="$__IF_NAME__$" priority="default" multicast="default"/>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
</General>
|
</General>
|
||||||
<Tracing>
|
<Tracing>
|
||||||
<Verbosity>config</Verbosity>
|
<Verbosity>config</Verbosity>
|
||||||
<OutputFile>/tmp/cdds.LOG</OutputFile>
|
<OutputFile>/tmp/cdds.LOG</OutputFile>
|
||||||
</Tracing>
|
</Tracing>
|
||||||
</Domain>
|
</Domain>
|
||||||
</CycloneDDS>'''
|
</CycloneDDS>'''
|
||||||
|
|
||||||
ChannelConfigAutoDetermine = '''<?xml version="1.0" encoding="UTF-8" ?>
|
ChannelConfigAutoDetermine = '''<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<CycloneDDS>
|
<CycloneDDS>
|
||||||
<Domain Id="any">
|
<Domain Id="any">
|
||||||
<General>
|
<General>
|
||||||
<Interfaces>
|
<Interfaces>
|
||||||
<NetworkInterface autodetermine=\"true\" priority=\"default\" multicast=\"default\" />
|
<NetworkInterface autodetermine=\"true\" priority=\"default\" multicast=\"default\" />
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
</General>
|
</General>
|
||||||
</Domain>
|
</Domain>
|
||||||
</CycloneDDS>'''
|
</CycloneDDS>'''
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" Enum ChannelType
|
" Enum ChannelType
|
||||||
"""
|
"""
|
||||||
class ChannelType(Enum):
|
class ChannelType(Enum):
|
||||||
SEND = 0
|
SEND = 0
|
||||||
RECV = 1
|
RECV = 1
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" function GetClientChannelName
|
" function GetClientChannelName
|
||||||
"""
|
"""
|
||||||
def GetClientChannelName(serviceName: str, channelType: ChannelType):
|
def GetClientChannelName(serviceName: str, channelType: ChannelType):
|
||||||
name = "rt/api/" + serviceName
|
name = "rt/api/" + serviceName
|
||||||
|
|
||||||
if channelType == ChannelType.SEND:
|
if channelType == ChannelType.SEND:
|
||||||
name += "/request"
|
name += "/request"
|
||||||
else:
|
else:
|
||||||
name += "/response"
|
name += "/response"
|
||||||
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" function GetClientChannelName
|
" function GetClientChannelName
|
||||||
"""
|
"""
|
||||||
def GetServerChannelName(serviceName: str, channelType: ChannelType):
|
def GetServerChannelName(serviceName: str, channelType: ChannelType):
|
||||||
name = "rt/api/" + serviceName
|
name = "rt/api/" + serviceName
|
||||||
|
|
||||||
if channelType == ChannelType.SEND:
|
if channelType == ChannelType.SEND:
|
||||||
name += "/response"
|
name += "/response"
|
||||||
else:
|
else:
|
||||||
name += "/request"
|
name += "/request"
|
||||||
|
|
||||||
return name
|
return name
|
|
@ -1,17 +1,17 @@
|
||||||
"""
|
"""
|
||||||
" service name
|
" service name
|
||||||
"""
|
"""
|
||||||
OBSTACLES_AVOID_SERVICE_NAME = "obstacles_avoid"
|
OBSTACLES_AVOID_SERVICE_NAME = "obstacles_avoid"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" service api version
|
" service api version
|
||||||
"""
|
"""
|
||||||
OBSTACLES_AVOID_API_VERSION = "1.0.0.1"
|
OBSTACLES_AVOID_API_VERSION = "1.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" api id
|
" api id
|
||||||
"""
|
"""
|
||||||
OBSTACLES_AVOID_API_ID_SWITCH_SET = 1001
|
OBSTACLES_AVOID_API_ID_SWITCH_SET = 1001
|
||||||
OBSTACLES_AVOID_API_ID_SWITCH_GET = 1002
|
OBSTACLES_AVOID_API_ID_SWITCH_GET = 1002
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ...rpc.client import Client
|
from ...rpc.client import Client
|
||||||
from .obstacles_avoid_api import *
|
from .obstacles_avoid_api import *
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class ObstaclesAvoidClient
|
" class ObstaclesAvoidClient
|
||||||
"""
|
"""
|
||||||
class ObstaclesAvoidClient(Client):
|
class ObstaclesAvoidClient(Client):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(OBSTACLES_AVOID_SERVICE_NAME, False)
|
super().__init__(OBSTACLES_AVOID_SERVICE_NAME, False)
|
||||||
|
|
||||||
def Init(self):
|
def Init(self):
|
||||||
# set api version
|
# set api version
|
||||||
self._SetApiVerson(OBSTACLES_AVOID_API_VERSION)
|
self._SetApiVerson(OBSTACLES_AVOID_API_VERSION)
|
||||||
# regist api
|
# regist api
|
||||||
self._RegistApi(OBSTACLES_AVOID_API_ID_SWITCH_SET, 0)
|
self._RegistApi(OBSTACLES_AVOID_API_ID_SWITCH_SET, 0)
|
||||||
self._RegistApi(OBSTACLES_AVOID_API_ID_SWITCH_GET, 0)
|
self._RegistApi(OBSTACLES_AVOID_API_ID_SWITCH_GET, 0)
|
||||||
|
|
||||||
# 1001
|
# 1001
|
||||||
def SwitchSet(self, on: bool):
|
def SwitchSet(self, on: bool):
|
||||||
p = {}
|
p = {}
|
||||||
p["enable"] = on
|
p["enable"] = on
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(OBSTACLES_AVOID_API_ID_SWITCH_SET, parameter)
|
code, data = self._Call(OBSTACLES_AVOID_API_ID_SWITCH_SET, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1002
|
# 1002
|
||||||
def SwitchGet(self):
|
def SwitchGet(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(OBSTACLES_AVOID_API_ID_SWITCH_GET, parameter)
|
code, data = self._Call(OBSTACLES_AVOID_API_ID_SWITCH_GET, parameter)
|
||||||
if code == 0:
|
if code == 0:
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
return code, d["enable"]
|
return code, d["enable"]
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
|
@ -1,25 +1,25 @@
|
||||||
"""
|
"""
|
||||||
" service name
|
" service name
|
||||||
"""
|
"""
|
||||||
ROBOT_STATE_SERVICE_NAME = "robot_state"
|
ROBOT_STATE_SERVICE_NAME = "robot_state"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" service api version
|
" service api version
|
||||||
"""
|
"""
|
||||||
ROBOT_STATE_API_VERSION = "1.0.0.1"
|
ROBOT_STATE_API_VERSION = "1.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" api id
|
" api id
|
||||||
"""
|
"""
|
||||||
ROBOT_STATE_API_ID_SERVICE_SWITCH = 1001
|
ROBOT_STATE_API_ID_SERVICE_SWITCH = 1001
|
||||||
ROBOT_STATE_API_ID_REPORT_FREQ = 1002
|
ROBOT_STATE_API_ID_REPORT_FREQ = 1002
|
||||||
ROBOT_STATE_API_ID_SERVICE_LIST = 1003
|
ROBOT_STATE_API_ID_SERVICE_LIST = 1003
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" error code
|
" error code
|
||||||
"""
|
"""
|
||||||
ROBOT_STATE_ERR_SERVICE_SWITCH = 5201
|
ROBOT_STATE_ERR_SERVICE_SWITCH = 5201
|
||||||
ROBOT_STATE_ERR_SERVICE_PROTECTED = 5202
|
ROBOT_STATE_ERR_SERVICE_PROTECTED = 5202
|
||||||
|
|
|
@ -1,84 +1,84 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ...rpc.client import Client
|
from ...rpc.client import Client
|
||||||
from ...rpc.client_internal import *
|
from ...rpc.client_internal import *
|
||||||
from .robot_state_api import *
|
from .robot_state_api import *
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class ServiceState
|
" class ServiceState
|
||||||
"""
|
"""
|
||||||
class ServiceState:
|
class ServiceState:
|
||||||
def __init__(self, name: str = None, status: int = None, protect: bool = None):
|
def __init__(self, name: str = None, status: int = None, protect: bool = None):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.status = status
|
self.status = status
|
||||||
self.protect = protect
|
self.protect = protect
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class RobotStateClient
|
" class RobotStateClient
|
||||||
"""
|
"""
|
||||||
class RobotStateClient(Client):
|
class RobotStateClient(Client):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(ROBOT_STATE_SERVICE_NAME, False)
|
super().__init__(ROBOT_STATE_SERVICE_NAME, False)
|
||||||
|
|
||||||
def Init(self):
|
def Init(self):
|
||||||
# set api version
|
# set api version
|
||||||
self._SetApiVerson(ROBOT_STATE_API_VERSION)
|
self._SetApiVerson(ROBOT_STATE_API_VERSION)
|
||||||
# regist api
|
# regist api
|
||||||
self._RegistApi(ROBOT_STATE_API_ID_SERVICE_SWITCH, 0)
|
self._RegistApi(ROBOT_STATE_API_ID_SERVICE_SWITCH, 0)
|
||||||
self._RegistApi(ROBOT_STATE_API_ID_REPORT_FREQ, 0)
|
self._RegistApi(ROBOT_STATE_API_ID_REPORT_FREQ, 0)
|
||||||
self._RegistApi(ROBOT_STATE_API_ID_SERVICE_LIST, 0)
|
self._RegistApi(ROBOT_STATE_API_ID_SERVICE_LIST, 0)
|
||||||
|
|
||||||
def ServiceList(self):
|
def ServiceList(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(ROBOT_STATE_API_ID_SERVICE_LIST, parameter)
|
code, data = self._Call(ROBOT_STATE_API_ID_SERVICE_LIST, parameter)
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
return code, None
|
return code, None
|
||||||
|
|
||||||
lst = []
|
lst = []
|
||||||
|
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
for t in d:
|
for t in d:
|
||||||
s = ServiceState()
|
s = ServiceState()
|
||||||
s.name = t["name"]
|
s.name = t["name"]
|
||||||
s.status = t["status"]
|
s.status = t["status"]
|
||||||
s.protect = t["protect"]
|
s.protect = t["protect"]
|
||||||
lst.append(s)
|
lst.append(s)
|
||||||
|
|
||||||
return code, lst
|
return code, lst
|
||||||
|
|
||||||
|
|
||||||
def ServiceSwitch(self, name: str, switch: bool):
|
def ServiceSwitch(self, name: str, switch: bool):
|
||||||
p = {}
|
p = {}
|
||||||
p["name"] = name
|
p["name"] = name
|
||||||
p["switch"] = int(switch)
|
p["switch"] = int(switch)
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(ROBOT_STATE_API_ID_SERVICE_SWITCH, parameter)
|
code, data = self._Call(ROBOT_STATE_API_ID_SERVICE_SWITCH, parameter)
|
||||||
|
|
||||||
if code != 0:
|
if code != 0:
|
||||||
return code
|
return code
|
||||||
|
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
|
|
||||||
status = d["status"]
|
status = d["status"]
|
||||||
|
|
||||||
if status == 5:
|
if status == 5:
|
||||||
return ROBOT_STATE_ERR_SERVICE_PROTECTED
|
return ROBOT_STATE_ERR_SERVICE_PROTECTED
|
||||||
|
|
||||||
if status != 0 and status != 1:
|
if status != 0 and status != 1:
|
||||||
return ROBOT_STATE_ERR_SERVICE_SWITCH
|
return ROBOT_STATE_ERR_SERVICE_SWITCH
|
||||||
|
|
||||||
return code
|
return code
|
||||||
|
|
||||||
def SetReportFreq(self, interval: int, duration: int):
|
def SetReportFreq(self, interval: int, duration: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["interval"] = interval
|
p["interval"] = interval
|
||||||
p["duration"] = duration
|
p["duration"] = duration
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(ROBOT_STATE_API_ID_REPORT_FREQ, p)
|
code, data = self._Call(ROBOT_STATE_API_ID_REPORT_FREQ, p)
|
||||||
return code
|
return code
|
||||||
|
|
|
@ -1,61 +1,61 @@
|
||||||
"""
|
"""
|
||||||
" service name
|
" service name
|
||||||
"""
|
"""
|
||||||
SPORT_SERVICE_NAME = "sport"
|
SPORT_SERVICE_NAME = "sport"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" service api version
|
" service api version
|
||||||
"""
|
"""
|
||||||
SPORT_API_VERSION = "1.0.0.1"
|
SPORT_API_VERSION = "1.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" api id
|
" api id
|
||||||
"""
|
"""
|
||||||
SPORT_API_ID_DAMP = 1001
|
SPORT_API_ID_DAMP = 1001
|
||||||
SPORT_API_ID_BALANCESTAND = 1002
|
SPORT_API_ID_BALANCESTAND = 1002
|
||||||
SPORT_API_ID_STOPMOVE = 1003
|
SPORT_API_ID_STOPMOVE = 1003
|
||||||
SPORT_API_ID_STANDUP = 1004
|
SPORT_API_ID_STANDUP = 1004
|
||||||
SPORT_API_ID_STANDDOWN = 1005
|
SPORT_API_ID_STANDDOWN = 1005
|
||||||
SPORT_API_ID_RECOVERYSTAND = 1006
|
SPORT_API_ID_RECOVERYSTAND = 1006
|
||||||
SPORT_API_ID_EULER = 1007
|
SPORT_API_ID_EULER = 1007
|
||||||
SPORT_API_ID_MOVE = 1008
|
SPORT_API_ID_MOVE = 1008
|
||||||
SPORT_API_ID_SIT = 1009
|
SPORT_API_ID_SIT = 1009
|
||||||
SPORT_API_ID_RISESIT = 1010
|
SPORT_API_ID_RISESIT = 1010
|
||||||
SPORT_API_ID_SWITCHGAIT = 1011
|
SPORT_API_ID_SWITCHGAIT = 1011
|
||||||
SPORT_API_ID_TRIGGER = 1012
|
SPORT_API_ID_TRIGGER = 1012
|
||||||
SPORT_API_ID_BODYHEIGHT = 1013
|
SPORT_API_ID_BODYHEIGHT = 1013
|
||||||
SPORT_API_ID_FOOTRAISEHEIGHT = 1014
|
SPORT_API_ID_FOOTRAISEHEIGHT = 1014
|
||||||
SPORT_API_ID_SPEEDLEVEL = 1015
|
SPORT_API_ID_SPEEDLEVEL = 1015
|
||||||
SPORT_API_ID_HELLO = 1016
|
SPORT_API_ID_HELLO = 1016
|
||||||
SPORT_API_ID_STRETCH = 1017
|
SPORT_API_ID_STRETCH = 1017
|
||||||
SPORT_API_ID_TRAJECTORYFOLLOW = 1018
|
SPORT_API_ID_TRAJECTORYFOLLOW = 1018
|
||||||
SPORT_API_ID_CONTINUOUSGAIT = 1019
|
SPORT_API_ID_CONTINUOUSGAIT = 1019
|
||||||
SPORT_API_ID_CONTENT = 1020
|
SPORT_API_ID_CONTENT = 1020
|
||||||
SPORT_API_ID_WALLOW = 1021
|
SPORT_API_ID_WALLOW = 1021
|
||||||
SPORT_API_ID_DANCE1 = 1022
|
SPORT_API_ID_DANCE1 = 1022
|
||||||
SPORT_API_ID_DANCE2 = 1023
|
SPORT_API_ID_DANCE2 = 1023
|
||||||
SPORT_API_ID_GETBODYHEIGHT = 1024
|
SPORT_API_ID_GETBODYHEIGHT = 1024
|
||||||
SPORT_API_ID_GETFOOTRAISEHEIGHT = 1025
|
SPORT_API_ID_GETFOOTRAISEHEIGHT = 1025
|
||||||
SPORT_API_ID_GETSPEEDLEVEL = 1026
|
SPORT_API_ID_GETSPEEDLEVEL = 1026
|
||||||
SPORT_API_ID_SWITCHJOYSTICK = 1027
|
SPORT_API_ID_SWITCHJOYSTICK = 1027
|
||||||
SPORT_API_ID_POSE = 1028
|
SPORT_API_ID_POSE = 1028
|
||||||
SPORT_API_ID_SCRAPE = 1029
|
SPORT_API_ID_SCRAPE = 1029
|
||||||
SPORT_API_ID_FRONTFLIP = 1030
|
SPORT_API_ID_FRONTFLIP = 1030
|
||||||
SPORT_API_ID_FRONTJUMP = 1031
|
SPORT_API_ID_FRONTJUMP = 1031
|
||||||
SPORT_API_ID_FRONTPOUNCE = 1032
|
SPORT_API_ID_FRONTPOUNCE = 1032
|
||||||
SPORT_API_ID_WIGGLEHIPS = 1033
|
SPORT_API_ID_WIGGLEHIPS = 1033
|
||||||
SPORT_API_ID_GETSTATE = 1034
|
SPORT_API_ID_GETSTATE = 1034
|
||||||
SPORT_API_ID_ECONOMICGAIT = 1035
|
SPORT_API_ID_ECONOMICGAIT = 1035
|
||||||
SPORT_API_ID_HEART = 1036
|
SPORT_API_ID_HEART = 1036
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" error code
|
" error code
|
||||||
"""
|
"""
|
||||||
# client side
|
# client side
|
||||||
SPORT_ERR_CLIENT_POINT_PATH = 4101
|
SPORT_ERR_CLIENT_POINT_PATH = 4101
|
||||||
# server side
|
# server side
|
||||||
SPORT_ERR_SERVER_OVERTIME = 4201
|
SPORT_ERR_SERVER_OVERTIME = 4201
|
||||||
SPORT_ERR_SERVER_NOT_INIT = 4202
|
SPORT_ERR_SERVER_NOT_INIT = 4202
|
||||||
|
|
|
@ -1,364 +1,364 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ...rpc.client import Client
|
from ...rpc.client import Client
|
||||||
from .sport_api import *
|
from .sport_api import *
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" SPORT_PATH_POINT_SIZE
|
" SPORT_PATH_POINT_SIZE
|
||||||
"""
|
"""
|
||||||
SPORT_PATH_POINT_SIZE = 30
|
SPORT_PATH_POINT_SIZE = 30
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class PathPoint
|
" class PathPoint
|
||||||
"""
|
"""
|
||||||
class PathPoint:
|
class PathPoint:
|
||||||
def __init__(self, timeFromStart: float, x: float, y: float, yaw: float, vx: float, vy: float, vyaw: float):
|
def __init__(self, timeFromStart: float, x: float, y: float, yaw: float, vx: float, vy: float, vyaw: float):
|
||||||
self.timeFromStart = timeFromStart
|
self.timeFromStart = timeFromStart
|
||||||
self.x = x
|
self.x = x
|
||||||
self.y = y
|
self.y = y
|
||||||
self.yaw = yaw
|
self.yaw = yaw
|
||||||
self.vx = vx
|
self.vx = vx
|
||||||
self.vy = vy
|
self.vy = vy
|
||||||
self.vyaw = vyaw
|
self.vyaw = vyaw
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class SportClient
|
" class SportClient
|
||||||
"""
|
"""
|
||||||
class SportClient(Client):
|
class SportClient(Client):
|
||||||
def __init__(self, enableLease: bool = False):
|
def __init__(self, enableLease: bool = False):
|
||||||
super().__init__(SPORT_SERVICE_NAME, enableLease)
|
super().__init__(SPORT_SERVICE_NAME, enableLease)
|
||||||
|
|
||||||
|
|
||||||
def Init(self):
|
def Init(self):
|
||||||
# set api version
|
# set api version
|
||||||
self._SetApiVerson(SPORT_API_VERSION)
|
self._SetApiVerson(SPORT_API_VERSION)
|
||||||
|
|
||||||
# regist api
|
# regist api
|
||||||
self._RegistApi(SPORT_API_ID_DAMP, 0)
|
self._RegistApi(SPORT_API_ID_DAMP, 0)
|
||||||
self._RegistApi(SPORT_API_ID_BALANCESTAND, 0)
|
self._RegistApi(SPORT_API_ID_BALANCESTAND, 0)
|
||||||
self._RegistApi(SPORT_API_ID_STOPMOVE, 0)
|
self._RegistApi(SPORT_API_ID_STOPMOVE, 0)
|
||||||
self._RegistApi(SPORT_API_ID_STANDUP, 0)
|
self._RegistApi(SPORT_API_ID_STANDUP, 0)
|
||||||
self._RegistApi(SPORT_API_ID_STANDDOWN, 0)
|
self._RegistApi(SPORT_API_ID_STANDDOWN, 0)
|
||||||
self._RegistApi(SPORT_API_ID_RECOVERYSTAND, 0)
|
self._RegistApi(SPORT_API_ID_RECOVERYSTAND, 0)
|
||||||
self._RegistApi(SPORT_API_ID_EULER, 0)
|
self._RegistApi(SPORT_API_ID_EULER, 0)
|
||||||
self._RegistApi(SPORT_API_ID_MOVE, 0)
|
self._RegistApi(SPORT_API_ID_MOVE, 0)
|
||||||
self._RegistApi(SPORT_API_ID_SIT, 0)
|
self._RegistApi(SPORT_API_ID_SIT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_RISESIT, 0)
|
self._RegistApi(SPORT_API_ID_RISESIT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_SWITCHGAIT, 0)
|
self._RegistApi(SPORT_API_ID_SWITCHGAIT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_TRIGGER, 0)
|
self._RegistApi(SPORT_API_ID_TRIGGER, 0)
|
||||||
self._RegistApi(SPORT_API_ID_BODYHEIGHT, 0)
|
self._RegistApi(SPORT_API_ID_BODYHEIGHT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_FOOTRAISEHEIGHT, 0)
|
self._RegistApi(SPORT_API_ID_FOOTRAISEHEIGHT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_SPEEDLEVEL, 0)
|
self._RegistApi(SPORT_API_ID_SPEEDLEVEL, 0)
|
||||||
self._RegistApi(SPORT_API_ID_HELLO, 0)
|
self._RegistApi(SPORT_API_ID_HELLO, 0)
|
||||||
self._RegistApi(SPORT_API_ID_STRETCH, 0)
|
self._RegistApi(SPORT_API_ID_STRETCH, 0)
|
||||||
self._RegistApi(SPORT_API_ID_TRAJECTORYFOLLOW, 0)
|
self._RegistApi(SPORT_API_ID_TRAJECTORYFOLLOW, 0)
|
||||||
self._RegistApi(SPORT_API_ID_CONTINUOUSGAIT, 0)
|
self._RegistApi(SPORT_API_ID_CONTINUOUSGAIT, 0)
|
||||||
# self._RegistApi(SPORT_API_ID_CONTENT, 0)
|
# self._RegistApi(SPORT_API_ID_CONTENT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_WALLOW, 0)
|
self._RegistApi(SPORT_API_ID_WALLOW, 0)
|
||||||
self._RegistApi(SPORT_API_ID_DANCE1, 0)
|
self._RegistApi(SPORT_API_ID_DANCE1, 0)
|
||||||
self._RegistApi(SPORT_API_ID_DANCE2, 0)
|
self._RegistApi(SPORT_API_ID_DANCE2, 0)
|
||||||
# self._RegistApi(SPORT_API_ID_GETBODYHEIGHT, 0)
|
# self._RegistApi(SPORT_API_ID_GETBODYHEIGHT, 0)
|
||||||
# self._RegistApi(SPORT_API_ID_GETFOOTRAISEHEIGHT, 0)
|
# self._RegistApi(SPORT_API_ID_GETFOOTRAISEHEIGHT, 0)
|
||||||
# self._RegistApi(SPORT_API_ID_GETSPEEDLEVEL, 0)
|
# self._RegistApi(SPORT_API_ID_GETSPEEDLEVEL, 0)
|
||||||
self._RegistApi(SPORT_API_ID_SWITCHJOYSTICK, 0)
|
self._RegistApi(SPORT_API_ID_SWITCHJOYSTICK, 0)
|
||||||
self._RegistApi(SPORT_API_ID_POSE, 0)
|
self._RegistApi(SPORT_API_ID_POSE, 0)
|
||||||
self._RegistApi(SPORT_API_ID_SCRAPE, 0)
|
self._RegistApi(SPORT_API_ID_SCRAPE, 0)
|
||||||
self._RegistApi(SPORT_API_ID_FRONTFLIP, 0)
|
self._RegistApi(SPORT_API_ID_FRONTFLIP, 0)
|
||||||
self._RegistApi(SPORT_API_ID_FRONTJUMP, 0)
|
self._RegistApi(SPORT_API_ID_FRONTJUMP, 0)
|
||||||
self._RegistApi(SPORT_API_ID_FRONTPOUNCE, 0)
|
self._RegistApi(SPORT_API_ID_FRONTPOUNCE, 0)
|
||||||
self._RegistApi(SPORT_API_ID_WIGGLEHIPS, 0)
|
self._RegistApi(SPORT_API_ID_WIGGLEHIPS, 0)
|
||||||
self._RegistApi(SPORT_API_ID_GETSTATE, 0)
|
self._RegistApi(SPORT_API_ID_GETSTATE, 0)
|
||||||
self._RegistApi(SPORT_API_ID_ECONOMICGAIT, 0)
|
self._RegistApi(SPORT_API_ID_ECONOMICGAIT, 0)
|
||||||
self._RegistApi(SPORT_API_ID_HEART, 0)
|
self._RegistApi(SPORT_API_ID_HEART, 0)
|
||||||
|
|
||||||
# 1001
|
# 1001
|
||||||
def Damp(self):
|
def Damp(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_DAMP, parameter)
|
code, data = self._Call(SPORT_API_ID_DAMP, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1002
|
# 1002
|
||||||
def BalanceStand(self):
|
def BalanceStand(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_BALANCESTAND, parameter)
|
code, data = self._Call(SPORT_API_ID_BALANCESTAND, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1003
|
# 1003
|
||||||
def StopMove(self):
|
def StopMove(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_STOPMOVE, parameter)
|
code, data = self._Call(SPORT_API_ID_STOPMOVE, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1004
|
# 1004
|
||||||
def StandUp(self):
|
def StandUp(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_STANDUP, parameter)
|
code, data = self._Call(SPORT_API_ID_STANDUP, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1005
|
# 1005
|
||||||
def StandDown(self):
|
def StandDown(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_STANDDOWN, parameter)
|
code, data = self._Call(SPORT_API_ID_STANDDOWN, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1006
|
# 1006
|
||||||
def RecoveryStand(self):
|
def RecoveryStand(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_RECOVERYSTAND, parameter)
|
code, data = self._Call(SPORT_API_ID_RECOVERYSTAND, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1007
|
# 1007
|
||||||
def Euler(self, roll: float, pitch: float, yaw: float):
|
def Euler(self, roll: float, pitch: float, yaw: float):
|
||||||
p = {}
|
p = {}
|
||||||
p["x"] = roll
|
p["x"] = roll
|
||||||
p["y"] = pitch
|
p["y"] = pitch
|
||||||
p["z"] = yaw
|
p["z"] = yaw
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_EULER, parameter)
|
code, data = self._Call(SPORT_API_ID_EULER, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1008
|
# 1008
|
||||||
def Move(self, vx: float, vy: float, vyaw: float):
|
def Move(self, vx: float, vy: float, vyaw: float):
|
||||||
p = {}
|
p = {}
|
||||||
p["x"] = vx
|
p["x"] = vx
|
||||||
p["y"] = vy
|
p["y"] = vy
|
||||||
p["z"] = vyaw
|
p["z"] = vyaw
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code = self._CallNoReply(SPORT_API_ID_MOVE, parameter)
|
code = self._CallNoReply(SPORT_API_ID_MOVE, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1009
|
# 1009
|
||||||
def Sit(self):
|
def Sit(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_SIT, parameter)
|
code, data = self._Call(SPORT_API_ID_SIT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
#1010
|
#1010
|
||||||
def RiseSit(self):
|
def RiseSit(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_RISESIT, parameter)
|
code, data = self._Call(SPORT_API_ID_RISESIT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1011
|
# 1011
|
||||||
def SwitchGait(self, t: int):
|
def SwitchGait(self, t: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = t
|
p["data"] = t
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_SWITCHGAIT, parameter)
|
code, data = self._Call(SPORT_API_ID_SWITCHGAIT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1012
|
# 1012
|
||||||
def Trigger(self):
|
def Trigger(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_TRIGGER, parameter)
|
code, data = self._Call(SPORT_API_ID_TRIGGER, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1013
|
# 1013
|
||||||
def BodyHeight(self, height: float):
|
def BodyHeight(self, height: float):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = height
|
p["data"] = height
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_BODYHEIGHT, parameter)
|
code, data = self._Call(SPORT_API_ID_BODYHEIGHT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1014
|
# 1014
|
||||||
def FootRaiseHeight(self, height: float):
|
def FootRaiseHeight(self, height: float):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = height
|
p["data"] = height
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_FOOTRAISEHEIGHT, parameter)
|
code, data = self._Call(SPORT_API_ID_FOOTRAISEHEIGHT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1015
|
# 1015
|
||||||
def SpeedLevel(self, level: int):
|
def SpeedLevel(self, level: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = level
|
p["data"] = level
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_SPEEDLEVEL, parameter)
|
code, data = self._Call(SPORT_API_ID_SPEEDLEVEL, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1016
|
# 1016
|
||||||
def Hello(self):
|
def Hello(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_HELLO, parameter)
|
code, data = self._Call(SPORT_API_ID_HELLO, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1017
|
# 1017
|
||||||
def Stretch(self):
|
def Stretch(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_STRETCH, parameter)
|
code, data = self._Call(SPORT_API_ID_STRETCH, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1018
|
# 1018
|
||||||
def TrajectoryFollow(self, path: list):
|
def TrajectoryFollow(self, path: list):
|
||||||
l = len(path)
|
l = len(path)
|
||||||
if l != SPORT_PATH_POINT_SIZE:
|
if l != SPORT_PATH_POINT_SIZE:
|
||||||
return SPORT_ERR_CLIENT_POINT_PATH
|
return SPORT_ERR_CLIENT_POINT_PATH
|
||||||
|
|
||||||
path_p = []
|
path_p = []
|
||||||
for i in range(l):
|
for i in range(l):
|
||||||
point = path[i]
|
point = path[i]
|
||||||
p = {}
|
p = {}
|
||||||
p["t_from_start"] = point.timeFromStart
|
p["t_from_start"] = point.timeFromStart
|
||||||
p["x"] = point.x
|
p["x"] = point.x
|
||||||
p["y"] = point.y
|
p["y"] = point.y
|
||||||
p["yaw"] = point.yaw
|
p["yaw"] = point.yaw
|
||||||
p["vx"] = point.vx
|
p["vx"] = point.vx
|
||||||
p["vy"] = point.vy
|
p["vy"] = point.vy
|
||||||
p["vyaw"] = point.vyaw
|
p["vyaw"] = point.vyaw
|
||||||
path_p.append(p)
|
path_p.append(p)
|
||||||
|
|
||||||
parameter = json.dumps(path_p)
|
parameter = json.dumps(path_p)
|
||||||
code = self._CallNoReply(SPORT_API_ID_TRAJECTORYFOLLOW, parameter)
|
code = self._CallNoReply(SPORT_API_ID_TRAJECTORYFOLLOW, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1019
|
# 1019
|
||||||
def ContinuousGait(self, flag: int):
|
def ContinuousGait(self, flag: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = flag
|
p["data"] = flag
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_CONTINUOUSGAIT, parameter)
|
code, data = self._Call(SPORT_API_ID_CONTINUOUSGAIT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# # 1020
|
# # 1020
|
||||||
# def Content(self):
|
# def Content(self):
|
||||||
# p = {}
|
# p = {}
|
||||||
# parameter = json.dumps(p)
|
# parameter = json.dumps(p)
|
||||||
# code, data = self._Call(SPORT_API_ID_CONTENT, parameter)
|
# code, data = self._Call(SPORT_API_ID_CONTENT, parameter)
|
||||||
# return code
|
# return code
|
||||||
|
|
||||||
# 1021
|
# 1021
|
||||||
def Wallow(self):
|
def Wallow(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_WALLOW, parameter)
|
code, data = self._Call(SPORT_API_ID_WALLOW, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1022
|
# 1022
|
||||||
def Dance1(self):
|
def Dance1(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_DANCE1, parameter)
|
code, data = self._Call(SPORT_API_ID_DANCE1, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1023
|
# 1023
|
||||||
def Dance2(self):
|
def Dance2(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_DANCE2, parameter)
|
code, data = self._Call(SPORT_API_ID_DANCE2, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1025
|
# 1025
|
||||||
def GetFootRaiseHeight(self):
|
def GetFootRaiseHeight(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(SPORT_API_ID_GETFOOTRAISEHEIGHT, parameter)
|
code, data = self._Call(SPORT_API_ID_GETFOOTRAISEHEIGHT, parameter)
|
||||||
|
|
||||||
if code == 0:
|
if code == 0:
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
return code, d["data"]
|
return code, d["data"]
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
||||||
|
|
||||||
|
|
||||||
# 1026
|
# 1026
|
||||||
def GetSpeedLevel(self):
|
def GetSpeedLevel(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(SPORT_API_ID_GETSPEEDLEVEL, parameter)
|
code, data = self._Call(SPORT_API_ID_GETSPEEDLEVEL, parameter)
|
||||||
|
|
||||||
if code == 0:
|
if code == 0:
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
return code, d["data"]
|
return code, d["data"]
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
||||||
|
|
||||||
# 1027
|
# 1027
|
||||||
def SwitchJoystick(self, on: bool):
|
def SwitchJoystick(self, on: bool):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = on
|
p["data"] = on
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_SWITCHJOYSTICK, parameter)
|
code, data = self._Call(SPORT_API_ID_SWITCHJOYSTICK, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1028
|
# 1028
|
||||||
def Pose(self, flag: bool):
|
def Pose(self, flag: bool):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = flag
|
p["data"] = flag
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_POSE, parameter)
|
code, data = self._Call(SPORT_API_ID_POSE, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1029
|
# 1029
|
||||||
def Scrape(self):
|
def Scrape(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_SCRAPE, parameter)
|
code, data = self._Call(SPORT_API_ID_SCRAPE, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1030
|
# 1030
|
||||||
def FrontFlip(self):
|
def FrontFlip(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_FRONTFLIP, parameter)
|
code, data = self._Call(SPORT_API_ID_FRONTFLIP, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1031
|
# 1031
|
||||||
def FrontJump(self):
|
def FrontJump(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_FRONTJUMP, parameter)
|
code, data = self._Call(SPORT_API_ID_FRONTJUMP, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1032
|
# 1032
|
||||||
def FrontPounce(self):
|
def FrontPounce(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_FRONTPOUNCE, parameter)
|
code, data = self._Call(SPORT_API_ID_FRONTPOUNCE, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1033
|
# 1033
|
||||||
def WiggleHips(self):
|
def WiggleHips(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_WIGGLEHIPS, parameter)
|
code, data = self._Call(SPORT_API_ID_WIGGLEHIPS, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1034
|
# 1034
|
||||||
def GetState(self, keys: list):
|
def GetState(self, keys: list):
|
||||||
parameter = json.dumps(keys)
|
parameter = json.dumps(keys)
|
||||||
code, data = self._Call(SPORT_API_ID_GETSTATE, parameter)
|
code, data = self._Call(SPORT_API_ID_GETSTATE, parameter)
|
||||||
if code == 0:
|
if code == 0:
|
||||||
return code, json.loads(data)
|
return code, json.loads(data)
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
||||||
|
|
||||||
# 1035
|
# 1035
|
||||||
def EconomicGait(self, flag: bool):
|
def EconomicGait(self, flag: bool):
|
||||||
p = {}
|
p = {}
|
||||||
p["data"] = flag
|
p["data"] = flag
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_ECONOMICGAIT, parameter)
|
code, data = self._Call(SPORT_API_ID_ECONOMICGAIT, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1036
|
# 1036
|
||||||
def Heart(self):
|
def Heart(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
code, data = self._Call(SPORT_API_ID_HEART, parameter)
|
code, data = self._Call(SPORT_API_ID_HEART, parameter)
|
||||||
return code
|
return code
|
|
@ -1,16 +1,16 @@
|
||||||
"""
|
"""
|
||||||
" service name
|
" service name
|
||||||
"""
|
"""
|
||||||
VIDEO_SERVICE_NAME = "videohub"
|
VIDEO_SERVICE_NAME = "videohub"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" service api version
|
" service api version
|
||||||
"""
|
"""
|
||||||
VIDEO_API_VERSION = "1.0.0.1"
|
VIDEO_API_VERSION = "1.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" api id
|
" api id
|
||||||
"""
|
"""
|
||||||
VIDEO_API_ID_GETIMAGESAMPLE = 1001
|
VIDEO_API_ID_GETIMAGESAMPLE = 1001
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ...rpc.client import Client
|
from ...rpc.client import Client
|
||||||
from .video_api import *
|
from .video_api import *
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class VideoClient
|
" class VideoClient
|
||||||
"""
|
"""
|
||||||
class VideoClient(Client):
|
class VideoClient(Client):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(VIDEO_SERVICE_NAME, False)
|
super().__init__(VIDEO_SERVICE_NAME, False)
|
||||||
|
|
||||||
|
|
||||||
def Init(self):
|
def Init(self):
|
||||||
# set api version
|
# set api version
|
||||||
self._SetApiVerson(VIDEO_API_VERSION)
|
self._SetApiVerson(VIDEO_API_VERSION)
|
||||||
# regist api
|
# regist api
|
||||||
self._RegistApi(VIDEO_API_ID_GETIMAGESAMPLE, 0)
|
self._RegistApi(VIDEO_API_ID_GETIMAGESAMPLE, 0)
|
||||||
|
|
||||||
# 1001
|
# 1001
|
||||||
def GetImageSample(self):
|
def GetImageSample(self):
|
||||||
return self._CallBinary(VIDEO_API_ID_GETIMAGESAMPLE, [])
|
return self._CallBinary(VIDEO_API_ID_GETIMAGESAMPLE, [])
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
"""
|
"""
|
||||||
" service name
|
" service name
|
||||||
"""
|
"""
|
||||||
VUI_SERVICE_NAME = "vui"
|
VUI_SERVICE_NAME = "vui"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" service api version
|
" service api version
|
||||||
"""
|
"""
|
||||||
VUI_API_VERSION = "1.0.0.1"
|
VUI_API_VERSION = "1.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" api id
|
" api id
|
||||||
"""
|
"""
|
||||||
VUI_API_ID_SETSWITCH = 1001
|
VUI_API_ID_SETSWITCH = 1001
|
||||||
VUI_API_ID_GETSWITCH = 1002
|
VUI_API_ID_GETSWITCH = 1002
|
||||||
VUI_API_ID_SETVOLUME = 1003
|
VUI_API_ID_SETVOLUME = 1003
|
||||||
VUI_API_ID_GETVOLUME = 1004
|
VUI_API_ID_GETVOLUME = 1004
|
||||||
VUI_API_ID_SETBRIGHTNESS = 1005
|
VUI_API_ID_SETBRIGHTNESS = 1005
|
||||||
VUI_API_ID_GETBRIGHTNESS = 1006
|
VUI_API_ID_GETBRIGHTNESS = 1006
|
||||||
|
|
|
@ -1,86 +1,86 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ...rpc.client import Client
|
from ...rpc.client import Client
|
||||||
from .vui_api import *
|
from .vui_api import *
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" class VideoClient
|
" class VideoClient
|
||||||
"""
|
"""
|
||||||
class VuiClient(Client):
|
class VuiClient(Client):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(VUI_SERVICE_NAME, False)
|
super().__init__(VUI_SERVICE_NAME, False)
|
||||||
|
|
||||||
def Init(self):
|
def Init(self):
|
||||||
# set api version
|
# set api version
|
||||||
self._SetApiVerson(VUI_API_VERSION)
|
self._SetApiVerson(VUI_API_VERSION)
|
||||||
# regist api
|
# regist api
|
||||||
self._RegistApi(VUI_API_ID_SETSWITCH, 0)
|
self._RegistApi(VUI_API_ID_SETSWITCH, 0)
|
||||||
self._RegistApi(VUI_API_ID_GETSWITCH, 0)
|
self._RegistApi(VUI_API_ID_GETSWITCH, 0)
|
||||||
self._RegistApi(VUI_API_ID_SETVOLUME, 0)
|
self._RegistApi(VUI_API_ID_SETVOLUME, 0)
|
||||||
self._RegistApi(VUI_API_ID_GETVOLUME, 0)
|
self._RegistApi(VUI_API_ID_GETVOLUME, 0)
|
||||||
self._RegistApi(VUI_API_ID_SETBRIGHTNESS, 0)
|
self._RegistApi(VUI_API_ID_SETBRIGHTNESS, 0)
|
||||||
self._RegistApi(VUI_API_ID_GETBRIGHTNESS, 0)
|
self._RegistApi(VUI_API_ID_GETBRIGHTNESS, 0)
|
||||||
|
|
||||||
# 1001
|
# 1001
|
||||||
def SetSwitch(self, enable: int):
|
def SetSwitch(self, enable: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["enable"] = enable
|
p["enable"] = enable
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(VUI_API_ID_SETSWITCH, parameter)
|
code, data = self._Call(VUI_API_ID_SETSWITCH, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1002
|
# 1002
|
||||||
def GetSwitch(self):
|
def GetSwitch(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(VUI_API_ID_GETSWITCH, parameter)
|
code, data = self._Call(VUI_API_ID_GETSWITCH, parameter)
|
||||||
if code == 0:
|
if code == 0:
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
return code, d["enable"]
|
return code, d["enable"]
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
||||||
|
|
||||||
# 1003
|
# 1003
|
||||||
def SetVolume(self, level: int):
|
def SetVolume(self, level: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["volume"] = level
|
p["volume"] = level
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(VUI_API_ID_SETVOLUME, parameter)
|
code, data = self._Call(VUI_API_ID_SETVOLUME, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1006
|
# 1006
|
||||||
def GetVolume(self):
|
def GetVolume(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(VUI_API_ID_GETVOLUME, parameter)
|
code, data = self._Call(VUI_API_ID_GETVOLUME, parameter)
|
||||||
if code == 0:
|
if code == 0:
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
return code, d["volume"]
|
return code, d["volume"]
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
||||||
|
|
||||||
# 1005
|
# 1005
|
||||||
def SetBrightness(self, level: int):
|
def SetBrightness(self, level: int):
|
||||||
p = {}
|
p = {}
|
||||||
p["brightness"] = level
|
p["brightness"] = level
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(VUI_API_ID_SETBRIGHTNESS, parameter)
|
code, data = self._Call(VUI_API_ID_SETBRIGHTNESS, parameter)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
# 1006
|
# 1006
|
||||||
def GetBrightness(self):
|
def GetBrightness(self):
|
||||||
p = {}
|
p = {}
|
||||||
parameter = json.dumps(p)
|
parameter = json.dumps(p)
|
||||||
|
|
||||||
code, data = self._Call(VUI_API_ID_GETBRIGHTNESS, parameter)
|
code, data = self._Call(VUI_API_ID_GETBRIGHTNESS, parameter)
|
||||||
if code == 0:
|
if code == 0:
|
||||||
d = json.loads(data)
|
d = json.loads(data)
|
||||||
return code, d["brightness"]
|
return code, d["brightness"]
|
||||||
else:
|
else:
|
||||||
return code, None
|
return code, None
|
|
@ -1,10 +1,10 @@
|
||||||
from . import builtin_interfaces, geometry_msgs, sensor_msgs, std_msgs, unitree_go, unitree_api
|
from . import builtin_interfaces, geometry_msgs, sensor_msgs, std_msgs, unitree_go, unitree_api
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"builtin_interfaces",
|
"builtin_interfaces",
|
||||||
"geometry_msgs",
|
"geometry_msgs",
|
||||||
"sensor_msgs",
|
"sensor_msgs",
|
||||||
"std_msgs",
|
"std_msgs",
|
||||||
"unitree_go",
|
"unitree_go",
|
||||||
"unitree_api",
|
"unitree_api",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: builtin_interfaces
|
Module: builtin_interfaces
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: builtin_interfaces.msg
|
Module: builtin_interfaces.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: builtin_interfaces.msg.dds_
|
Module: builtin_interfaces.msg.dds_
|
||||||
IDL file: Time_.idl
|
IDL file: Time_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import builtin_interfaces
|
# import builtin_interfaces
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Time_(idl.IdlStruct, typename="builtin_interfaces.msg.dds_.Time_"):
|
class Time_(idl.IdlStruct, typename="builtin_interfaces.msg.dds_.Time_"):
|
||||||
sec: types.int32
|
sec: types.int32
|
||||||
nanosec: types.uint32
|
nanosec: types.uint32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: builtin_interfaces.msg.dds_
|
Module: builtin_interfaces.msg.dds_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ._Time_ import Time_
|
from ._Time_ import Time_
|
||||||
__all__ = ["Time_", ]
|
__all__ = ["Time_", ]
|
||||||
|
|
|
@ -1,205 +1,205 @@
|
||||||
from .builtin_interfaces.msg.dds_ import *
|
from .builtin_interfaces.msg.dds_ import *
|
||||||
from .std_msgs.msg.dds_ import *
|
from .std_msgs.msg.dds_ import *
|
||||||
from .geometry_msgs.msg.dds_ import *
|
from .geometry_msgs.msg.dds_ import *
|
||||||
from .nav_msgs.msg.dds_ import *
|
from .nav_msgs.msg.dds_ import *
|
||||||
from .sensor_msgs.msg.dds_ import *
|
from .sensor_msgs.msg.dds_ import *
|
||||||
from .unitree_go.msg.dds_ import *
|
from .unitree_go.msg.dds_ import *
|
||||||
from .unitree_api.msg.dds_ import *
|
from .unitree_api.msg.dds_ import *
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" builtin_interfaces_msgs.msg.dds_ dafault
|
" builtin_interfaces_msgs.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def builtin_interfaces_msgs_msg_dds__Time_():
|
def builtin_interfaces_msgs_msg_dds__Time_():
|
||||||
return Time_(0, 0)
|
return Time_(0, 0)
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" std_msgs.msg.dds_ dafault
|
" std_msgs.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def std_msgs_msg_dds__Header_():
|
def std_msgs_msg_dds__Header_():
|
||||||
return Header_(builtin_interfaces_msgs_msg_dds__Time_(), "")
|
return Header_(builtin_interfaces_msgs_msg_dds__Time_(), "")
|
||||||
|
|
||||||
def std_msgs_msg_dds__String_():
|
def std_msgs_msg_dds__String_():
|
||||||
return String_("")
|
return String_("")
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" geometry_msgs.msg.dds_ dafault
|
" geometry_msgs.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def geometry_msgs_msg_dds__Point_():
|
def geometry_msgs_msg_dds__Point_():
|
||||||
return Point_(0.0, 0.0, 0.0)
|
return Point_(0.0, 0.0, 0.0)
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__Point32_():
|
def geometry_msgs_msg_dds__Point32_():
|
||||||
return Point32_(0.0, 0.0, 0.0)
|
return Point32_(0.0, 0.0, 0.0)
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__PointStamped_():
|
def geometry_msgs_msg_dds__PointStamped_():
|
||||||
return PointStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Point_())
|
return PointStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Point_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__Quaternion_():
|
def geometry_msgs_msg_dds__Quaternion_():
|
||||||
return Quaternion_(0.0, 0.0, 0.0, 0.0)
|
return Quaternion_(0.0, 0.0, 0.0, 0.0)
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__Vector3_():
|
def geometry_msgs_msg_dds__Vector3_():
|
||||||
return Vector3_(0.0, 0.0, 0.0)
|
return Vector3_(0.0, 0.0, 0.0)
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__Pose_():
|
def geometry_msgs_msg_dds__Pose_():
|
||||||
return Pose_(geometry_msgs_msg_dds__Point_(), geometry_msgs_msg_dds__Quaternion_())
|
return Pose_(geometry_msgs_msg_dds__Point_(), geometry_msgs_msg_dds__Quaternion_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__Pose2D_():
|
def geometry_msgs_msg_dds__Pose2D_():
|
||||||
return Pose2D_(0.0, 0.0, 0.0)
|
return Pose2D_(0.0, 0.0, 0.0)
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__PoseStamped_():
|
def geometry_msgs_msg_dds__PoseStamped_():
|
||||||
return PoseStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Pose_())
|
return PoseStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Pose_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__PoseWithCovariance_():
|
def geometry_msgs_msg_dds__PoseWithCovariance_():
|
||||||
return PoseWithCovariance_(geometry_msgs_msg_dds__Pose_(), [
|
return PoseWithCovariance_(geometry_msgs_msg_dds__Pose_(), [
|
||||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
||||||
])
|
])
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__PoseWithCovarianceStamped_():
|
def geometry_msgs_msg_dds__PoseWithCovarianceStamped_():
|
||||||
return PoseWithCovarianceStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__PoseWithCovariance_())
|
return PoseWithCovarianceStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__PoseWithCovariance_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__QuaternionStamped_():
|
def geometry_msgs_msg_dds__QuaternionStamped_():
|
||||||
return QuaternionStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Quaternion_())
|
return QuaternionStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Quaternion_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__Twist_():
|
def geometry_msgs_msg_dds__Twist_():
|
||||||
return Twist_(geometry_msgs_msg_dds__Vector3_(), geometry_msgs_msg_dds__Vector3_())
|
return Twist_(geometry_msgs_msg_dds__Vector3_(), geometry_msgs_msg_dds__Vector3_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__TwistStamped_():
|
def geometry_msgs_msg_dds__TwistStamped_():
|
||||||
return TwistStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Twist_())
|
return TwistStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Twist_())
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__TwistWithCovariance_():
|
def geometry_msgs_msg_dds__TwistWithCovariance_():
|
||||||
return TwistWithCovariance_(geometry_msgs_msg_dds__Twist_(), [
|
return TwistWithCovariance_(geometry_msgs_msg_dds__Twist_(), [
|
||||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
||||||
])
|
])
|
||||||
|
|
||||||
def geometry_msgs_msg_dds__TwistWithCovarianceStamped_():
|
def geometry_msgs_msg_dds__TwistWithCovarianceStamped_():
|
||||||
return TwistWithCovarianceStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__TwistWithCovariance_())
|
return TwistWithCovarianceStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__TwistWithCovariance_())
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" nav_msgs.msg.dds_ dafault
|
" nav_msgs.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def nav_msgs_msg_dds__MapMetaData_():
|
def nav_msgs_msg_dds__MapMetaData_():
|
||||||
return MapMetaData_(builtin_interfaces_msgs_msg_dds__Time_(), 0, 0, geometry_msgs_msg_dds__Pose_())
|
return MapMetaData_(builtin_interfaces_msgs_msg_dds__Time_(), 0, 0, geometry_msgs_msg_dds__Pose_())
|
||||||
|
|
||||||
def nav_msgs_msg_dds__OccupancyGrid_():
|
def nav_msgs_msg_dds__OccupancyGrid_():
|
||||||
return OccupancyGrid_(std_msgs_msg_dds__Header_(), nav_msgs_msg_dds__MapMetaData_(), [])
|
return OccupancyGrid_(std_msgs_msg_dds__Header_(), nav_msgs_msg_dds__MapMetaData_(), [])
|
||||||
|
|
||||||
def nav_msgs_msg_dds__Odometry_():
|
def nav_msgs_msg_dds__Odometry_():
|
||||||
return Odometry_(std_msgs_msg_dds__Header_(), "", geometry_msgs_msg_dds__PoseWithCovariance_(), geometry_msgs_msg_dds__TwistWithCovariance_())
|
return Odometry_(std_msgs_msg_dds__Header_(), "", geometry_msgs_msg_dds__PoseWithCovariance_(), geometry_msgs_msg_dds__TwistWithCovariance_())
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" sensor_msgs.msg.dds_ dafault
|
" sensor_msgs.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def sensor_msgs_msg_dds__PointField_Constants_PointField_():
|
def sensor_msgs_msg_dds__PointField_Constants_PointField_():
|
||||||
return PointField_("", 0, 0, 0)
|
return PointField_("", 0, 0, 0)
|
||||||
|
|
||||||
def sensor_msgs_msg_dds__PointField_Constants_PointCloud2_():
|
def sensor_msgs_msg_dds__PointField_Constants_PointCloud2_():
|
||||||
return PointCloud2_(std_msgs_msg_dds__Header_(), 0, 0, [], False, 0, 0, [], False)
|
return PointCloud2_(std_msgs_msg_dds__Header_(), 0, 0, [], False, 0, 0, [], False)
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" unitree_go.msg.dds_ dafault
|
" unitree_go.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def unitree_go_msg_dds__AudioData_():
|
def unitree_go_msg_dds__AudioData_():
|
||||||
return AudioData_(0, [])
|
return AudioData_(0, [])
|
||||||
|
|
||||||
def unitree_go_msg_dds__BmsCmd_():
|
def unitree_go_msg_dds__BmsCmd_():
|
||||||
return BmsCmd_(0, [0, 0, 0])
|
return BmsCmd_(0, [0, 0, 0])
|
||||||
|
|
||||||
def unitree_go_msg_dds__BmsState_():
|
def unitree_go_msg_dds__BmsState_():
|
||||||
return BmsState_(0, 0, 0, 0, 0, 0, [0, 0], [0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
|
return BmsState_(0, 0, 0, 0, 0, 0, [0, 0], [0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
|
||||||
|
|
||||||
def unitree_go_msg_dds__Error_():
|
def unitree_go_msg_dds__Error_():
|
||||||
return Error_(0, 0)
|
return Error_(0, 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__Go2FrontVideoData_():
|
def unitree_go_msg_dds__Go2FrontVideoData_():
|
||||||
return Go2FrontVideoData_(0, [], [], [])
|
return Go2FrontVideoData_(0, [], [], [])
|
||||||
|
|
||||||
def unitree_go_msg_dds__HeightMap_():
|
def unitree_go_msg_dds__HeightMap_():
|
||||||
return HeightMap_(0.0, "", 0.0, 0, 0, [0.0, 0.0], [])
|
return HeightMap_(0.0, "", 0.0, 0, 0, [0.0, 0.0], [])
|
||||||
|
|
||||||
def unitree_go_msg_dds__IMUState_():
|
def unitree_go_msg_dds__IMUState_():
|
||||||
return IMUState_([0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0)
|
return IMUState_([0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__InterfaceConfig_():
|
def unitree_go_msg_dds__InterfaceConfig_():
|
||||||
return InterfaceConfig_(0, 0, [0, 0])
|
return InterfaceConfig_(0, 0, [0, 0])
|
||||||
|
|
||||||
def unitree_go_msg_dds__LidarState_():
|
def unitree_go_msg_dds__LidarState_():
|
||||||
return LidarState_(0.0, "", "", "", 0.0, 0.0, 0, 0.0, 0.0, 0, 0, 0.0, 0.0, [0.0, 0.0, 0.0], 0.0, 0, 0)
|
return LidarState_(0.0, "", "", "", 0.0, 0.0, 0, 0.0, 0.0, 0, 0, 0.0, 0.0, [0.0, 0.0, 0.0], 0.0, 0, 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__MotorCmd_():
|
def unitree_go_msg_dds__MotorCmd_():
|
||||||
return MotorCmd_(0, 0.0, 0.0, 0.0, 0.0, 0.0, [0, 0, 0])
|
return MotorCmd_(0, 0.0, 0.0, 0.0, 0.0, 0.0, [0, 0, 0])
|
||||||
|
|
||||||
def unitree_go_msg_dds__MotorState_():
|
def unitree_go_msg_dds__MotorState_():
|
||||||
return MotorState_(0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, [0, 0])
|
return MotorState_(0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, [0, 0])
|
||||||
|
|
||||||
def unitree_go_msg_dds__LowCmd_():
|
def unitree_go_msg_dds__LowCmd_():
|
||||||
return LowCmd_([0, 0], 0, 0, [0, 0], [0, 0], 0, [unitree_go_msg_dds__MotorCmd_() for i in range(20)], unitree_go_msg_dds__BmsCmd_(),
|
return LowCmd_([0, 0], 0, 0, [0, 0], [0, 0], 0, [unitree_go_msg_dds__MotorCmd_() for i in range(20)], unitree_go_msg_dds__BmsCmd_(),
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0], 0, 0, 0)
|
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0], 0, 0, 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__LowState_():
|
def unitree_go_msg_dds__LowState_():
|
||||||
return LowState_([0, 0], 0, 0, [0, 0], [0, 0], 0, unitree_go_msg_dds__IMUState_(), [unitree_go_msg_dds__MotorState_() for i in range(20)],
|
return LowState_([0, 0], 0, 0, [0, 0], [0, 0], 0, unitree_go_msg_dds__IMUState_(), [unitree_go_msg_dds__MotorState_() for i in range(20)],
|
||||||
unitree_go_msg_dds__BmsState_(), [0, 0, 0, 0], [0, 0, 0, 0], 0,
|
unitree_go_msg_dds__BmsState_(), [0, 0, 0, 0], [0, 0, 0, 0], 0,
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
0, 0, 0, 0, 0.0, 0.0, [0, 0, 0, 0], 0, 0)
|
0, 0, 0, 0, 0.0, 0.0, [0, 0, 0, 0], 0, 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__Req_():
|
def unitree_go_msg_dds__Req_():
|
||||||
return Req_("", "")
|
return Req_("", "")
|
||||||
|
|
||||||
def unitree_go_msg_dds__Res_():
|
def unitree_go_msg_dds__Res_():
|
||||||
return Res_("", [], "")
|
return Res_("", [], "")
|
||||||
|
|
||||||
def unitree_go_msg_dds__TimeSpec_():
|
def unitree_go_msg_dds__TimeSpec_():
|
||||||
return TimeSpec_(0, 0)
|
return TimeSpec_(0, 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__PathPoint_():
|
def unitree_go_msg_dds__PathPoint_():
|
||||||
return PathPoint_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
return PathPoint_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__SportModeState_():
|
def unitree_go_msg_dds__SportModeState_():
|
||||||
return SportModeState_(unitree_go_msg_dds__TimeSpec_(), 0, unitree_go_msg_dds__IMUState_(), 0, 0, 0, 0.0, [0.0, 0.0, 0.0], 0.0,
|
return SportModeState_(unitree_go_msg_dds__TimeSpec_(), 0, unitree_go_msg_dds__IMUState_(), 0, 0, 0, 0.0, [0.0, 0.0, 0.0], 0.0,
|
||||||
[0.0, 0.0, 0.0], 0.0, [0.0, 0.0, 0.0, 0.0], [0, 0, 0, 0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
[0.0, 0.0, 0.0], 0.0, [0.0, 0.0, 0.0, 0.0], [0, 0, 0, 0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],[unitree_go_msg_dds__PathPoint_() for i in range(10)])
|
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],[unitree_go_msg_dds__PathPoint_() for i in range(10)])
|
||||||
|
|
||||||
def unitree_go_msg_dds__UwbState_():
|
def unitree_go_msg_dds__UwbState_():
|
||||||
return UwbState_([0, 0], 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, [0.0, 0.0], 0, 0, 0)
|
return UwbState_([0, 0], 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, [0.0, 0.0], 0, 0, 0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__UwbSwitch_():
|
def unitree_go_msg_dds__UwbSwitch_():
|
||||||
return UwbSwitch_(0)
|
return UwbSwitch_(0)
|
||||||
|
|
||||||
def unitree_go_msg_dds__WirelessController_():
|
def unitree_go_msg_dds__WirelessController_():
|
||||||
return WirelessController_(0.0, 0.0, 0.0, 0.0, 0)
|
return WirelessController_(0.0, 0.0, 0.0, 0.0, 0)
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
" unitree_api.msg.dds_ dafault
|
" unitree_api.msg.dds_ dafault
|
||||||
"""
|
"""
|
||||||
def unitree_api_msg_dds__RequestIdentity_():
|
def unitree_api_msg_dds__RequestIdentity_():
|
||||||
return RequestIdentity_(0, 0)
|
return RequestIdentity_(0, 0)
|
||||||
|
|
||||||
def unitree_api_msg_dds__RequestLease_():
|
def unitree_api_msg_dds__RequestLease_():
|
||||||
return RequestLease_(0)
|
return RequestLease_(0)
|
||||||
|
|
||||||
def unitree_api_msg_dds__RequestPolicy_():
|
def unitree_api_msg_dds__RequestPolicy_():
|
||||||
return RequestPolicy_(0, False)
|
return RequestPolicy_(0, False)
|
||||||
|
|
||||||
def unitree_api_msg_dds__RequestHeader_():
|
def unitree_api_msg_dds__RequestHeader_():
|
||||||
return RequestHeader_(unitree_api_msg_dds__RequestIdentity_(), unitree_api_msg_dds__RequestLease_(), unitree_api_msg_dds__RequestPolicy_())
|
return RequestHeader_(unitree_api_msg_dds__RequestIdentity_(), unitree_api_msg_dds__RequestLease_(), unitree_api_msg_dds__RequestPolicy_())
|
||||||
|
|
||||||
def unitree_api_msg_dds__Request_():
|
def unitree_api_msg_dds__Request_():
|
||||||
return Request_(unitree_api_msg_dds__RequestHeader_(), "", [])
|
return Request_(unitree_api_msg_dds__RequestHeader_(), "", [])
|
||||||
|
|
||||||
def unitree_api_msg_dds__ResponseStatus_():
|
def unitree_api_msg_dds__ResponseStatus_():
|
||||||
return ResponseStatus_(0)
|
return ResponseStatus_(0)
|
||||||
|
|
||||||
def unitree_api_msg_dds__ResponseHeader_():
|
def unitree_api_msg_dds__ResponseHeader_():
|
||||||
return ResponseHeader_(unitree_api_msg_dds__RequestIdentity_(), unitree_api_msg_dds__ResponseStatus_())
|
return ResponseHeader_(unitree_api_msg_dds__RequestIdentity_(), unitree_api_msg_dds__ResponseStatus_())
|
||||||
|
|
||||||
def unitree_api_msg_dds__Response_():
|
def unitree_api_msg_dds__Response_():
|
||||||
return Response_(unitree_api_msg_dds__ResponseHeader_(), "", [])
|
return Response_(unitree_api_msg_dds__ResponseHeader_(), "", [])
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs
|
Module: geometry_msgs
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg
|
Module: geometry_msgs.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Point32_.idl
|
IDL file: Point32_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Point32_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Point32_"):
|
class Point32_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Point32_"):
|
||||||
x: types.float32
|
x: types.float32
|
||||||
y: types.float32
|
y: types.float32
|
||||||
z: types.float32
|
z: types.float32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: PointStamped_.idl
|
IDL file: PointStamped_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class PointStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PointStamped_"):
|
class PointStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PointStamped_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
point: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Point_'
|
point: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Point_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Point_.idl
|
IDL file: Point_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Point_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Point_"):
|
class Point_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Point_"):
|
||||||
x: types.float64
|
x: types.float64
|
||||||
y: types.float64
|
y: types.float64
|
||||||
z: types.float64
|
z: types.float64
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Pose2D_.idl
|
IDL file: Pose2D_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Pose2D_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Pose2D_"):
|
class Pose2D_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Pose2D_"):
|
||||||
x: types.float64
|
x: types.float64
|
||||||
y: types.float64
|
y: types.float64
|
||||||
theta: types.float64
|
theta: types.float64
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: PoseStamped_.idl
|
IDL file: PoseStamped_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class PoseStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseStamped_"):
|
class PoseStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseStamped_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_'
|
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: PoseWithCovarianceStamped_.idl
|
IDL file: PoseWithCovarianceStamped_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class PoseWithCovarianceStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseWithCovarianceStamped_"):
|
class PoseWithCovarianceStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseWithCovarianceStamped_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.PoseWithCovariance_'
|
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.PoseWithCovariance_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: PoseWithCovariance_.idl
|
IDL file: PoseWithCovariance_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class PoseWithCovariance_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseWithCovariance_"):
|
class PoseWithCovariance_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseWithCovariance_"):
|
||||||
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_'
|
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_'
|
||||||
covariance: types.array[types.float64, 36]
|
covariance: types.array[types.float64, 36]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Pose_.idl
|
IDL file: Pose_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Pose_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Pose_"):
|
class Pose_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Pose_"):
|
||||||
position: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Point_'
|
position: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Point_'
|
||||||
orientation: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Quaternion_'
|
orientation: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Quaternion_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: QuaternionStamped_.idl
|
IDL file: QuaternionStamped_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class QuaternionStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.QuaternionStamped_"):
|
class QuaternionStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.QuaternionStamped_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
quaternion: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Quaternion_'
|
quaternion: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Quaternion_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Quaternion_.idl
|
IDL file: Quaternion_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Quaternion_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Quaternion_"):
|
class Quaternion_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Quaternion_"):
|
||||||
x: types.float64
|
x: types.float64
|
||||||
y: types.float64
|
y: types.float64
|
||||||
z: types.float64
|
z: types.float64
|
||||||
w: types.float64
|
w: types.float64
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: TwistStamped_.idl
|
IDL file: TwistStamped_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class TwistStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistStamped_"):
|
class TwistStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistStamped_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Twist_'
|
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Twist_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: TwistWithCovarianceStamped_.idl
|
IDL file: TwistWithCovarianceStamped_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class TwistWithCovarianceStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistWithCovarianceStamped_"):
|
class TwistWithCovarianceStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistWithCovarianceStamped_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.TwistWithCovariance_'
|
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.TwistWithCovariance_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: TwistWithCovariance_.idl
|
IDL file: TwistWithCovariance_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class TwistWithCovariance_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistWithCovariance_"):
|
class TwistWithCovariance_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistWithCovariance_"):
|
||||||
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Twist_'
|
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Twist_'
|
||||||
covariance: types.array[types.float64, 36]
|
covariance: types.array[types.float64, 36]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Twist_.idl
|
IDL file: Twist_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Twist_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Twist_"):
|
class Twist_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Twist_"):
|
||||||
linear: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Vector3_'
|
linear: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Vector3_'
|
||||||
angular: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Vector3_'
|
angular: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Vector3_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
IDL file: Vector3_.idl
|
IDL file: Vector3_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import geometry_msgs
|
# import geometry_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Vector3_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Vector3_"):
|
class Vector3_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Vector3_"):
|
||||||
x: types.float64
|
x: types.float64
|
||||||
y: types.float64
|
y: types.float64
|
||||||
z: types.float64
|
z: types.float64
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: geometry_msgs.msg.dds_
|
Module: geometry_msgs.msg.dds_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ._Point32_ import Point32_
|
from ._Point32_ import Point32_
|
||||||
from ._Point_ import Point_
|
from ._Point_ import Point_
|
||||||
from ._PointStamped_ import PointStamped_
|
from ._PointStamped_ import PointStamped_
|
||||||
from ._Pose2D_ import Pose2D_
|
from ._Pose2D_ import Pose2D_
|
||||||
from ._Pose_ import Pose_
|
from ._Pose_ import Pose_
|
||||||
from ._PoseStamped_ import PoseStamped_
|
from ._PoseStamped_ import PoseStamped_
|
||||||
from ._PoseWithCovariance_ import PoseWithCovariance_
|
from ._PoseWithCovariance_ import PoseWithCovariance_
|
||||||
from ._PoseWithCovarianceStamped_ import PoseWithCovarianceStamped_
|
from ._PoseWithCovarianceStamped_ import PoseWithCovarianceStamped_
|
||||||
from ._Quaternion_ import Quaternion_
|
from ._Quaternion_ import Quaternion_
|
||||||
from ._QuaternionStamped_ import QuaternionStamped_
|
from ._QuaternionStamped_ import QuaternionStamped_
|
||||||
from ._Twist_ import Twist_
|
from ._Twist_ import Twist_
|
||||||
from ._TwistStamped_ import TwistStamped_
|
from ._TwistStamped_ import TwistStamped_
|
||||||
from ._TwistWithCovariance_ import TwistWithCovariance_
|
from ._TwistWithCovariance_ import TwistWithCovariance_
|
||||||
from ._TwistWithCovarianceStamped_ import TwistWithCovarianceStamped_
|
from ._TwistWithCovarianceStamped_ import TwistWithCovarianceStamped_
|
||||||
from ._Vector3_ import Vector3_
|
from ._Vector3_ import Vector3_
|
||||||
__all__ = ["Point32_", "Point_", "PointStamped_", "Pose2D_", "Pose_", "PoseStamped_", "PoseWithCovariance_", "PoseWithCovarianceStamped_", "Quaternion_", "QuaternionStamped_", "Twist_", "TwistStamped_", "TwistWithCovariance_", "TwistWithCovarianceStamped_", "Vector3_", ]
|
__all__ = ["Point32_", "Point_", "PointStamped_", "Pose2D_", "Pose_", "PoseStamped_", "PoseWithCovariance_", "PoseWithCovarianceStamped_", "Quaternion_", "QuaternionStamped_", "Twist_", "TwistStamped_", "TwistWithCovariance_", "TwistWithCovarianceStamped_", "Vector3_", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: nav_msgs
|
Module: nav_msgs
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: nav_msgs.msg
|
Module: nav_msgs.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: nav_msgs.msg.dds_
|
Module: nav_msgs.msg.dds_
|
||||||
IDL file: MapMetaData_.idl
|
IDL file: MapMetaData_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import nav_msgs
|
# import nav_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import builtin_interfaces.msg.dds_
|
# import builtin_interfaces.msg.dds_
|
||||||
# import geometry_msgs.msg.dds_
|
# import geometry_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class MapMetaData_(idl.IdlStruct, typename="nav_msgs.msg.dds_.MapMetaData_"):
|
class MapMetaData_(idl.IdlStruct, typename="nav_msgs.msg.dds_.MapMetaData_"):
|
||||||
map_load_time: 'unitree_sdk2py.idl.builtin_interfaces.msg.dds_.Time_'
|
map_load_time: 'unitree_sdk2py.idl.builtin_interfaces.msg.dds_.Time_'
|
||||||
resolution: types.float32
|
resolution: types.float32
|
||||||
width: types.uint32
|
width: types.uint32
|
||||||
height: types.uint32
|
height: types.uint32
|
||||||
origin: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_'
|
origin: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_'
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: nav_msgs.msg.dds_
|
Module: nav_msgs.msg.dds_
|
||||||
IDL file: OccupancyGrid_.idl
|
IDL file: OccupancyGrid_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import nav_msgs
|
# import nav_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class OccupancyGrid_(idl.IdlStruct, typename="nav_msgs.msg.dds_.OccupancyGrid_"):
|
class OccupancyGrid_(idl.IdlStruct, typename="nav_msgs.msg.dds_.OccupancyGrid_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
info: 'unitree_sdk2py.idl.nav_msgs.msg.dds_.MapMetaData_'
|
info: 'unitree_sdk2py.idl.nav_msgs.msg.dds_.MapMetaData_'
|
||||||
data: types.sequence[types.uint8]
|
data: types.sequence[types.uint8]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: nav_msgs.msg.dds_
|
Module: nav_msgs.msg.dds_
|
||||||
IDL file: Odometry_.idl
|
IDL file: Odometry_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import nav_msgs
|
# import nav_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import geometry_msgs.msg.dds_
|
# import geometry_msgs.msg.dds_
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Odometry_(idl.IdlStruct, typename="nav_msgs.msg.dds_.Odometry_"):
|
class Odometry_(idl.IdlStruct, typename="nav_msgs.msg.dds_.Odometry_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
child_frame_id: str
|
child_frame_id: str
|
||||||
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.PoseWithCovariance_'
|
pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.PoseWithCovariance_'
|
||||||
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.TwistWithCovariance_'
|
twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.TwistWithCovariance_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: nav_msgs.msg.dds_
|
Module: nav_msgs.msg.dds_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ._MapMetaData_ import MapMetaData_
|
from ._MapMetaData_ import MapMetaData_
|
||||||
from ._OccupancyGrid_ import OccupancyGrid_
|
from ._OccupancyGrid_ import OccupancyGrid_
|
||||||
from ._Odometry_ import Odometry_
|
from ._Odometry_ import Odometry_
|
||||||
__all__ = ["MapMetaData_", "OccupancyGrid_", "Odometry_", ]
|
__all__ = ["MapMetaData_", "OccupancyGrid_", "Odometry_", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs
|
Module: sensor_msgs
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs.msg
|
Module: sensor_msgs.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs.msg.dds_.PointField_Constants
|
Module: sensor_msgs.msg.dds_.PointField_Constants
|
||||||
IDL file: PointField_.idl
|
IDL file: PointField_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import sensor_msgs
|
# import sensor_msgs
|
||||||
|
|
||||||
INT8_ = 1
|
INT8_ = 1
|
||||||
UINT8_ = 2
|
UINT8_ = 2
|
||||||
INT16_ = 3
|
INT16_ = 3
|
||||||
UINT16_ = 4
|
UINT16_ = 4
|
||||||
INT32_ = 5
|
INT32_ = 5
|
||||||
UINT32_ = 6
|
UINT32_ = 6
|
||||||
FLOAT32_ = 7
|
FLOAT32_ = 7
|
||||||
FLOAT64_ = 8
|
FLOAT64_ = 8
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs.msg.dds_.PointField_Constants
|
Module: sensor_msgs.msg.dds_.PointField_Constants
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ._PointField_ import FLOAT32_, FLOAT64_, INT16_, INT32_, INT8_, UINT16_, UINT32_, UINT8_
|
from ._PointField_ import FLOAT32_, FLOAT64_, INT16_, INT32_, INT8_, UINT16_, UINT32_, UINT8_
|
||||||
__all__ = ["FLOAT32_", "FLOAT64_", "INT16_", "INT32_", "INT8_", "UINT16_", "UINT32_", "UINT8_", ]
|
__all__ = ["FLOAT32_", "FLOAT64_", "INT16_", "INT32_", "INT8_", "UINT16_", "UINT32_", "UINT8_", ]
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs.msg.dds_
|
Module: sensor_msgs.msg.dds_
|
||||||
IDL file: PointCloud2_.idl
|
IDL file: PointCloud2_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import sensor_msgs
|
# import sensor_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import std_msgs.msg.dds_
|
# import std_msgs.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class PointCloud2_(idl.IdlStruct, typename="sensor_msgs.msg.dds_.PointCloud2_"):
|
class PointCloud2_(idl.IdlStruct, typename="sensor_msgs.msg.dds_.PointCloud2_"):
|
||||||
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_'
|
||||||
height: types.uint32
|
height: types.uint32
|
||||||
width: types.uint32
|
width: types.uint32
|
||||||
fields: types.sequence['unitree_sdk2py.idl.sensor_msgs.msg.dds_.PointField_']
|
fields: types.sequence['unitree_sdk2py.idl.sensor_msgs.msg.dds_.PointField_']
|
||||||
is_bigendian: bool
|
is_bigendian: bool
|
||||||
point_step: types.uint32
|
point_step: types.uint32
|
||||||
row_step: types.uint32
|
row_step: types.uint32
|
||||||
data: types.sequence[types.uint8]
|
data: types.sequence[types.uint8]
|
||||||
is_dense: bool
|
is_dense: bool
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs.msg.dds_
|
Module: sensor_msgs.msg.dds_
|
||||||
IDL file: PointField_.idl
|
IDL file: PointField_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import sensor_msgs
|
# import sensor_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class PointField_(idl.IdlStruct, typename="sensor_msgs.msg.dds_.PointField_"):
|
class PointField_(idl.IdlStruct, typename="sensor_msgs.msg.dds_.PointField_"):
|
||||||
name: str
|
name: str
|
||||||
offset: types.uint32
|
offset: types.uint32
|
||||||
datatype: types.uint8
|
datatype: types.uint8
|
||||||
count: types.uint32
|
count: types.uint32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: sensor_msgs.msg.dds_
|
Module: sensor_msgs.msg.dds_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import PointField_Constants
|
from . import PointField_Constants
|
||||||
from ._PointCloud2_ import PointCloud2_
|
from ._PointCloud2_ import PointCloud2_
|
||||||
from ._PointField_ import PointField_
|
from ._PointField_ import PointField_
|
||||||
__all__ = ["PointField_Constants", "PointCloud2_", "PointField_", ]
|
__all__ = ["PointField_Constants", "PointCloud2_", "PointField_", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: std_msgs
|
Module: std_msgs
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: std_msgs.msg
|
Module: std_msgs.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: std_msgs.msg.dds_
|
Module: std_msgs.msg.dds_
|
||||||
IDL file: Header_.idl
|
IDL file: Header_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import std_msgs
|
# import std_msgs
|
||||||
|
|
||||||
# if TYPE_CHECKING:
|
# if TYPE_CHECKING:
|
||||||
# import builtin_interfaces.msg.dds_
|
# import builtin_interfaces.msg.dds_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Header_(idl.IdlStruct, typename="std_msgs.msg.dds_.Header_"):
|
class Header_(idl.IdlStruct, typename="std_msgs.msg.dds_.Header_"):
|
||||||
stamp: 'unitree_sdk2py.idl.builtin_interfaces.msg.dds_.Time_'
|
stamp: 'unitree_sdk2py.idl.builtin_interfaces.msg.dds_.Time_'
|
||||||
frame_id: str
|
frame_id: str
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: std_msgs.msg.dds_
|
Module: std_msgs.msg.dds_
|
||||||
IDL file: String_.idl
|
IDL file: String_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import std_msgs
|
# import std_msgs
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class String_(idl.IdlStruct, typename="std_msgs.msg.dds_.String_"):
|
class String_(idl.IdlStruct, typename="std_msgs.msg.dds_.String_"):
|
||||||
data: str
|
data: str
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: std_msgs.msg.dds_
|
Module: std_msgs.msg.dds_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ._Header_ import Header_
|
from ._Header_ import Header_
|
||||||
from ._String_ import String_
|
from ._String_ import String_
|
||||||
__all__ = ["Header_", "String_", ]
|
__all__ = ["Header_", "String_", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api
|
Module: unitree_api
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg
|
Module: unitree_api.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: RequestHeader_.idl
|
IDL file: RequestHeader_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class RequestHeader_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestHeader_"):
|
class RequestHeader_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestHeader_"):
|
||||||
identity: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestIdentity_'
|
identity: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestIdentity_'
|
||||||
lease: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestLease_'
|
lease: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestLease_'
|
||||||
policy: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestPolicy_'
|
policy: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestPolicy_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: RequestIdentity_.idl
|
IDL file: RequestIdentity_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class RequestIdentity_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestIdentity_"):
|
class RequestIdentity_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestIdentity_"):
|
||||||
id: types.int64
|
id: types.int64
|
||||||
api_id: types.int64
|
api_id: types.int64
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: RequestLease_.idl
|
IDL file: RequestLease_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class RequestLease_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestLease_"):
|
class RequestLease_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestLease_"):
|
||||||
id: types.int64
|
id: types.int64
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: RequestPolicy_.idl
|
IDL file: RequestPolicy_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class RequestPolicy_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestPolicy_"):
|
class RequestPolicy_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestPolicy_"):
|
||||||
priority: types.int32
|
priority: types.int32
|
||||||
noreply: bool
|
noreply: bool
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: Request_.idl
|
IDL file: Request_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Request_(idl.IdlStruct, typename="unitree_api.msg.dds_.Request_"):
|
class Request_(idl.IdlStruct, typename="unitree_api.msg.dds_.Request_"):
|
||||||
header: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestHeader_'
|
header: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestHeader_'
|
||||||
parameter: str
|
parameter: str
|
||||||
binary: types.sequence[types.uint8]
|
binary: types.sequence[types.uint8]
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: ResponseHeader_.idl
|
IDL file: ResponseHeader_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class ResponseHeader_(idl.IdlStruct, typename="unitree_api.msg.dds_.ResponseHeader_"):
|
class ResponseHeader_(idl.IdlStruct, typename="unitree_api.msg.dds_.ResponseHeader_"):
|
||||||
identity: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestIdentity_'
|
identity: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestIdentity_'
|
||||||
status: 'unitree_sdk2py.idl.unitree_api.msg.dds_.ResponseStatus_'
|
status: 'unitree_sdk2py.idl.unitree_api.msg.dds_.ResponseStatus_'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: ResponseStatus_.idl
|
IDL file: ResponseStatus_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class ResponseStatus_(idl.IdlStruct, typename="unitree_api.msg.dds_.ResponseStatus_"):
|
class ResponseStatus_(idl.IdlStruct, typename="unitree_api.msg.dds_.ResponseStatus_"):
|
||||||
code: types.int32
|
code: types.int32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
IDL file: Response_.idl
|
IDL file: Response_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_api
|
# import unitree_api
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Response_(idl.IdlStruct, typename="unitree_api.msg.dds_.Response_"):
|
class Response_(idl.IdlStruct, typename="unitree_api.msg.dds_.Response_"):
|
||||||
header: 'unitree_sdk2py.idl.unitree_api.msg.dds_.ResponseHeader_'
|
header: 'unitree_sdk2py.idl.unitree_api.msg.dds_.ResponseHeader_'
|
||||||
data: str
|
data: str
|
||||||
binary: types.sequence[types.uint8]
|
binary: types.sequence[types.uint8]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.10.2
|
Cyclone DDS IDL version: v0.10.2
|
||||||
Module: unitree_api.msg.dds_
|
Module: unitree_api.msg.dds_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ._RequestHeader_ import RequestHeader_
|
from ._RequestHeader_ import RequestHeader_
|
||||||
from ._RequestIdentity_ import RequestIdentity_
|
from ._RequestIdentity_ import RequestIdentity_
|
||||||
from ._RequestLease_ import RequestLease_
|
from ._RequestLease_ import RequestLease_
|
||||||
from ._RequestPolicy_ import RequestPolicy_
|
from ._RequestPolicy_ import RequestPolicy_
|
||||||
from ._Request_ import Request_
|
from ._Request_ import Request_
|
||||||
from ._ResponseHeader_ import ResponseHeader_
|
from ._ResponseHeader_ import ResponseHeader_
|
||||||
from ._ResponseStatus_ import ResponseStatus_
|
from ._ResponseStatus_ import ResponseStatus_
|
||||||
from ._Response_ import Response_
|
from ._Response_ import Response_
|
||||||
__all__ = ["RequestHeader_", "RequestIdentity_", "RequestLease_", "RequestPolicy_", "Request_", "ResponseHeader_", "ResponseStatus_", "Response_", ]
|
__all__ = ["RequestHeader_", "RequestIdentity_", "RequestLease_", "RequestPolicy_", "Request_", "ResponseHeader_", "ResponseStatus_", "Response_", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go
|
Module: unitree_go
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import msg
|
from . import msg
|
||||||
__all__ = ["msg", ]
|
__all__ = ["msg", ]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg
|
Module: unitree_go.msg
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import dds_
|
from . import dds_
|
||||||
__all__ = ["dds_", ]
|
__all__ = ["dds_", ]
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: AudioData_.idl
|
IDL file: AudioData_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class AudioData_(idl.IdlStruct, typename="unitree_go.msg.dds_.AudioData_"):
|
class AudioData_(idl.IdlStruct, typename="unitree_go.msg.dds_.AudioData_"):
|
||||||
time_frame: types.uint64
|
time_frame: types.uint64
|
||||||
data: types.sequence[types.uint8]
|
data: types.sequence[types.uint8]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: BmsCmd_.idl
|
IDL file: BmsCmd_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class BmsCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.BmsCmd_"):
|
class BmsCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.BmsCmd_"):
|
||||||
off: types.uint8
|
off: types.uint8
|
||||||
reserve: types.array[types.uint8, 3]
|
reserve: types.array[types.uint8, 3]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: BmsState_.idl
|
IDL file: BmsState_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class BmsState_(idl.IdlStruct, typename="unitree_go.msg.dds_.BmsState_"):
|
class BmsState_(idl.IdlStruct, typename="unitree_go.msg.dds_.BmsState_"):
|
||||||
version_high: types.uint8
|
version_high: types.uint8
|
||||||
version_low: types.uint8
|
version_low: types.uint8
|
||||||
status: types.uint8
|
status: types.uint8
|
||||||
soc: types.uint8
|
soc: types.uint8
|
||||||
current: types.int32
|
current: types.int32
|
||||||
cycle: types.uint16
|
cycle: types.uint16
|
||||||
bq_ntc: types.array[types.uint8, 2]
|
bq_ntc: types.array[types.uint8, 2]
|
||||||
mcu_ntc: types.array[types.uint8, 2]
|
mcu_ntc: types.array[types.uint8, 2]
|
||||||
cell_vol: types.array[types.uint16, 15]
|
cell_vol: types.array[types.uint16, 15]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: Error_.idl
|
IDL file: Error_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Error_(idl.IdlStruct, typename="unitree_go.msg.dds_.Error_"):
|
class Error_(idl.IdlStruct, typename="unitree_go.msg.dds_.Error_"):
|
||||||
source: types.uint32
|
source: types.uint32
|
||||||
state: types.uint32
|
state: types.uint32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: Go2FrontVideoData_.idl
|
IDL file: Go2FrontVideoData_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class Go2FrontVideoData_(idl.IdlStruct, typename="unitree_go.msg.dds_.Go2FrontVideoData_"):
|
class Go2FrontVideoData_(idl.IdlStruct, typename="unitree_go.msg.dds_.Go2FrontVideoData_"):
|
||||||
time_frame: types.uint64
|
time_frame: types.uint64
|
||||||
video720p: types.sequence[types.uint8]
|
video720p: types.sequence[types.uint8]
|
||||||
video360p: types.sequence[types.uint8]
|
video360p: types.sequence[types.uint8]
|
||||||
video180p: types.sequence[types.uint8]
|
video180p: types.sequence[types.uint8]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: HeightMap_.idl
|
IDL file: HeightMap_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class HeightMap_(idl.IdlStruct, typename="unitree_go.msg.dds_.HeightMap_"):
|
class HeightMap_(idl.IdlStruct, typename="unitree_go.msg.dds_.HeightMap_"):
|
||||||
stamp: types.float64
|
stamp: types.float64
|
||||||
frame_id: str
|
frame_id: str
|
||||||
resolution: types.float32
|
resolution: types.float32
|
||||||
width: types.uint32
|
width: types.uint32
|
||||||
height: types.uint32
|
height: types.uint32
|
||||||
origin: types.array[types.float32, 2]
|
origin: types.array[types.float32, 2]
|
||||||
data: types.sequence[types.float32]
|
data: types.sequence[types.float32]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: IMUState_.idl
|
IDL file: IMUState_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class IMUState_(idl.IdlStruct, typename="unitree_go.msg.dds_.IMUState_"):
|
class IMUState_(idl.IdlStruct, typename="unitree_go.msg.dds_.IMUState_"):
|
||||||
quaternion: types.array[types.float32, 4]
|
quaternion: types.array[types.float32, 4]
|
||||||
gyroscope: types.array[types.float32, 3]
|
gyroscope: types.array[types.float32, 3]
|
||||||
accelerometer: types.array[types.float32, 3]
|
accelerometer: types.array[types.float32, 3]
|
||||||
rpy: types.array[types.float32, 3]
|
rpy: types.array[types.float32, 3]
|
||||||
temperature: types.uint8
|
temperature: types.uint8
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: InterfaceConfig_.idl
|
IDL file: InterfaceConfig_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class InterfaceConfig_(idl.IdlStruct, typename="unitree_go.msg.dds_.InterfaceConfig_"):
|
class InterfaceConfig_(idl.IdlStruct, typename="unitree_go.msg.dds_.InterfaceConfig_"):
|
||||||
mode: types.uint8
|
mode: types.uint8
|
||||||
value: types.uint8
|
value: types.uint8
|
||||||
reserve: types.array[types.uint8, 2]
|
reserve: types.array[types.uint8, 2]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,43 +1,43 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: LidarState_.idl
|
IDL file: LidarState_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class LidarState_(idl.IdlStruct, typename="unitree_go.msg.dds_.LidarState_"):
|
class LidarState_(idl.IdlStruct, typename="unitree_go.msg.dds_.LidarState_"):
|
||||||
stamp: types.float64
|
stamp: types.float64
|
||||||
firmware_version: str
|
firmware_version: str
|
||||||
software_version: str
|
software_version: str
|
||||||
sdk_version: str
|
sdk_version: str
|
||||||
sys_rotation_speed: types.float32
|
sys_rotation_speed: types.float32
|
||||||
com_rotation_speed: types.float32
|
com_rotation_speed: types.float32
|
||||||
error_state: types.uint8
|
error_state: types.uint8
|
||||||
cloud_frequency: types.float32
|
cloud_frequency: types.float32
|
||||||
cloud_packet_loss_rate: types.float32
|
cloud_packet_loss_rate: types.float32
|
||||||
cloud_size: types.uint32
|
cloud_size: types.uint32
|
||||||
cloud_scan_num: types.uint32
|
cloud_scan_num: types.uint32
|
||||||
imu_frequency: types.float32
|
imu_frequency: types.float32
|
||||||
imu_packet_loss_rate: types.float32
|
imu_packet_loss_rate: types.float32
|
||||||
imu_rpy: types.array[types.float32, 3]
|
imu_rpy: types.array[types.float32, 3]
|
||||||
serial_recv_stamp: types.float64
|
serial_recv_stamp: types.float64
|
||||||
serial_buffer_size: types.uint32
|
serial_buffer_size: types.uint32
|
||||||
serial_buffer_read: types.uint32
|
serial_buffer_read: types.uint32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: LowCmd_.idl
|
IDL file: LowCmd_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class LowCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.LowCmd_"):
|
class LowCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.LowCmd_"):
|
||||||
head: types.array[types.uint8, 2]
|
head: types.array[types.uint8, 2]
|
||||||
level_flag: types.uint8
|
level_flag: types.uint8
|
||||||
frame_reserve: types.uint8
|
frame_reserve: types.uint8
|
||||||
sn: types.array[types.uint32, 2]
|
sn: types.array[types.uint32, 2]
|
||||||
version: types.array[types.uint32, 2]
|
version: types.array[types.uint32, 2]
|
||||||
bandwidth: types.uint16
|
bandwidth: types.uint16
|
||||||
motor_cmd: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorCmd_', 20]
|
motor_cmd: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorCmd_', 20]
|
||||||
bms_cmd: 'unitree_sdk2py.idl.unitree_go.msg.dds_.BmsCmd_'
|
bms_cmd: 'unitree_sdk2py.idl.unitree_go.msg.dds_.BmsCmd_'
|
||||||
wireless_remote: types.array[types.uint8, 40]
|
wireless_remote: types.array[types.uint8, 40]
|
||||||
led: types.array[types.uint8, 12]
|
led: types.array[types.uint8, 12]
|
||||||
fan: types.array[types.uint8, 2]
|
fan: types.array[types.uint8, 2]
|
||||||
gpio: types.uint8
|
gpio: types.uint8
|
||||||
reserve: types.uint32
|
reserve: types.uint32
|
||||||
crc: types.uint32
|
crc: types.uint32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: LowState_.idl
|
IDL file: LowState_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class LowState_(idl.IdlStruct, typename="unitree_go.msg.dds_.LowState_"):
|
class LowState_(idl.IdlStruct, typename="unitree_go.msg.dds_.LowState_"):
|
||||||
head: types.array[types.uint8, 2]
|
head: types.array[types.uint8, 2]
|
||||||
level_flag: types.uint8
|
level_flag: types.uint8
|
||||||
frame_reserve: types.uint8
|
frame_reserve: types.uint8
|
||||||
sn: types.array[types.uint32, 2]
|
sn: types.array[types.uint32, 2]
|
||||||
version: types.array[types.uint32, 2]
|
version: types.array[types.uint32, 2]
|
||||||
bandwidth: types.uint16
|
bandwidth: types.uint16
|
||||||
imu_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.IMUState_'
|
imu_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.IMUState_'
|
||||||
motor_state: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorState_', 20]
|
motor_state: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorState_', 20]
|
||||||
bms_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.BmsState_'
|
bms_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.BmsState_'
|
||||||
foot_force: types.array[types.int16, 4]
|
foot_force: types.array[types.int16, 4]
|
||||||
foot_force_est: types.array[types.int16, 4]
|
foot_force_est: types.array[types.int16, 4]
|
||||||
tick: types.uint32
|
tick: types.uint32
|
||||||
wireless_remote: types.array[types.uint8, 40]
|
wireless_remote: types.array[types.uint8, 40]
|
||||||
bit_flag: types.uint8
|
bit_flag: types.uint8
|
||||||
adc_reel: types.float32
|
adc_reel: types.float32
|
||||||
temperature_ntc1: types.uint8
|
temperature_ntc1: types.uint8
|
||||||
temperature_ntc2: types.uint8
|
temperature_ntc2: types.uint8
|
||||||
power_v: types.float32
|
power_v: types.float32
|
||||||
power_a: types.float32
|
power_a: types.float32
|
||||||
fan_frequency: types.array[types.uint16, 4]
|
fan_frequency: types.array[types.uint16, 4]
|
||||||
reserve: types.uint32
|
reserve: types.uint32
|
||||||
crc: types.uint32
|
crc: types.uint32
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
"""
|
"""
|
||||||
Generated by Eclipse Cyclone DDS idlc Python Backend
|
Generated by Eclipse Cyclone DDS idlc Python Backend
|
||||||
Cyclone DDS IDL version: v0.11.0
|
Cyclone DDS IDL version: v0.11.0
|
||||||
Module: unitree_go.msg.dds_
|
Module: unitree_go.msg.dds_
|
||||||
IDL file: MotorCmd_.idl
|
IDL file: MotorCmd_.idl
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import cyclonedds.idl as idl
|
import cyclonedds.idl as idl
|
||||||
import cyclonedds.idl.annotations as annotate
|
import cyclonedds.idl.annotations as annotate
|
||||||
import cyclonedds.idl.types as types
|
import cyclonedds.idl.types as types
|
||||||
|
|
||||||
# root module import for resolving types
|
# root module import for resolving types
|
||||||
# import unitree_go
|
# import unitree_go
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@annotate.final
|
@annotate.final
|
||||||
@annotate.autoid("sequential")
|
@annotate.autoid("sequential")
|
||||||
class MotorCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.MotorCmd_"):
|
class MotorCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.MotorCmd_"):
|
||||||
mode: types.uint8
|
mode: types.uint8
|
||||||
q: types.float32
|
q: types.float32
|
||||||
dq: types.float32
|
dq: types.float32
|
||||||
tau: types.float32
|
tau: types.float32
|
||||||
kp: types.float32
|
kp: types.float32
|
||||||
kd: types.float32
|
kd: types.float32
|
||||||
reserve: types.array[types.uint32, 3]
|
reserve: types.array[types.uint32, 3]
|
||||||
|
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue