You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -112,9 +113,27 @@ We use `unitree_sdk2_python` to communicate with the robot directly via CycloneD
112
113
113
114
For state estimation, this proof-of-concept work requires external localization module to get base **position** and **velocity**.
114
115
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:
116
117
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.
118
137
119
138
```python
120
139
import numpy as np
@@ -134,11 +153,11 @@ class MyPlugin(BaseLocalizationPlugin):
> 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**.
142
161
143
162
> [!NOTE]
144
163
> Angular velocity source is onboard IMU.
@@ -148,7 +167,7 @@ Localization plugin can be changed in the configuration file. A `--plugin` argum
148
167
### Installing `unitree_sdk2_python`
149
168
150
169
> [!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.
152
171
153
172
Follow the instructions in [`unitree_sdk2_python`](https://github.com/unitreerobotics/unitree_sdk2_python).
0 commit comments