Skip to content

Commit a705402

Browse files
committed
update readme
1 parent ce91d01 commit a705402

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ That means you can test out the controller in a plug-and-play manner with minimu
2121

2222
## News
2323

24+
- 11/03/2024: 🎉 Sim2Real pipeline is ready! Check out the [Sim2Real](#deploy-in-real-unitree-go2) section for more details.
2425
- 09/25/2024: 🎉 DIAL-MPC is released with open-source codes! Sim2Real pipeline coming soon!
2526

2627
https://github.com/user-attachments/assets/f2e5f26d-69ac-4478-872e-26943821a218
@@ -112,9 +113,27 @@ We use `unitree_sdk2_python` to communicate with the robot directly via CycloneD
112113

113114
For state estimation, this proof-of-concept work requires external localization module to get base **position** and **velocity**.
114115

115-
Support for ROS2 odometry message is built-in. You are responsible for publishing this message at at least 50 Hz and ideally over 100 Hz. We provide an odometry publisher for Vicon motion capture system in [`vicon_interface`](https://github.com/LeCAR-Lab/vicon_interface).
116+
The following plugins are built-in:
116117

117-
We provide a simple ABI for custom localization modules, and you need to implement this in a python file in your workspace, should you consider not using ROS2 odometry.
118+
- ROS2 odometry message
119+
- Vicon motion capture system
120+
121+
#### Option 1: ROS2 odometry message
122+
123+
Configure `odom_topic` in the YAML file. You are responsible for publishing this message at at least 50 Hz and ideally over 100 Hz. We provide an odometry publisher for Vicon motion capture system in [`vicon_interface`](https://github.com/LeCAR-Lab/vicon_interface).
124+
125+
> [!CAUTION]
126+
> All velocities in ROS2 odometry message **must** be in **body frame** of the base to conform to [ROS odometry message definition](https://docs.ros.org/en/noetic/api/nav_msgs/html/msg/Odometry.html), although in the end they are converted to world frame in DIAL-MPC.
127+
128+
#### Option 2: Vicon (no ROS2 required)
129+
130+
1. `pip install pyvicon-datastream`
131+
2. Change `localization_plugin` to `vicon_shm_plugin` in the YAML file.
132+
3. Configure `vicon_tracker_ip`, `vicon_object_name`, and `vicon_z_offset` in the YAML file.
133+
134+
#### Option 3: Bring Your Own Plugin
135+
136+
We provide a simple ABI for custom localization modules, and you need to implement this in a python file in your workspace, should you consider not using the built-in plugins.
118137

119138
```python
120139
import numpy as np
@@ -134,11 +153,11 @@ class MyPlugin(BaseLocalizationPlugin):
134153
def get_last_update_time(self):
135154
return time.time()
136155

137-
register_plugin('custom_plugin', plugin_cls=custom_plugin.CustomPlugin)
156+
register_plugin('custom_plugin', plugin_cls=MyPlugin)
138157
```
139158

140159
> [!CAUTION]
141-
> All velocities in ROS2 odometry message **must** be in **body frame** of the base to conform to [ROS odometry message definition](https://docs.ros.org/en/noetic/api/nav_msgs/html/msg/Odometry.html). However, when writing custom localization plugin, velocities should be reported in **world frame**. Under the hood, the built-in ROS2 odometry plugin converts the body frame velocities to world frame.
160+
> When writing custom localization plugin, velocities should be reported in **world frame**.
142161
143162
> [!NOTE]
144163
> Angular velocity source is onboard IMU.
@@ -148,7 +167,7 @@ Localization plugin can be changed in the configuration file. A `--plugin` argum
148167
### Installing `unitree_sdk2_python`
149168

150169
> [!NOTE]
151-
> If you are already using ROS2 with Cyclone DDS according to [ROS2 documentation on Cyclone DDS](https://docs.ros.org/en/humble/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.html), you don't have to install Cyclone DDS as suggested by `unitree_sdk2_python`.
170+
> If you are already using ROS2 with Cyclone DDS according to [ROS2 documentation on Cyclone DDS](https://docs.ros.org/en/humble/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.html), you don't have to install Cyclone DDS as suggested by `unitree_sdk2_python`. But do follow the rest of the instructions.
152171
153172
Follow the instructions in [`unitree_sdk2_python`](https://github.com/unitreerobotics/unitree_sdk2_python).
154173

0 commit comments

Comments
 (0)