diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md
old mode 100755
new mode 100644
diff --git a/.chglog/config.yml b/.chglog/config.yml
old mode 100755
new mode 100644
diff --git a/.gitignore b/.gitignore
old mode 100755
new mode 100644
diff --git a/README _zh.md b/README _zh.md
deleted file mode 100755
index b81b4109..00000000
--- a/README _zh.md
+++ /dev/null
@@ -1,365 +0,0 @@
-[TOC]
-# Unitree 机器人ros2支持
-Unitree SDK2基于cyclonedds实现了一个易用的机器人数据通信机制,应用开发者可以利用这一接口实现机器人的数据通讯和指令控制(**支持Go2、B2和H1**)。 https://github.com/unitreerobotics/unitree_sdk2
-ROS2也使用DDS作为通讯工具,因此Go2、B2和H1机器人的底层可以兼容ros2,使用ros2自带的 msg 直接进行通讯和控制,而无需通过sdk接口转发。
-
-# 环境配置
-## 系统要求
-测试过的系统和ros2版本
-|系统|ros2 版本|
-|--|--|
-|Ubuntu 20.04|foxy|
-|Ubuntu 22.04|humble (推荐)|
-
-如果你想直接使用 `Docker` 开发环境,你可以参考 `.devcontainer` 文件夹中的 `Dockerfile` 相关内容。
-你也可以使用 VSCode 或其他 IDE 的 Dev Container 功能来创建一个开发环境,或者使用 `Github` 的 `codespace` 快速创建一个开发环境。
-如果你确实碰到了编译问题,可以参考 `.github/workflows/` 中的编译脚本,或者在 `issues` 中提问。
-
-## 安装 Unitree 机器人ros2功能包
-
-以下以ros2 foxy为例,如需要其他版本的ros2,在相应的地方替换foxy为当前的ros2版本名称即可:
-
-ROS2 foxy的安装可参考: https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
-
-ctrl+alt+T打开终端,克隆仓库:https://github.com/unitreerobotics/unitree_ros2
-```bash
-git clone https://github.com/unitreerobotics/unitree_ros2
-```
-其中
-- **cyclonedds_ws** 文件夹为编译和安装 Unitree 机器人ROS2 msg的工作空间,在子文件夹cyclonedds_ws/unitree/unitree_go和cyclonedds_ws/unitree/unitree_api中定义了机器人状态获取和控制相关的ros2 msg。
-- **example** 文件夹为 Unitree 机器人 ROS2 下的相关例程。
-
-
-## 安装 Unitree 机器人ros2功能包
-
-### 1. 安装依赖
-
-```bash
-sudo apt install ros-foxy-rmw-cyclonedds-cpp
-sudo apt install ros-foxy-rosidl-generator-dds-idl
-sudo apt install libyaml-cpp-dev
-```
-### 2. 编译cyclone-dds(如果使用 Humble 可跳过此步骤)
-由于 Unitree 机器人(sdk2 版本) 使用的是cyclonedds 0.10.2,因此需要先更改ROS2的dds实现。见:https://docs.ros.org/en/foxy/Concepts/About-Different-Middleware-Vendors.html
-
-编译cyclonedds前请确保在启动终端时**没有**自动source ros2相关的环境变量,否则会导致cyclonedds编译报错。如果安装ROS2时在~/.bashrc中添加了 " source /opt/ros/foxy/setup.bash ",需要修改 ~/.bashrc 文件将其删除:
-
-```bash
-sudo apt install gedit
-sudo gedit ~/.bashrc
-```
-在弹出的窗口中,注释掉ros2相关的环境变量,例如:
-```bash
-# source /opt/ros/foxy/setup.bash
-```
-在终端中执行以下操作编译cyclone-dds
-```bash
-cd ~/unitree_ros2/cyclonedds_ws/src
-#克隆cyclonedds仓库
-git clone https://github.com/ros2/rmw_cyclonedds -b foxy
-git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
-cd ..
-# 如果编译报错,尝试先运行:`export LD_LIBRARY_PATH=/opt/ros/foxy/lib`
-colcon build --packages-select cyclonedds #编译cyclonedds
-```
-
-
-
-### 3. 编译unitree_go和unitree_api功能包
-编译好 cyclone-dds 后就需要 ros2 相关的依赖来完成 Unitree 功能包的编译,因此编译前需要先 source ROS2 的环境变量。
-
-```bash
-source /opt/ros/foxy/setup.bash #source ROS2 环境变量
-colcon build #编译工作空间下的所有功能包
-```
-
-
-## 连接到机器人
-
-### 1. 配置网络
-
-使用网线连接 Unitree 机器人和计算机,使用 ifconfig 查看网络信息,确认机器人连接到的以太网网卡。(例如如图中的enp3s0,以实际为准)
-
-
-接着打开网络设置,找到机器人所连接的网卡,进入 IPv4 ,将 IPv4 方式改为手动,地址设置为192.168.123.99,子网掩码设置为255.255.255.0,完成后点击应用,等待网络重新连接。
-
-
-打开 setup.sh 文件
-
-```bash
-sudo gedit ~/unitree_ros2/setup.sh
-```
-bash 的内容如下:
-```bash
-#!/bin/bash
-echo "Setup unitree ros2 environment"
-source /opt/ros/foxy/setup.bash
-source $HOME/unitree_ros2/cyclonedds_ws/install/setup.bash
-export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-export CYCLONEDDS_URI='
-
- '
-```
-其中 "enp3s0" 为 Unitree 机器人所连接的网卡名称,根据实际情况修改为对应的网卡名称。在终端中执行:
-```bash
-source ~/unitree_ros2/setup.sh
-```
-即可完成 Unitree 机器人开发环境的设置。
-如果不希望每次打开新终端都执行一次 bash 脚本,也可将 `setup.sh` 中的内容写入到 ~/.bashrc中,但是当系统有多个ros环境共存需要注意。
-
-**补充:** 如果电脑没有连接到机器人,但仍希望能使用 unitree ros2 实现仿真等功能, 可以使用本地回环 "lo" 作为网卡
-```bash
-source ~/unitree_ros2/setup_local.sh # 使用 "lo" 作为网卡
-```
-或
-```bash
-source ~/unitree_ros2/setup_default.sh # 不指定网卡
-```
-
-
-
-### 2. 连接测试
-完成上述配置后,建议重启一下电脑再进行测试。
-确保机器人连接正确,打开终端输入:
-```bash
-source ~/unitree_ros2/setup.sh
-ros2 topic list
-```
-可以看见如下话题:
-
-
-打开终端输入ros2 topic echo /sportmodestate 后,可以看见该话题的数据如下图所示,说明机器人与电脑已经正常通讯:
-
-
-
-### 3. 编译和测试例程
-
-示例源代码位于 `/example/src/src`。
-- common:所有机器人的通用函数。
-- g1/low_level/g1_low_level_example:G1 的低级别控制
-- h1-2/low_level/low_level_ctrl_hg:H1-2 的低电平控制
-- low_level_ctrl:Go2/B2 的低级别控制
-- read_low_state:读取 Go2/B2 的低级别状态
-- read_low_state_hg:读取 G1/H1/H1-2 的低级别状态
-- read_motion_state:读取 Go2/B2 的运动模式状态
-- read_ wireless_controller:读取 G1/Go2/B2 的无线控制器状态
-- record_bag:Ros Bag 录制示例。
-- go2/go2_sport_client:Go2 的高级控制。
-- go2/go2_stand_example:Go2 的站立示例。
-- go2/go2_robot_state_client:的机器人状态示例。
-
-ctrl+alt+T打开终端,在终端中执行如下命令,编译测试例程:
-```bash
-source ~/unitree_ros2/setup.sh
-cd ~/unitree_ros2/example
-colcon build
-```
-编译完成后在终端中运行:
-```bash
-./install/unitree_ros2_example/bin/read_motion_state
-```
-可以看到终端中输出的机器人状态信息:
-```bash
-[INFO] [1697525196.266174885] [motion_state_suber]: Position -- x: 0.567083; y: 0.213920; z: 0.052338; body height: 0.320000
-[INFO] [1697525196.266230044] [motion_state_suber]: Velocity -- vx: -0.008966; vy: -0.001431; vz: -0.019455; yaw: -0.002131
-[INFO] [1697525196.266282725] [motion_state_suber]: Foot position and velcity relative to body -- num: 0; x: 0.204149; y: -0.145194; z: -0.067804, vx: 0.002683; vy: 0.003745; vz: -0.010052
-[INFO] [1697525196.266339057] [motion_state_suber]: Foot position and velcity relative to body -- num: 1; x: 0.204200; y: 0.145049; z: -0.068205, vx: -0.001954; vy: -0.003442; vz: -0.004828
-[INFO] [1697525196.266392028] [motion_state_suber]: Foot position and velcity relative to body -- num: 2; x: -0.183385; y: -0.159294; z: -0.039468, vx: -0.000739; vy: -0.002028; vz: -0.004532
-[INFO] [1697525196.266442766] [motion_state_suber]: Foot position and velcity relative to body -- num: 3; x: -0.182412; y: 0.159754; z: -0.039045, vx: -0.002803; vy: -0.001381; vz: -0.004794
-[INFO] [1697525196.316189064] [motion_state_suber]: Gait state -- gait type: 1; raise height: 0.090000
-```
-
-# 例程和使用
-Go2机器人底层采用与ROS2兼容的dds通信方式,当安装和配置好Unitree Go2 ROS2环境后,可以通过订阅ROS2的topic实现机器人状态的获取和指令控制。
-## 状态获取
-### 1. 高层状态获取
-高层状态为机器人的速度、位置、足端位置等与运动相关的状态。高层状态的获取可通过订阅"lf/sportmodestate"或"sportmodestate" topic 实现,其中"lf"表示低频率。高层状态的msg定义如下:
-```C++
-TimeSpec stamp //时间戳
-uint32 error_code //错误代码
-IMUState imu_state //IMU状态
-uint8 mode //运动模式
-/*
-运动模式
-0. idle, default stand
-1. balanceStand
-2. pose
-3. locomotion
-4. reserve
-5. lieDown
-6. jointLock
-7. damping
-8. recoveryStand
-9. reserve
-10. sit
-11. frontFlip
-12. frontJump
-13. frontPounc
-*/
-float32 progress //是否动作执行状态:0. dance false; 1. dance true
-uint8 gait_type //步态类型
-/*
-步态类型
-0.idle
-1.trot
-2.run
-3.climb stair
-4.forwardDownStair
-9.adjust
-*/
-float32 foot_raise_height //抬腿高度
-float32[3] position //当前位置
-float32 body_height //机体高度
-float32[3] velocity //线速度
-float32 yaw_speed //偏行速度
-float32[4] range_obstacle //障碍物范围
-int16[4] foot_force //足端力数值
-float32[12] foot_position_body //足端相对于机体的位置
-float32[12] foot_speed_body //足端相对于机体的速度
-```
-高层状态信息的具体解释可参考:https://support.unitree.com/home/zh/developer/sports_services
-
-读取高层状态的完整例程位于 /example/src/read_motion_state.cpp
-编译完例程后,在终端中运行./install/unitree_ros2_example/bin/read_motion_state,可查看运行结果。
-
-### 2. 低层状态获取
-低层状态为机器人的关节电机、电源信息等底层状态。通过订阅"lf/lowstate"或"lowstate" topic,可实现低层状态的获取。低层状态的msg定义如下:
-
-```C++
-uint8[2] head
-uint8 level_flag
-uint8 frame_reserve
-uint32[2] sn
-uint32[2] version
-uint16 bandwidth
-IMUState imu_state //IMU状态
-MotorState[20] motor_state //电机状态
-BmsState bms_state
-int16[4] foot_force //足端力数值
-int16[4] foot_force_est //估计的足端力
-uint32 tick
-uint8[40] wireless_remote
-uint8 bit_flag
-float32 adc_reel
-int8 temperature_ntc1
-int8 temperature_ntc2
-float32 power_v //电池电压
-float32 power_a //电池电流
-uint16[4] fan_frequency
-uint32 reserve
-uint32 crc
-```
-其中MotorState为关节电机的状态信息,其定义如下:
-```C++
-uint8 mode //运动模式
-float32 q //当前角度
-float32 dq //当前角速度
-float32 ddq //当前角加速度
-float32 tau_est //估计的外力
-float32 q_raw //当前角度原始数值
-float32 dq_raw //当前角速度原始数值
-float32 ddq_raw //当前角加速度原始数值
-int8 temperature //温度
-uint32 lost
-uint32[2] reserve
-```
-低层状态信息的具体解释可参考: https://support.unitree.com/home/zh/developer/Basic_services
-读取低层状态的完整例程序位于:example/src/read_low_state.cpp
-在终端中运行./install/unitree_ros2_example/bin/read_low_state,可查看低层状态获取例程的运行结果。
-
-### 3. 遥控器状态获取
-通过订阅"/wirelesscontroller" topic可获取遥控器的摇杆数值和按键键值。遥控器状态的msg定义如下
-
-```C++
-float32 lx //左边摇杆x
-float32 ly //左边摇杆y
-float32 rx //右边摇杆x
-float32 ry //右边摇杆y
-uint16 keys //键值
-```
-遥控器状态和遥控器键值的相关定义可参考:https://support.unitree.com/home/zh/developer/Get_remote_control_status
-
-读取遥控器状态的完整例程序见:example/src/read_wireless_controller.cpp
-在终端中运行./install/unitree_ros2_example/bin/read_low_state,可查看遥控器状态获取例程的运行结果。
-
-## 机器人控制
-### 1. 运动控制
-Go2机器人的运动指令是通过请求响应的方式实现的,通过订阅"/api/sport/request",并发送运动unitree_api::msg::Request消息可以实现高层的运动控制。其中不同运动接口的Request消息可调用SportClient(位于/example/src/common/ros2_sport_client.cpp)类来获取,例如实现Go2的姿态控制:
-```C++
- //创建一个ros2 pubilsher
-rclcpp::Publisher::SharedPtr req_puber = this->create_publisher("/api/sport/request", 10);
-
-SportClient sport_req;//实例化一个sportclient
-unitree_api::msg::Request req; //创建一个运动请求msg
-sport_req.Euler(req,roll,pitch,yaw); //获取欧拉角运动请求消息,并赋值给req
-
-req_puber->publish(req); //发布数据
-```
-关于SportClient运动控制接口的具体解释可参考:https://support.unitree.com/home/zh/developer/sports_services
-
-高层运动控制的完整例程位于:example/src/sport_mode_ctrl.cpp
-在终端中运行./install/unitree_ros2_example/bin/sport_mode_ctrl,等待1s后,机器人会沿着x方向来回走动。
-
-
-### 2. 电机控制
-通过订阅"/lowcmd" topic,并发送unitree_go::msg::LowCmd可以实现对电机的力矩、位置、和速度控制。底层控制指令的msg定义如下:
-
-```C++
-uint8[2] head
-uint8 level_flag
-uint8 frame_reserve
-uint32[2] sn
-uint32[2] version
-uint16 bandwidth
-MotorCmd[20] motor_cmd //电机指令
-BmsCmd bms_cmd
-uint8[40] wireless_remote
-uint8[12] led
-uint8[2] fan
-uint8 gpio
-uint32 reserve
-uint32 crc
-```
-其中motor_cmd为电机指令:
-```C++
-uint8 mode; //电机控制模式(Foc模式(工作模式)-> 0x01 ,stop模式(待机模式)-> 0x00
-float q; //关节目标位置
-float dq; //关节目标速度
-float tau; //关节目标力矩
-float kp; //关节刚度系数
-float kd; //关节阻尼系数
-unsigned long reserve[3]; //保留位
-```
-低层指令的具体解释可参考:https://support.unitree.com/home/zh/developer/Basic_services
-
-电机控制的完整例程见example/src/low_level_ctrl.cpp,编译后在终端执行./install/unitree_ros2_example/bin/sport_mode_ctrl,左后腿的机身电机和小腿电机会转动到对应关节角度。
-
-## Rviz 可视化
-由于Go2机器人底层兼容了ROS2的topic机制,因此可以使用rviz工具来可视化Go2机器人的状态信息。下面以查看机器人的点云数据为例:
-首先列出所有 topic:
-```bash
-ros2 topic list
-```
-
-
-可以找到雷达点云的 topic:
-```bash
-utlidar/cloud
-```
-接着查看点云的frame_id:
-```
-ros2 topic echo --no-arr /utlidar/cloud
-```
-可以看到点云数据的frame_id为utlidar_lidar
-
-
-最后打开rviz2:
-```
-ros2 run rviz2 rviz2
-```
-在rviz2添加Go2点云topic: utlidar/cloud。修改world_frame为utlidar_lidar即可看到雷达输出的点云。
-
-
-
-
-
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
index af6782b2..21ff267f
--- a/README.md
+++ b/README.md
@@ -1,372 +1,226 @@
-Unitree robot ROS2 support
+# Unitree ROS2 support
[TOC]
-# Introduction
-Unitree SDK2 implements an easy-to-use robot communication mechanism based on Cyclonedds, which enable developers to achieve robot communication and control (**Supports Unitree Go2, B2, and H1**). See: https://github.com/unitreerobotics/unitree_sdk2
+## Introduction
-DDS is alos used in ROS2 as a communication mechanism. Therefore, the underlying layers of Unitree Go2, B2, and H1 robots can be compatible with ROS2. ROS2 msg can be direct used for communication and control of Unitree robot without wrapping the SDK interface.
+[Unitree SDK2](https://github.com/unitreerobotics/unitree_sdk2) implements an
+easy-to-use robot communication mechanism based on cyclonedds, which enable
+developers to achieve robot communication and control. It supports the Unitree
+go2/w, B2, and H1 robots.
+
+[DDS](https://www.dds-foundation.org/what-is-dds-3) is also used by ROS2 as a
+communication background. Therefore, the underlying layers of the Unitree
+go2/w, B2, and H1 robots can be made compatible and ROS2 messages can be used
+for communication and control without directly wrapping the Unitree SDK2.
+
+This repository implements a compatibility layer for such purpose.
-# Configuration
## System requirements
-Tested systems and ROS2 distro
-|systems|ROS2 distro|
+
+Tested systems and ROS2 distros:
+
+| systems | ROS2 distro |
|--|--|
|Ubuntu 20.04|foxy|
-|Ubuntu 22.04|humble (recommend)|
+|Ubuntu 22.04|humble (recommended)|
+|Ubuntu 24.04|jazzy|
-If you want to directly use the `Docker development environment`, you can refer to the `Dockerfile` related content in the `.devcontainer` folder.
-You can also use the `Dev Container feature of VSCode` or other IDEs to create a development environment, or use `Github's codespace` to quickly create a development environment.
-If you do encounter compilation issues, you can refer to the compilation scripts in `. github/workflows/` or ask questions in `issues`.
+If you want to use the Docker container environment, you can refer to the
+`Dockerfile` related content in the `.devcontainer` folder. Another options is
+to use the Dev Container feature of VSCode or other IDEs to create a
+development environment, or use Github's codespace to quickly create one. If
+you encounter problems while compiling, refer to the compilation scripts in
+`.github/workflows` for guidance.
-##Install Unitree Robot Ros2 Feature Pack
+## Installation
-Taking ROS2 foxy as an example, if you need another version of ROS2, replace "foxy" with the current ROS2 version name in the corresponding place:
+### Installing ROS2 foxy
-The installation of ROS2 foxy can refer to: https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
+(Replace "$ROS_DISTRO" with the current ROS2 version name in the corresponding
+places).
-ctrl+alt+T open the terminal, clone the repository: https://github.com/unitreerobotics/unitree_ros2
+Install ROS2 following the [official
+documentation](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html)
+instructions.
+
+### Installing the unitree_ros2 package
+
+#### 1. Clone the repository
+
+Once ROS2 is installed, open a terminal and clone the repository:
```bash
git clone https://github.com/unitreerobotics/unitree_ros2
```
-where:
-- **cyclonedds_ws**: The workspace of Unitree ros2 package. The msg for Unitree robot are supplied in the subfolder cyclonedds_ws/unitree/unitree_go and cyclonedds_ ws/unitree/unitree_api.
-- **example**: The workspace of some examples.
+containing the following ROS2 workspaces:
+
+- **cyclonedds_ws**: The workspace of Unitree ROS2 package. The msg for Unitree
+ robot are supplied in the subfolder cyclonedds_ws/unitree/unitree_go and
+ cyclonedds_ ws/unitree/unitree_api.
+- **example_ws**: The workspace of a few examples.
-## Install Unitree ROS2 package
+#### 2. Install dependencies
-### 1. Dependencies
```bash
-sudo apt install ros-foxy-rmw-cyclonedds-cpp
-sudo apt install ros-foxy-rosidl-generator-dds-idl
-sudo apt install libyaml-cpp-dev
+sudo apt install build-dep ros-$ROS_DISTRO-cyclonedds
+sudo apt install ros-$ROS_DISTRO-rosidl-generator-dds-idl libyaml-cpp-dev
```
-### 2. Compile cyclone dds (If using Humble, this step can be skipped)
-The cyclonedds version of Unitree robot is 0.10.2. To communicate with Unitree robots using ROS2, it is necessary to change the dds implementation. See:https://docs.ros.org/en/foxy/Concepts/About-Different-Middleware-Vendors.html
+#### 3. Compile cyclonedds
-Before compiling cyclonedds, please ensure that ros2 environment has **NOT** been sourced when starting the terminal. Otherwise, it may cause errors in compilation.
+(If using humble+, this step can be skipped - just install
+`ros-$ROS_DISTRO-rmw-cyclonedds-cpp` with `apt`)
-If "source/opt/ros/foxy/setup. bash" has been added to the ~/.bashrc file when installing ROS2, it needs to be commented out:
+The cyclonedds version installed on the Unitree robot's embedded computers is
+0.10.2. To communicate with a Unitree robot using ROS2, it is necessary to
+[change the default DDS
+implementation](https://docs.ros.org/en/$ROS_DISTRO/Concepts/About-Different-Middleware-Vendors.html)
+
+Before compiling cyclonedds, please ensure that ros2 environment has **NOT**
+been sourced when starting the terminal. -- it may cause errors upon
+compilation -- if `source/opt/ros/$ROS_DISTRO/setup.bash` has been added to the
+~/.bashrc file when installing ROS2, it needs to be commented out:
```bash
sudo apt install gedit
sudo gedit ~/.bashrc
```
+
```bash
-# source /opt/ros/foxy/setup.bash
+# source /opt/ros/$ROS_DISTRO/setup.bash
```
+Then compile cyclonedds:
-Compile cyclone-dds
```bash
cd ~/unitree_ros2/cyclonedds_ws/src
-git clone https://github.com/ros2/rmw_cyclonedds -b foxy
+git clone https://github.com/ros2/rmw_cyclonedds -b $ROS_DISTRO
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
cd ..
-# If build failed, try run: `export LD_LIBRARY_PATH=/opt/ros/foxy/lib` first.
-colcon build --packages-select cyclonedds #Compile cyclone-dds package
+
+# If the build process failed, try running `export LD_LIBRARY_PATH=/opt/ros/$ROS_DISTRO/lib` first.
+colcon build --symlink-install --packages-select cyclonedds
```
-### 3. Compile unitree_go and unitree_api packages
-After compiling cyclone-dds, ROS2 dependencies is required for compilation of the unitree_go and unitree_api packages. Therefore, before compiling, it is necessary to source the environment of ROS2.
+#### 4. Compile the unitree_ros2 packages
+
+After compiling cyclonedds, a few ROS2 dependencies are required for compiling
+the `unitree_api`, `unitree_go` and `unitree_hg` packages on the
+`cyclonedds_ws` workspace, so make sure to source the environment of ROS2
+before compiling the packages:
+
```bash
-source /opt/ros/foxy/setup.bash # source ROS2 environment
-colcon build # Compile all packages in the workspace
+source /opt/ros/$ROS_DISTRO/setup.bash
+colcon build --symlink-install
```
-## Connect to Unitree robot
+## Robot connection
### 1. Network configuration
-Connect Unitree robot and the computer using Ethernet cable. Then, use ifconfig to view the network interface that the robot connected. For example, "enp3s0" in the following figure.
-
-Next, open the network settings, find the network interface that the robot connected.In IPv4 setting, change the IPv4 mode to manual, set the address to 192.168.123.99, and set the mask to 255.255.255.0. After completion, click apply and wait for the network to reconnect.
-
+You need to setup a static network connection. Connect the Unitree
+robot and the computer using an ethernet cable. Use `ifconfig` or `ip link` to
+view check the network interface the robot is connected to.
+
+Then configure a static IPv4 connection on that interface - change the IPv4 mode
+to manual and set the address and network mask accordingly to the robot model:
+
+| Unitree robot | address/mask |
+| ------------- | ----------------- |
+| go2 | 192.168.123.99/24 |
+| go2w | 192.168.123.51/24 |
+
+Finally, setup the ROS2 environment:
-Open setup.sh file.
-```bash
-sudo gedit ~/unitree_ros2/setup.sh
-```
```bash
-#!/bin/bash
-echo "Setup unitree ros2 environment"
-source /opt/ros/foxy/setup.bash
+source /opt/ros/$ROS_DISTRO/setup.bash
source $HOME/unitree_ros2/cyclonedds_ws/install/setup.bash
-export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-export CYCLONEDDS_URI='
-
- '
```
-where "enp3s0" is the network interface name of unitree robot connected.
-Modify it to the corresponding network interface according to the actual situation.
-Source the environment to setup the ROS2 support of Unitree robot:
-```bash
-source ~/unitree_ros2/setup.sh
-```
-If you don't want to source the bash script every time when a new terminal opens, you can write the content of bash script into ~/.bashrc, but attention should be paid when there are multiple ROS environments coexisting in the system.
+And export the `RWM_IMPLEMENTATION` and `CYCLONE_DDS_URI` environment variables:
-If your computer is not connected to the robot but you still want to use Unitree ROS2 for simulation and other functions, you can use the local loopback "lo" as the network interface.
```bash
-source ~/unitree_ros2/setup_local.sh # use "lo" as the network interface
-```
-or
-```bash
-source ~/unitree_ros2/setup_default.sh # No network network interface specified
+export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
+export CYCLONEDDS_URI='
+
+
+
+
+
+
+
+'
```
+substituting "enXXXX" with the configured ethernet network interface name.
-### 2. Connect and test
-After completing the above configuration, it is recommended to restart the computer before conducting the test.
+The `setup.sh` bash script will attempt to configure the first en* interface
+found by `ip link` automatically:
-Ensure that the network of robot is connected correctly, open a terminal and input:
```bash
source ~/unitree_ros2/setup.sh
-ros2 topic list
```
-You can see the following topics:
-
-Input ros2 topic echo /sportmodestate,you can see the data of the topic as shown in the following figure:
-
+If you don't want to source the bash script every time when a new terminal
+opens, you can write the content of bash script into `~/.bashrc`, but pay
+attention when there are multiple ROS environments coexisting on your system.
+If your computer is not connected to the robot but you still want to use the
+packages on a simulated environment, you can use the local loopback `lo` as
+the network interface:
-### 3. Examples
-
-The source code of examples locates at `/example/src/src`.
-- common: Common functions for all robots.
-- g1/lowlevel/g1_low_level_example: Low level control for G1
-- h1-2/lowlevel/low_level_ctrl_hg: Low level control for H1-2
-- low_level_ctrl: Low level control for Go2/B2
-- read_low_state: Read the low state from Go2/B2
-- read_low_state_hg: Read the low state from G1/H1/H1-2
-- read_motion_state: Read the sport mode state from Go2/B2
-- read_ wireless_controller: Read the state of wireless controller from G1/Go2/B2
-- record_bag: Ros bag recording example.
-- go2/go2_sport_client: High level control for Go2.
-- go2/go2_stand_example: Stand example for Go2.
-- go2/go2_robot_state_client:Robot State Example for Go2。
-
-Open a terminal and input:
```bash
-source ~/unitree_ros2/setup.sh
-cd ~/unitree_ros2/example
-colcon build
+source ~/unitree_ros2/setup_local.sh
```
-After compilation, run in the terminal:
-```bash
-./install/unitree_ros2_example/bin/read_motion_state
-```
-You can see the robot status information output from the terminal:
-```bash
-[INFO] [1697525196.266174885] [motion_state_suber]: Position -- x: 0.567083; y: 0.213920; z: 0.052338; body height: 0.320000
-[INFO] [1697525196.266230044] [motion_state_suber]: Velocity -- vx: -0.008966; vy: -0.001431; vz: -0.019455; yaw: -0.002131
-[INFO] [1697525196.266282725] [motion_state_suber]: Foot position and velcity relative to body -- num: 0; x: 0.204149; y: -0.145194; z: -0.067804, vx: 0.002683; vy: 0.003745; vz: -0.010052
-[INFO] [1697525196.266339057] [motion_state_suber]: Foot position and velcity relative to body -- num: 1; x: 0.204200; y: 0.145049; z: -0.068205, vx: -0.001954; vy: -0.003442; vz: -0.004828
-[INFO] [1697525196.266392028] [motion_state_suber]: Foot position and velcity relative to body -- num: 2; x: -0.183385; y: -0.159294; z: -0.039468, vx: -0.000739; vy: -0.002028; vz: -0.004532
-[INFO] [1697525196.266442766] [motion_state_suber]: Foot position and velcity relative to body -- num: 3; x: -0.182412; y: 0.159754; z: -0.039045, vx: -0.002803; vy: -0.001381; vz: -0.004794
-[INFO] [1697525196.316189064] [motion_state_suber]: Gait state -- gait type: 1; raise height: 0.090000
-```
+or simply don't specify a network interface:
-# Usage
-## State acquisition
-### 1. Sportmode state
-Sportmode state includes position, velcity, foot position, and other motion states of the robot. The acquisition of sportmode state can be achieved by subscribing "lf/sportmodestate" or "sportmodestate" topic, where "lf" represents low frequency. The msg of sportmodestate is defined as:
-
-```C++
-TimeSpec stamp // Time stamp
-uint32 error_code //Error code
-IMUState imu_state //IMU state
-uint8 mode //Sport mode
-/*
-Sport mode
-0. idle, default stand
-1. balanceStand
-2. pose
-3. locomotion
-4. reserve
-5. lieDown
-6. jointLock
-7. damping
-8. recoveryStand
-9. reserve
-10. sit
-11. frontFlip
-12. frontJump
-13. frontPounc
-*/
-float32 progress //Is the dance action being executed?:0. dance false; 1. dance true
-uint8 gait_type //Gait type
-/*
-Gait type
-0.idle
-1.trot
-2.run
-3.climb stair
-4.forwardDownStair
-9.adjust
-*/
-float32 foot_raise_height
-float32[3] position
-float32 body_height
-float32[3] velocity
-float32 yaw_speed
-float32[4] range_obstacle
-int16[4] foot_force
-float32[12] foot_position_body //foot positions in body frame
-float32[12] foot_speed_body //foot velcities in body frame
-```
-For details, see:https://support.unitree.com/home/en/developer/sports_services.
-
-Complete examples is in /example/src/read_motion_state.cpp. Run in the terminal:
```bash
-./install/unitree_ros2_example/bin/read_motion_state
-```
-
-### 2. Low-level state
-The low-level state includes motors states, power information, and other low level states. Low-level states can be obtained by subscribing "lf/lowstate" or "lowstate" topic. The lowstate msg is defined as:
-
-```C++
-uint8[2] head
-uint8 level_flag
-uint8 frame_reserve
-uint32[2] sn
-uint32[2] version
-uint16 bandwidth
-IMUState imu_state //IMU
-MotorState[20] motor_state //Motor state
-BmsState bms_state
-int16[4] foot_force
-int16[4] foot_force_est
-uint32 tick
-uint8[40] wireless_remote
-uint8 bit_flag
-float32 adc_reel
-int8 temperature_ntc1
-int8 temperature_ntc2
-float32 power_v
-float32 power_a
-uint16[4] fan_frequency
-uint32 reserve
-uint32 crc
-```
-where MotorState are defined as:
-```C++
-uint8 mode // Mode, 0x01 for control
-float32 q // Joint angle
-float32 dq // Joint velocity
-float32 ddq // Joint acceleration
-float32 tau_est // Estimated torque
-float32 q_raw //raw data of q
-float32 dq_raw //raw data of dq
-float32 ddq_raw //raw data of dq
-int8 temperature
-uint32 lost
-uint32[2] reserve
+source ~/unitree_ros2/setup_default.sh
```
-For details, see: https://support.unitree.com/home/en/developer/Basic_services
-Complete examples is in example/src/read_low_state.cpp.
-### 3. Wireless controller
+### 2. Testing
-Wireless controller state can be obtained by subscribing "/wirelesscontroller" topic. The wirelesscontroller msg is defiened as:
+After completing the above configuration, ensure that the robot's network
+connection is up, open a terminal and input:
-```C++
-float32 lx // left joystick x, range [-1.0~1.0]
-float32 ly // left joystick y, range [-1.0~1.0]
-float32 rx // right joystick x, range [-1.0~1.0]
-float32 ry // right joystick y, range [-1.0~1.0]
-uint16 keys // key values
+```bash
+ros2 topic list
```
-For details, see: https://support.unitree.com/home/en/developer/Get_remote_control_status
-
-Complete examples is in example/src/read_wireless_controller.cpp.
-
-
-## Robot control
-### 1. Sportmode
-Sportmode control is implemented by request/response mechanism. Sportmode control can be achieved by sending unitree_api::msg::Request msg to the "/api/sport/request" topic.
-The Request msg for different sportmode interfaces can be obtained by the SportClient (/example/src/common/ros2_sport_client.cpp) class. For example, control the robot to reach a desired attitude:
-```C++
- //Create a ros2 pubilsher
-rclcpp::Publisher::SharedPtr req_puber = this->create_publisher("/api/sport/request", 10);
+and you should see an extensive topic list. Input `ros2 topic echo /lowstate`
+to verify topic messages being published.
-SportClient sport_req; //Sportclient
-unitree_api::msg::Request req; //Sportmode request msg
-sport_req.Euler(req,roll,pitch,yaw); //Get Sportmode request msg from Sportclient
-
-req_puber->publish(req); // Publish request msg
-```
-For details about SportClient:https://support.unitree.com/home/en/developer/sports_services
-
-Complete examples is in:example/src/sport_mode_ctrl.cpp. Run ./install/unitree_ros2_example/bin/sport_mode_ctrl in terminal. After 1 second of program startup, the robot will walk back and forth in the x direction.
-
-
-### 2. Motor control
-The torque, position and velocity control of motor can be implemented by subscribing "/lowcmd" topic and sending unitree_go::msg::LowCmd msg. LowCmd msg is defined as:
-```C++
-uint8[2] head
-uint8 level_flag
-uint8 frame_reserve
-uint32[2] sn
-uint32[2] version
-uint16 bandwidth
-MotorCmd[20] motor_cmd //motor command
-BmsCmd bms_cmd
-uint8[40] wireless_remote
-uint8[12] led
-uint8[2] fan
-uint8 gpio
-uint32 reserve
-uint32 crc
-```
-where motor_cmd is defined as:
-```C++
-uint8 mode; //Mode(Foc mode -> 0x01 ,stop mode -> 0x00)
-float q; //Target position (rad)
-float dq; //Target velocity (rad/s)
-float tau; //Target torque (N.M)
-float kp;
-float kd;
-unsigned long reserve[3];
-```
-For details about low_cmd:https://support.unitree.com/home/en/developer/Basic_services
+### 3. Examples
-Complete examples is in:example/src/low_level_ctrl.cpo. Run ./install/unitree_ros2_example/bin/sport_mode_ctrl in terminal. The hip motor and calf motor of the RL leg will rotate to the corresponding joint angle.
+The source code of the supplied examples can be found on `/example_ws/src/src`:
-## Rviz
-We can also use rviz to visualize Unitree robot data.The following is an example of visualizing robot lidar data:
+| subdirectory | description | supported robots
+|--|--|--|
+| common | Common functions | all |
+| g1/lowlevel/g1_low_level_example | Low-level control | G1 |
+| h1-2/lowlevel/low_level_ctrl_hg | Low-level control | H1-2 |
+| low_level_ctrl | Low-level control | go2/w and B2 |
+| read_low_state | Read the low-level state | go2/w and B2 |
+| read_low_state_hg | Read the low-level state | G1 and H1-2 |
+| read_motion_state | Read the motion state | go2/w and B2 |
+| read_wireless_controller | Read the wireless controller input | G1, go2/w and B2 |
+| record_bag | ros2 bag recording example | all |
+| go2/go2_sport_client | High-level sportmode control | go2/w |
+| go2/go2_stand_example | Robot standing example | go2/w |
+| go2/go2_robot_state_client | Robot state client example | go2/w |
-Firstly, list all topics:
-```bash
-ros2 topic list
-```
-
+Open a terminal, setup the ROS2 environment and input:
-We can find the topic of lida:
```bash
-utlidar/cloud
-```
-Then, echo frame_id of lidar:
+cd ~/unitree_ros2/example_ws
+colcon build --symlink-install
```
-ros2 topic echo --no-arr /utlidar/cloud
-```
-where frame_id: utlidar_lidar
-
-
-Finally, run rviz:
-```
-ros2 run rviz2 rviz2
-```
-Add Pointcloud topic: utlidar/cloud in rviz2 and modify Fixed frame to utlidar_lidar. Then, the lidar data is displayed in rviz2.
-
-
-
+to compile the examples.
+## Usage
+[TODO]
diff --git a/cyclonedds_ws/cyclonedds.xml b/cyclonedds_ws/cyclonedds.xml
new file mode 100644
index 00000000..78d14941
--- /dev/null
+++ b/cyclonedds_ws/cyclonedds.xml
@@ -0,0 +1,10 @@
+
+
+
+ spdp
+
+
+
+
+
+
diff --git a/cyclonedds_ws/src/cyclonedds.xml b/cyclonedds_ws/src/cyclonedds.xml
deleted file mode 100755
index 3932e621..00000000
--- a/cyclonedds_ws/src/cyclonedds.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/cyclonedds_ws/src/unitree/unitree_api/CMakeLists.txt b/cyclonedds_ws/src/unitree/unitree_api/CMakeLists.txt
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/Request.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/Request.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/RequestHeader.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/RequestHeader.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/RequestIdentity.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/RequestIdentity.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/RequestLease.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/RequestLease.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/RequestPolicy.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/RequestPolicy.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/Response.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/Response.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/ResponseHeader.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/ResponseHeader.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/msg/ResponseStatus.msg b/cyclonedds_ws/src/unitree/unitree_api/msg/ResponseStatus.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_api/package.xml b/cyclonedds_ws/src/unitree/unitree_api/package.xml
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/CMakeLists.txt b/cyclonedds_ws/src/unitree/unitree_go/CMakeLists.txt
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/AudioData.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/AudioData.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/BmsCmd.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/BmsCmd.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/BmsState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/BmsState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/Error.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/Error.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/Go2FrontVideoData.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/Go2FrontVideoData.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/HeightMap.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/HeightMap.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/IMUState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/IMUState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/InterfaceConfig.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/InterfaceConfig.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/LidarState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/LidarState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/LowCmd.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/LowCmd.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/LowState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/LowState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/MotorCmd.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/MotorCmd.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/MotorState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/MotorState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/PathPoint.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/PathPoint.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/Req.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/Req.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/Res.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/Res.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/SportModeCmd.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/SportModeCmd.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/SportModeState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/SportModeState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/TimeSpec.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/TimeSpec.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/UwbState.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/UwbState.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/UwbSwitch.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/UwbSwitch.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/msg/WirelessController.msg b/cyclonedds_ws/src/unitree/unitree_go/msg/WirelessController.msg
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_go/package.xml b/cyclonedds_ws/src/unitree/unitree_go/package.xml
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_hg/CMakeLists.txt b/cyclonedds_ws/src/unitree/unitree_hg/CMakeLists.txt
old mode 100755
new mode 100644
diff --git a/cyclonedds_ws/src/unitree/unitree_hg/package.xml b/cyclonedds_ws/src/unitree/unitree_hg/package.xml
old mode 100755
new mode 100644
diff --git a/docs/image/piFtdF1.png b/docs/image/piFtdF1.png
deleted file mode 100644
index 01107fa7..00000000
Binary files a/docs/image/piFtdF1.png and /dev/null differ
diff --git a/docs/image/piFtsyD.png b/docs/image/piFtsyD.png
deleted file mode 100644
index 6a7c1a6b..00000000
Binary files a/docs/image/piFtsyD.png and /dev/null differ
diff --git a/docs/image/piFtteJ.png b/docs/image/piFtteJ.png
deleted file mode 100644
index 5569a111..00000000
Binary files a/docs/image/piFtteJ.png and /dev/null differ
diff --git a/docs/image/piFtyOe.png b/docs/image/piFtyOe.png
deleted file mode 100644
index 46e4aa05..00000000
Binary files a/docs/image/piFtyOe.png and /dev/null differ
diff --git a/example/src/CMakeLists.txt b/example_ws/src/CMakeLists.txt
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/CMakeLists.txt
rename to example_ws/src/CMakeLists.txt
diff --git a/example/src/include/b2/b2_motion_switch_client.hpp b/example_ws/src/include/b2/b2_motion_switch_client.hpp
similarity index 100%
rename from example/src/include/b2/b2_motion_switch_client.hpp
rename to example_ws/src/include/b2/b2_motion_switch_client.hpp
diff --git a/example/src/include/common/b2_base_client.hpp b/example_ws/src/include/common/b2_base_client.hpp
similarity index 100%
rename from example/src/include/common/b2_base_client.hpp
rename to example_ws/src/include/common/b2_base_client.hpp
diff --git a/example/src/include/common/base_client.hpp b/example_ws/src/include/common/base_client.hpp
similarity index 100%
rename from example/src/include/common/base_client.hpp
rename to example_ws/src/include/common/base_client.hpp
diff --git a/example/src/include/common/motor_crc.h b/example_ws/src/include/common/motor_crc.h
similarity index 100%
rename from example/src/include/common/motor_crc.h
rename to example_ws/src/include/common/motor_crc.h
diff --git a/example/src/include/common/motor_crc_hg.h b/example_ws/src/include/common/motor_crc_hg.h
similarity index 100%
rename from example/src/include/common/motor_crc_hg.h
rename to example_ws/src/include/common/motor_crc_hg.h
diff --git a/example/src/include/common/patch.hpp b/example_ws/src/include/common/patch.hpp
similarity index 100%
rename from example/src/include/common/patch.hpp
rename to example_ws/src/include/common/patch.hpp
diff --git a/example/src/include/common/ros2_b2_sport_client.h b/example_ws/src/include/common/ros2_b2_sport_client.h
similarity index 100%
rename from example/src/include/common/ros2_b2_sport_client.h
rename to example_ws/src/include/common/ros2_b2_sport_client.h
diff --git a/example/src/include/common/ros2_robot_state_client.h b/example_ws/src/include/common/ros2_robot_state_client.h
similarity index 100%
rename from example/src/include/common/ros2_robot_state_client.h
rename to example_ws/src/include/common/ros2_robot_state_client.h
diff --git a/example/src/include/common/ros2_sport_client.h b/example_ws/src/include/common/ros2_sport_client.h
similarity index 100%
rename from example/src/include/common/ros2_sport_client.h
rename to example_ws/src/include/common/ros2_sport_client.h
diff --git a/example/src/include/common/time_tools.hpp b/example_ws/src/include/common/time_tools.hpp
similarity index 100%
rename from example/src/include/common/time_tools.hpp
rename to example_ws/src/include/common/time_tools.hpp
diff --git a/example/src/include/common/ut_errror.hpp b/example_ws/src/include/common/ut_errror.hpp
similarity index 99%
rename from example/src/include/common/ut_errror.hpp
rename to example_ws/src/include/common/ut_errror.hpp
index 9695dc24..573f3f92 100644
--- a/example/src/include/common/ut_errror.hpp
+++ b/example_ws/src/include/common/ut_errror.hpp
@@ -13,4 +13,4 @@ UT_DECL_ERR(UT_ROBOT_TASK_UNKNOWN_ERROR, -2, "task unknown error.")
#define UT_PRINT_ERR(code, error) \
if ((code) == (error)) { \
RCLCPP_ERROR(this->get_logger(), "%s", error##_DESC); \
- }
\ No newline at end of file
+ }
diff --git a/example/src/include/g1/g1.hpp b/example_ws/src/include/g1/g1.hpp
similarity index 100%
rename from example/src/include/g1/g1.hpp
rename to example_ws/src/include/g1/g1.hpp
diff --git a/example/src/include/g1/g1_arm_action_client.hpp b/example_ws/src/include/g1/g1_arm_action_client.hpp
similarity index 100%
rename from example/src/include/g1/g1_arm_action_client.hpp
rename to example_ws/src/include/g1/g1_arm_action_client.hpp
diff --git a/example/src/include/g1/g1_audio_client.hpp b/example_ws/src/include/g1/g1_audio_client.hpp
similarity index 100%
rename from example/src/include/g1/g1_audio_client.hpp
rename to example_ws/src/include/g1/g1_audio_client.hpp
diff --git a/example/src/include/g1/g1_loco_client.hpp b/example_ws/src/include/g1/g1_loco_client.hpp
similarity index 100%
rename from example/src/include/g1/g1_loco_client.hpp
rename to example_ws/src/include/g1/g1_loco_client.hpp
diff --git a/example/src/include/g1/g1_motion_switch_client.hpp b/example_ws/src/include/g1/g1_motion_switch_client.hpp
similarity index 100%
rename from example/src/include/g1/g1_motion_switch_client.hpp
rename to example_ws/src/include/g1/g1_motion_switch_client.hpp
diff --git a/example/src/include/nlohmann/adl_serializer.hpp b/example_ws/src/include/nlohmann/adl_serializer.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/adl_serializer.hpp
rename to example_ws/src/include/nlohmann/adl_serializer.hpp
diff --git a/example/src/include/nlohmann/byte_container_with_subtype.hpp b/example_ws/src/include/nlohmann/byte_container_with_subtype.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/byte_container_with_subtype.hpp
rename to example_ws/src/include/nlohmann/byte_container_with_subtype.hpp
diff --git a/example/src/include/nlohmann/detail/abi_macros.hpp b/example_ws/src/include/nlohmann/detail/abi_macros.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/abi_macros.hpp
rename to example_ws/src/include/nlohmann/detail/abi_macros.hpp
diff --git a/example/src/include/nlohmann/detail/conversions/from_json.hpp b/example_ws/src/include/nlohmann/detail/conversions/from_json.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/conversions/from_json.hpp
rename to example_ws/src/include/nlohmann/detail/conversions/from_json.hpp
diff --git a/example/src/include/nlohmann/detail/conversions/to_chars.hpp b/example_ws/src/include/nlohmann/detail/conversions/to_chars.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/conversions/to_chars.hpp
rename to example_ws/src/include/nlohmann/detail/conversions/to_chars.hpp
diff --git a/example/src/include/nlohmann/detail/conversions/to_json.hpp b/example_ws/src/include/nlohmann/detail/conversions/to_json.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/conversions/to_json.hpp
rename to example_ws/src/include/nlohmann/detail/conversions/to_json.hpp
diff --git a/example/src/include/nlohmann/detail/exceptions.hpp b/example_ws/src/include/nlohmann/detail/exceptions.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/exceptions.hpp
rename to example_ws/src/include/nlohmann/detail/exceptions.hpp
diff --git a/example/src/include/nlohmann/detail/hash.hpp b/example_ws/src/include/nlohmann/detail/hash.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/hash.hpp
rename to example_ws/src/include/nlohmann/detail/hash.hpp
diff --git a/example/src/include/nlohmann/detail/input/binary_reader.hpp b/example_ws/src/include/nlohmann/detail/input/binary_reader.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/input/binary_reader.hpp
rename to example_ws/src/include/nlohmann/detail/input/binary_reader.hpp
diff --git a/example/src/include/nlohmann/detail/input/input_adapters.hpp b/example_ws/src/include/nlohmann/detail/input/input_adapters.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/input/input_adapters.hpp
rename to example_ws/src/include/nlohmann/detail/input/input_adapters.hpp
diff --git a/example/src/include/nlohmann/detail/input/json_sax.hpp b/example_ws/src/include/nlohmann/detail/input/json_sax.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/input/json_sax.hpp
rename to example_ws/src/include/nlohmann/detail/input/json_sax.hpp
diff --git a/example/src/include/nlohmann/detail/input/lexer.hpp b/example_ws/src/include/nlohmann/detail/input/lexer.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/input/lexer.hpp
rename to example_ws/src/include/nlohmann/detail/input/lexer.hpp
diff --git a/example/src/include/nlohmann/detail/input/parser.hpp b/example_ws/src/include/nlohmann/detail/input/parser.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/input/parser.hpp
rename to example_ws/src/include/nlohmann/detail/input/parser.hpp
diff --git a/example/src/include/nlohmann/detail/input/position_t.hpp b/example_ws/src/include/nlohmann/detail/input/position_t.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/input/position_t.hpp
rename to example_ws/src/include/nlohmann/detail/input/position_t.hpp
diff --git a/example/src/include/nlohmann/detail/iterators/internal_iterator.hpp b/example_ws/src/include/nlohmann/detail/iterators/internal_iterator.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/iterators/internal_iterator.hpp
rename to example_ws/src/include/nlohmann/detail/iterators/internal_iterator.hpp
diff --git a/example/src/include/nlohmann/detail/iterators/iter_impl.hpp b/example_ws/src/include/nlohmann/detail/iterators/iter_impl.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/iterators/iter_impl.hpp
rename to example_ws/src/include/nlohmann/detail/iterators/iter_impl.hpp
diff --git a/example/src/include/nlohmann/detail/iterators/iteration_proxy.hpp b/example_ws/src/include/nlohmann/detail/iterators/iteration_proxy.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/iterators/iteration_proxy.hpp
rename to example_ws/src/include/nlohmann/detail/iterators/iteration_proxy.hpp
diff --git a/example/src/include/nlohmann/detail/iterators/iterator_traits.hpp b/example_ws/src/include/nlohmann/detail/iterators/iterator_traits.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/iterators/iterator_traits.hpp
rename to example_ws/src/include/nlohmann/detail/iterators/iterator_traits.hpp
diff --git a/example/src/include/nlohmann/detail/iterators/json_reverse_iterator.hpp b/example_ws/src/include/nlohmann/detail/iterators/json_reverse_iterator.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/iterators/json_reverse_iterator.hpp
rename to example_ws/src/include/nlohmann/detail/iterators/json_reverse_iterator.hpp
diff --git a/example/src/include/nlohmann/detail/iterators/primitive_iterator.hpp b/example_ws/src/include/nlohmann/detail/iterators/primitive_iterator.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/iterators/primitive_iterator.hpp
rename to example_ws/src/include/nlohmann/detail/iterators/primitive_iterator.hpp
diff --git a/example/src/include/nlohmann/detail/json_custom_base_class.hpp b/example_ws/src/include/nlohmann/detail/json_custom_base_class.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/json_custom_base_class.hpp
rename to example_ws/src/include/nlohmann/detail/json_custom_base_class.hpp
diff --git a/example/src/include/nlohmann/detail/json_pointer.hpp b/example_ws/src/include/nlohmann/detail/json_pointer.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/json_pointer.hpp
rename to example_ws/src/include/nlohmann/detail/json_pointer.hpp
diff --git a/example/src/include/nlohmann/detail/json_ref.hpp b/example_ws/src/include/nlohmann/detail/json_ref.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/json_ref.hpp
rename to example_ws/src/include/nlohmann/detail/json_ref.hpp
diff --git a/example/src/include/nlohmann/detail/macro_scope.hpp b/example_ws/src/include/nlohmann/detail/macro_scope.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/macro_scope.hpp
rename to example_ws/src/include/nlohmann/detail/macro_scope.hpp
diff --git a/example/src/include/nlohmann/detail/macro_unscope.hpp b/example_ws/src/include/nlohmann/detail/macro_unscope.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/macro_unscope.hpp
rename to example_ws/src/include/nlohmann/detail/macro_unscope.hpp
diff --git a/example/src/include/nlohmann/detail/meta/call_std/begin.hpp b/example_ws/src/include/nlohmann/detail/meta/call_std/begin.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/call_std/begin.hpp
rename to example_ws/src/include/nlohmann/detail/meta/call_std/begin.hpp
diff --git a/example/src/include/nlohmann/detail/meta/call_std/end.hpp b/example_ws/src/include/nlohmann/detail/meta/call_std/end.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/call_std/end.hpp
rename to example_ws/src/include/nlohmann/detail/meta/call_std/end.hpp
diff --git a/example/src/include/nlohmann/detail/meta/cpp_future.hpp b/example_ws/src/include/nlohmann/detail/meta/cpp_future.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/cpp_future.hpp
rename to example_ws/src/include/nlohmann/detail/meta/cpp_future.hpp
diff --git a/example/src/include/nlohmann/detail/meta/detected.hpp b/example_ws/src/include/nlohmann/detail/meta/detected.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/detected.hpp
rename to example_ws/src/include/nlohmann/detail/meta/detected.hpp
diff --git a/example/src/include/nlohmann/detail/meta/identity_tag.hpp b/example_ws/src/include/nlohmann/detail/meta/identity_tag.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/identity_tag.hpp
rename to example_ws/src/include/nlohmann/detail/meta/identity_tag.hpp
diff --git a/example/src/include/nlohmann/detail/meta/is_sax.hpp b/example_ws/src/include/nlohmann/detail/meta/is_sax.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/is_sax.hpp
rename to example_ws/src/include/nlohmann/detail/meta/is_sax.hpp
diff --git a/example/src/include/nlohmann/detail/meta/std_fs.hpp b/example_ws/src/include/nlohmann/detail/meta/std_fs.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/std_fs.hpp
rename to example_ws/src/include/nlohmann/detail/meta/std_fs.hpp
diff --git a/example/src/include/nlohmann/detail/meta/type_traits.hpp b/example_ws/src/include/nlohmann/detail/meta/type_traits.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/type_traits.hpp
rename to example_ws/src/include/nlohmann/detail/meta/type_traits.hpp
diff --git a/example/src/include/nlohmann/detail/meta/void_t.hpp b/example_ws/src/include/nlohmann/detail/meta/void_t.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/meta/void_t.hpp
rename to example_ws/src/include/nlohmann/detail/meta/void_t.hpp
diff --git a/example/src/include/nlohmann/detail/output/binary_writer.hpp b/example_ws/src/include/nlohmann/detail/output/binary_writer.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/output/binary_writer.hpp
rename to example_ws/src/include/nlohmann/detail/output/binary_writer.hpp
diff --git a/example/src/include/nlohmann/detail/output/output_adapters.hpp b/example_ws/src/include/nlohmann/detail/output/output_adapters.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/output/output_adapters.hpp
rename to example_ws/src/include/nlohmann/detail/output/output_adapters.hpp
diff --git a/example/src/include/nlohmann/detail/output/serializer.hpp b/example_ws/src/include/nlohmann/detail/output/serializer.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/output/serializer.hpp
rename to example_ws/src/include/nlohmann/detail/output/serializer.hpp
diff --git a/example/src/include/nlohmann/detail/string_concat.hpp b/example_ws/src/include/nlohmann/detail/string_concat.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/string_concat.hpp
rename to example_ws/src/include/nlohmann/detail/string_concat.hpp
diff --git a/example/src/include/nlohmann/detail/string_escape.hpp b/example_ws/src/include/nlohmann/detail/string_escape.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/string_escape.hpp
rename to example_ws/src/include/nlohmann/detail/string_escape.hpp
diff --git a/example/src/include/nlohmann/detail/value_t.hpp b/example_ws/src/include/nlohmann/detail/value_t.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/detail/value_t.hpp
rename to example_ws/src/include/nlohmann/detail/value_t.hpp
diff --git a/example/src/include/nlohmann/json.hpp b/example_ws/src/include/nlohmann/json.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/json.hpp
rename to example_ws/src/include/nlohmann/json.hpp
diff --git a/example/src/include/nlohmann/json_fwd.hpp b/example_ws/src/include/nlohmann/json_fwd.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/json_fwd.hpp
rename to example_ws/src/include/nlohmann/json_fwd.hpp
diff --git a/example/src/include/nlohmann/ordered_map.hpp b/example_ws/src/include/nlohmann/ordered_map.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/ordered_map.hpp
rename to example_ws/src/include/nlohmann/ordered_map.hpp
diff --git a/example/src/include/nlohmann/thirdparty/hedley/hedley.hpp b/example_ws/src/include/nlohmann/thirdparty/hedley/hedley.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/thirdparty/hedley/hedley.hpp
rename to example_ws/src/include/nlohmann/thirdparty/hedley/hedley.hpp
diff --git a/example/src/include/nlohmann/thirdparty/hedley/hedley_undef.hpp b/example_ws/src/include/nlohmann/thirdparty/hedley/hedley_undef.hpp
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/include/nlohmann/thirdparty/hedley/hedley_undef.hpp
rename to example_ws/src/include/nlohmann/thirdparty/hedley/hedley_undef.hpp
diff --git a/example/src/package.xml b/example_ws/src/package.xml
old mode 100755
new mode 100644
similarity index 100%
rename from example/src/package.xml
rename to example_ws/src/package.xml
diff --git a/example/src/src/b2/b2_sport_client.cpp b/example_ws/src/src/b2/b2_sport_client.cpp
similarity index 100%
rename from example/src/src/b2/b2_sport_client.cpp
rename to example_ws/src/src/b2/b2_sport_client.cpp
diff --git a/example/src/src/b2/b2_stand_example.cpp b/example_ws/src/src/b2/b2_stand_example.cpp
similarity index 100%
rename from example/src/src/b2/b2_stand_example.cpp
rename to example_ws/src/src/b2/b2_stand_example.cpp
diff --git a/example/src/src/b2w/b2w_sport_client.cpp b/example_ws/src/src/b2w/b2w_sport_client.cpp
similarity index 100%
rename from example/src/src/b2w/b2w_sport_client.cpp
rename to example_ws/src/src/b2w/b2w_sport_client.cpp
diff --git a/example/src/src/b2w/b2w_stand_example.cpp b/example_ws/src/src/b2w/b2w_stand_example.cpp
similarity index 100%
rename from example/src/src/b2w/b2w_stand_example.cpp
rename to example_ws/src/src/b2w/b2w_stand_example.cpp
diff --git a/example/src/src/common/motor_crc.cpp b/example_ws/src/src/common/motor_crc.cpp
similarity index 100%
rename from example/src/src/common/motor_crc.cpp
rename to example_ws/src/src/common/motor_crc.cpp
diff --git a/example/src/src/common/motor_crc_hg.cpp b/example_ws/src/src/common/motor_crc_hg.cpp
similarity index 100%
rename from example/src/src/common/motor_crc_hg.cpp
rename to example_ws/src/src/common/motor_crc_hg.cpp
diff --git a/example/src/src/common/ros2_b2_sport_client.cpp b/example_ws/src/src/common/ros2_b2_sport_client.cpp
similarity index 100%
rename from example/src/src/common/ros2_b2_sport_client.cpp
rename to example_ws/src/src/common/ros2_b2_sport_client.cpp
diff --git a/example/src/src/common/ros2_sport_client.cpp b/example_ws/src/src/common/ros2_sport_client.cpp
similarity index 100%
rename from example/src/src/common/ros2_sport_client.cpp
rename to example_ws/src/src/common/ros2_sport_client.cpp
diff --git a/example/src/src/g1/audio_client/g1_audio_client_example.cpp b/example_ws/src/src/g1/audio_client/g1_audio_client_example.cpp
similarity index 100%
rename from example/src/src/g1/audio_client/g1_audio_client_example.cpp
rename to example_ws/src/src/g1/audio_client/g1_audio_client_example.cpp
diff --git a/example/src/src/g1/audio_client/test.wav b/example_ws/src/src/g1/audio_client/test.wav
similarity index 100%
rename from example/src/src/g1/audio_client/test.wav
rename to example_ws/src/src/g1/audio_client/test.wav
diff --git a/example/src/src/g1/dex3/g1_dex3_example.cpp b/example_ws/src/src/g1/dex3/g1_dex3_example.cpp
similarity index 100%
rename from example/src/src/g1/dex3/g1_dex3_example.cpp
rename to example_ws/src/src/g1/dex3/g1_dex3_example.cpp
diff --git a/example/src/src/g1/high_level/g1_arm_action_example.cpp b/example_ws/src/src/g1/high_level/g1_arm_action_example.cpp
similarity index 100%
rename from example/src/src/g1/high_level/g1_arm_action_example.cpp
rename to example_ws/src/src/g1/high_level/g1_arm_action_example.cpp
diff --git a/example/src/src/g1/high_level/g1_arm_sdk_dds_example.cpp b/example_ws/src/src/g1/high_level/g1_arm_sdk_dds_example.cpp
similarity index 100%
rename from example/src/src/g1/high_level/g1_arm_sdk_dds_example.cpp
rename to example_ws/src/src/g1/high_level/g1_arm_sdk_dds_example.cpp
diff --git a/example/src/src/g1/high_level/loco_client_example.cpp b/example_ws/src/src/g1/high_level/loco_client_example.cpp
similarity index 100%
rename from example/src/src/g1/high_level/loco_client_example.cpp
rename to example_ws/src/src/g1/high_level/loco_client_example.cpp
diff --git a/example/src/src/g1/lowlevel/behavior_lib/motion.seq b/example_ws/src/src/g1/lowlevel/behavior_lib/motion.seq
similarity index 100%
rename from example/src/src/g1/lowlevel/behavior_lib/motion.seq
rename to example_ws/src/src/g1/lowlevel/behavior_lib/motion.seq
diff --git a/example/src/src/g1/lowlevel/g1_ankle_swing_example.cpp b/example_ws/src/src/g1/lowlevel/g1_ankle_swing_example.cpp
similarity index 100%
rename from example/src/src/g1/lowlevel/g1_ankle_swing_example.cpp
rename to example_ws/src/src/g1/lowlevel/g1_ankle_swing_example.cpp
diff --git a/example/src/src/g1/lowlevel/g1_dual_arm_example.cpp b/example_ws/src/src/g1/lowlevel/g1_dual_arm_example.cpp
similarity index 100%
rename from example/src/src/g1/lowlevel/g1_dual_arm_example.cpp
rename to example_ws/src/src/g1/lowlevel/g1_dual_arm_example.cpp
diff --git a/example/src/src/g1/lowlevel/g1_low_level_example.cpp b/example_ws/src/src/g1/lowlevel/g1_low_level_example.cpp
similarity index 100%
rename from example/src/src/g1/lowlevel/g1_low_level_example.cpp
rename to example_ws/src/src/g1/lowlevel/g1_low_level_example.cpp
diff --git a/example/src/src/g1/lowlevel/gamepad.hpp b/example_ws/src/src/g1/lowlevel/gamepad.hpp
similarity index 100%
rename from example/src/src/g1/lowlevel/gamepad.hpp
rename to example_ws/src/src/g1/lowlevel/gamepad.hpp
diff --git a/example/src/src/go2/go2_robot_state_client.cpp b/example_ws/src/src/go2/go2_robot_state_client.cpp
similarity index 100%
rename from example/src/src/go2/go2_robot_state_client.cpp
rename to example_ws/src/src/go2/go2_robot_state_client.cpp
diff --git a/example/src/src/go2/go2_sport_client.cpp b/example_ws/src/src/go2/go2_sport_client.cpp
similarity index 100%
rename from example/src/src/go2/go2_sport_client.cpp
rename to example_ws/src/src/go2/go2_sport_client.cpp
diff --git a/example/src/src/go2/go2_stand_example.cpp b/example_ws/src/src/go2/go2_stand_example.cpp
similarity index 100%
rename from example/src/src/go2/go2_stand_example.cpp
rename to example_ws/src/src/go2/go2_stand_example.cpp
diff --git a/example/src/src/h1-2/lowlevel/low_level_ctrl_hg.cpp b/example_ws/src/src/h1-2/lowlevel/low_level_ctrl_hg.cpp
similarity index 100%
rename from example/src/src/h1-2/lowlevel/low_level_ctrl_hg.cpp
rename to example_ws/src/src/h1-2/lowlevel/low_level_ctrl_hg.cpp
diff --git a/example/src/src/low_level_ctrl.cpp b/example_ws/src/src/low_level_ctrl.cpp
similarity index 100%
rename from example/src/src/low_level_ctrl.cpp
rename to example_ws/src/src/low_level_ctrl.cpp
diff --git a/example/src/src/read_low_state.cpp b/example_ws/src/src/read_low_state.cpp
similarity index 100%
rename from example/src/src/read_low_state.cpp
rename to example_ws/src/src/read_low_state.cpp
diff --git a/example/src/src/read_low_state_hg.cpp b/example_ws/src/src/read_low_state_hg.cpp
similarity index 100%
rename from example/src/src/read_low_state_hg.cpp
rename to example_ws/src/src/read_low_state_hg.cpp
diff --git a/example/src/src/read_motion_state.cpp b/example_ws/src/src/read_motion_state.cpp
similarity index 100%
rename from example/src/src/read_motion_state.cpp
rename to example_ws/src/src/read_motion_state.cpp
diff --git a/example/src/src/read_wireless_controller.cpp b/example_ws/src/src/read_wireless_controller.cpp
similarity index 100%
rename from example/src/src/read_wireless_controller.cpp
rename to example_ws/src/src/read_wireless_controller.cpp
diff --git a/example/src/src/record_bag.cpp b/example_ws/src/src/record_bag.cpp
similarity index 100%
rename from example/src/src/record_bag.cpp
rename to example_ws/src/src/record_bag.cpp
diff --git a/setup.sh b/setup.sh
index 819b0559..07c638c9 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,8 +1,17 @@
#!/bin/bash
echo "Setup unitree ros2 environment"
-source /opt/ros/foxy/setup.bash
-source $HOME/unitree_ros2/cyclonedds_ws/install/setup.bash
+
+# Grab first en* interface name by default
+IFACE_NAME=${1:-$(ip -br l | awk '$1 ~ "en" { print $1 }' | head -n 1)}
+
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-export CYCLONEDDS_URI='
-
- '
+# Change to the network interface in which the unitree robot is connected
+export CYCLONEDDS_URI='
+
+
+
+
+
+
+
+'
diff --git a/setup_default.sh b/setup_default.sh
index fd3eae7a..083328d8 100755
--- a/setup_default.sh
+++ b/setup_default.sh
@@ -1,5 +1,3 @@
#!/bin/bash
echo "Setup unitree ros2 environment with default interface"
-source /opt/ros/foxy/setup.bash
-source $HOME/unitree_ros2/cyclonedds_ws/install/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
diff --git a/setup_local.sh b/setup_local.sh
index 6f1fbe84..29e8ea88 100755
--- a/setup_local.sh
+++ b/setup_local.sh
@@ -1,10 +1,12 @@
#!/bin/bash
echo "Setup unitree ros2 simulation environment"
-source /opt/ros/foxy/setup.bash
-source $HOME/unitree_ros2/cyclonedds_ws/install/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-export CYCLONEDDS_URI='
-
- '
-
-
+export CYCLONEDDS_URI='
+
+
+
+
+
+
+
+'