Sonic Teleoperation: Real Robot and Simulation
This guide explains how to use PICO for Sonic full-body teleoperation of ELF3. First, choose your control target:
- PC / MuJoCo simulation: After completing deployment preparation, follow Start PC / MuJoCo Simulation.
- Real robot: After completing deployment preparation, follow Real Robot: Enter the Sonic Ready State.
Simulation and hardware use separate launch entry points. When testing simulation, start only the simulation entry point; do not also start the hardware launch. Keyboard instructions in this guide assume the main project's default xbox_default.yaml. If your site uses custom mappings, follow the actual configuration.
- Motion-control repository: bxi_rl_controller_ros2_example
- Sonic Mod repository: com.bxi.sonic
- PICO client: XRoboToolkit-PICO-1.1.1.apk
Safety
Full-body teleoperation drives the robot's legs, torso, and both arms at the same time. Incorrect operation may destabilize the robot or cause a collision with nearby people or objects. Before first use, clear the operating areas around both the robot and operator, make sure the emergency stop is available, and have a safety operator stand by the robot.
Begin with slow, small movements. Do not jump, turn quickly, stand on one leg, or move beyond the robot's joint range. Stop motion following immediately if the robot shakes, assumes an abnormal posture, or starts to lose balance. Press the emergency stop if necessary.
Environment
| Item | Requirement |
|---|---|
| Control target | ELF3 MuJoCo simulation on a PC, or a real ELF3; choose one control entry point |
| Control project | Source deployment: ~/bxi_ws/bxi_rl_controller_ros2_example; prebuilt / App deployment: /opt/bxi/bxi_rl_controller_ros2_example; use the actual deployment directory for PC simulation |
| Input devices | Keyboard for PC simulation; robot remote controller or the companion App for the real robot; operator motion comes from the PICO headset and both controllers |
| Motion tracking | 2 leg-mounted PICO Motion Trackers |
| PICO application | XRoboToolkit-PICO 1.1.1 |
| Network and power | PICO and the host running Sonic are on the same LAN and can communicate; the headset, controllers and trackers are sufficiently charged |
Choose the Project Directory
Choose the directory for your control project's deployment method. Do not place the Sonic Mod inside the App project or its private_git_mods; install it in the independent /opt/bxi/mods directory, which is outside the App download and survives App updates.
Migrating an older project
Some older project versions already contain Sonic under src/bxi_example_py_elf3/mods or private_git_mods. If that copy and /opt/bxi/mods/com.bxi.sonic are both scanned, the runtime finds the duplicate Mod ID com.bxi.sonic and refuses to start. Before migrating, locate the old copy, make a backup, and move it outside the scanned directories so that only /opt/bxi/mods/com.bxi.sonic remains:
mv ~/bxi_ws/bxi_rl_controller_ros2_example/src/bxi_example_py_elf3/mods/private_git_mods/com.bxi.sonic \
~/bxi_ws/bxi_rl_controller_ros2_example/com.bxi.sonic.backup
Apply the same procedure to an old copy inside the App project. Do not leave two scannable Sonic copies in place.
| Startup method | Project directory | Build requirement |
|---|---|---|
| Robot remote controller | ~/bxi_ws/bxi_rl_controller_ros2_example | Source tree; install the Mod in /opt/bxi/mods and rebuild after updating it. |
| App | /opt/bxi/bxi_rl_controller_ros2_example | App-downloaded prebuilt deployment; the Mod is loaded from /opt/bxi/mods, with no manual rebuild required. |
Use the project directory that matches your startup method in the commands below. Clone the Sonic Mod into the independent /opt/bxi/mods/com.bxi.sonic directory.
Deployment Preparation for Simulation and the Real Robot
0. Clone the Sonic Mod
The Sonic Mod is maintained in a separate repository. On first deployment, clone it into the independent /opt/bxi/mods/com.bxi.sonic directory and confirm that the control project is configured to scan /opt/bxi/mods:
sudo mkdir -p /opt/bxi/mods
sudo git clone https://github.com/konodoki/com.bxi.sonic.git /opt/bxi/mods/com.bxi.sonic
If the directory already exists, update that repository separately:
cd /opt/bxi/mods/com.bxi.sonic
git pull --ff-only
The parent project does not track this directory. At runtime, the configured /opt/bxi/mods root is scanned recursively, so the Mod remains available after an App update.
1. Update the Motion-Control Project
For source deployments, stop the relevant control programs before updating, building and sourcing the environment as described in the repository README. The path below is an example source workspace; replace it with your actual directory:
source /opt/ros/humble/setup.bash
source /opt/bxi/bxi_ros2_pkg/setup.bash
cd ~/bxi_ws/bxi_rl_controller_ros2_example
git pull --ff-only
bash build.sh
source ./install/setup.bash
build.sh builds the project. A successful build does not start the control program; launch it separately afterward. Build on first deployment or after relevant source changes. Daily startup does not require rebuilding. For prebuilt / App deployments, use the corresponding update procedure instead of the source build steps.
Separate updates from operation
Do not build or replace the installation directory while a control process is running. Resolve uncommitted site-specific changes before updating. After the update, select the simulation or real-robot entry point below. Restarting hardware services is not a common deployment step for both targets.
2. Install Sonic Dependencies
Before using Sonic for the first time, install the PICO connectivity dependencies into the Python environment actually used by Sonic's child processes. Run the following command in that environment. If the real-robot process runs as root, use its corresponding root environment:
python3 -m pip install -r /opt/bxi/mods/com.bxi.sonic/requirements-pico.txt
If no proxy is configured, or downloads from the default PyPI index are slow or time out, retry with the Tsinghua University PyPI mirror in the same Python environment. The following command sets the timeout to 120 seconds and disables caching:
python3 -m pip install \
-r /opt/bxi/mods/com.bxi.sonic/requirements-pico.txt \
-i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple \
--no-cache-dir \
--timeout 120
The dependencies normally need to be installed only once. Run the command again after an update if requirements-pico.txt has changed.
3. Install the PICO Application
Download XRoboToolkit-PICO-1.1.1.apk and install the APK on the PICO headset. After installation, XRoboToolkit is available under Unknown Sources in the PICO Library.
How the XRoboToolkit PC Service Starts
This section describes the startup implementation in SONIC Mod 1.5.0. After entering com.bxi.sonic/sonic_teleop, the Sonic host starts the PICO manager, which starts the companion RoboticsServiceProcess. This setup does not require manually opening another PC Server. For older deployments, check mod.yaml and the actual startup logs first.
Keep Sonic as the only SDK data client
With the companion Service covered by this guide, do not connect PC-side RobotLinuxDemo / PXREAClientUnity preview programs or independent test scripts that call xrobotoolkit_sdk.init() to the same Service while the Sonic manager is connected. A new SDK client may terminate the existing feedback subscription. Closing the newer client may not automatically restore Sonic's subscription. The XRoboToolkit application on the headset is the required sender and must remain running.
Use logs, ss, ROS topic inspection or passive ZMQ subscriptions for diagnosis. Do not start another SDK client to inspect data alongside Sonic.
Real Robot: Enter the Sonic Ready State
This section applies only to a real ELF3. Use the robot startup method deployed at your site: remote controller, App or hardware launch. Run one corresponding control instance; do not add the PC simulation launch.
If a source deployment uses ros_elf_launch.service, restart that service after updating and building according to the deployment procedure. For prebuilt / App deployments, use the App's start and stop controls. Do not make a real-robot service restart part of the PC simulation procedure.
- Start ELF3 normally, confirm that the robot has completed its self-check, and use the remote controller to put the robot into walking mode. The robot should hold its normal standing posture.
-
Press
LB + RB + Xsimultaneously on the robot remote controller to request Sonic full-body teleoperation. -
Wait for the state transition to finish. The robot assumes the ready posture shown below. Continue with PICO calibration and motion following only after the posture is stable.
- Once the robot is stable in the Sonic ready state, follow the sections "Calibrate the PICO Motion Trackers", "Connect XRoboToolkit" and "Calibrate the Reference Posture and Start Following" below, in that order, to teleoperate the real ELF3 with PICO.
Sonic Does Not Start
Confirm that the robot is already in normal walking mode, then press LB + RB + X simultaneously. If the robot still does not respond, check that the motion-control project has been updated, rebuilt, and sourced correctly.
Start PC / MuJoCo Simulation
This section applies to a Linux PC with ROS 2 Humble, the control project, the MuJoCo runtime package and the Sonic Mod already deployed. The example uses an x86_64 PC and /opt/bxi/bxi_rl_controller_ros2_example. Replace the cd path if your deployment directory differs.
1. Terminal One: Start the Simulator and Controller
source /opt/ros/humble/setup.bash
source /opt/bxi/bxi_ros2_pkg/setup.bash
cd /opt/bxi/bxi_rl_controller_ros2_example
source ./install/setup.bash
SONIC_XRT_SERVICE_DIR=/opt/bxi/mods/com.bxi.sonic/runtime/linux-x86_64/roboticsservice \
ros2 launch bxi_example_py_elf3 example_launch_demo.py \
2>&1 | tee /tmp/elf3-sonic-sim.log
This command starts both MuJoCo and the simulation controller. Do not run example_launch_demo_hw.py in another terminal; that is the hardware control entry point.
SONIC_XRT_SERVICE_DIR explicitly selects the Service bundled with the Mod for this launch, so an existing system installation does not change runtime selection. It does not resolve port conflicts with another running Service; inspect existing instances if startup fails. On Linux aarch64, use runtime/linux-aarch64/roboticsservice instead of the x86_64 path. These commands do not modify system configuration.
Keep this terminal running. Running the same tee command again overwrites the log file; save the previous log separately if you need to retain it.
2. Terminal Two: Start Keyboard Control and Enter Sonic
source /opt/ros/humble/setup.bash
source /opt/bxi/bxi_ros2_pkg/setup.bash
cd /opt/bxi/bxi_rl_controller_ros2_example
source ./install/setup.bash
ros2 launch remote_controller remote_controller_keyboard.launch.py
Click the keyboard control terminal to give it focus:
- Press the ordinary number key
1and hold it for at least 0.2 seconds with the default mapping. This enters the normal standing / walking state. Wait for the robot to stabilize. - Press
Shift+2, which produces@, to request Sonic. - Confirm that the control state is
com.bxi.sonic/sonic_teleopbefore continuing with PICO calibration.
Default keyboard mappings:
| Key | Actual function |
|---|---|
1 | Normal standing / walking; also exits Sonic to the basic mode |
Shift+1 (!) | PD brake; not normal standing / walking |
2 | Recovery / get up; not entry into walking mode |
Shift+2 (@) | Enter Sonic from the basic mode |
If MuJoCo displays Paused, click the 3D view and press Space once to resume. The effect of Space depends on window focus: use the MuJoCo window here, not the keyboard control terminal.
3. Terminal Three: Check Simulation State and Live Data
Keep terminals one and two running, and open a third terminal for the checks below. After entering Sonic, check the controller and manager states. After calibrating PICO and starting motion following, check the live-data logs again.
cd /opt/bxi/bxi_rl_controller_ros2_example
source ./install/setup.bash
timeout --signal=INT 12s ros2 topic echo \
/simulation/state_machine_info --once --full-length --field data
grep -E 'Body tracking data available|Calibration complete|StreamMode switch|source chunks ready|reference status' \
/tmp/elf3-sonic-sim.log | tail -30
Expect current.name to be com.bxi.sonic/sonic_teleop, with pico_manager and smpl_bridge both running. A live_reference log entry must correspond to the current movements; a historical success entry alone does not prove that following is active. The log path above matches this page's simulation launch command. On a real robot, use the actual control log.
4. Complete PICO Calibration and Verify Following
Follow "Calibrate the PICO Motion Trackers", "Connect XRoboToolkit" and "Calibrate the Reference Posture and Start Following" below, in that order. ELF3 should already be stable in simulation. Seeing the graphical window alone does not mean Sonic is active.
Calibrate the PICO Motion Trackers
Recalibrate the Motion Trackers before each full-body teleoperation session to reduce body-pose and floor-height errors.
-
Secure one Motion Tracker to each leg. The side with the button and indicator light must face upward along the body. Press the button to turn on each tracker.
-
Put on the PICO headset and pick up both controllers. Select Motion Tracker in the lower-right corner of the PICO home screen.
- Confirm that both leg trackers are connected. Select Start Calibration and follow the instructions in the headset.
- After calibration, select Adjust Floor and follow the instructions to align the virtual floor with the physical floor.
- Observe the avatar on the screen. When the operator moves their head, hands, and legs, the avatar should follow those movements and its feet should remain close to the floor.
Connect XRoboToolkit
- Return to the PICO Library and open
XRoboToolkitunder Unknown Sources.
-
Confirm that the headset, both controllers and both trackers are sufficiently charged. PICO and the host running Sonic must be on the same LAN. For simulation, use the PC's LAN IP; for a real robot, use the robot's LAN IP.
-
In XRoboToolkit's Network section, select Enter next to
PC Service, enter the IP address of the host running Sonic, and connect. If the PC Service has just restarted, selectReconnectto establish a new connection. -
Check the tracking and transmission options against the table below:
| Section | Option | Setting |
|---|---|---|
| Tracking | Head | Selected |
| Tracking | Controller | Selected |
| PICO Motion Tracker | Mode | Full-body |
| PICO Motion Tracker | High-Acc | Selected |
| PICO Motion Tracker | Num | 2 |
| Data & Control | Send | Enable the send switch on the Tracking page |
| Data & Control | Switch w/ A Button | Off, so A does not change the send state |
The table lists the settings required by this procedure. Configure other options, such as Hand and sharedNetwork, according to your client version's instructions. Complete the acceptance checks below to verify motion following.
- Confirm that
Statusin the Network section showsWORKINGand that the log does not contain continuous errors. Keep wearing the headset with XRoboToolkit in the foreground. Removing the headset or switching applications may pause transmission.WORKINGor the FPS display alone does not prove that Sonic is receiving valid body data; complete the controller acceptance checks below.
Calibrate the Reference Posture and Start Following
- Face the same direction as the robot and stand upright. Let the upper arms hang naturally, bend the elbows approximately 90 degrees, and hold the forearms horizontally in front of the body as shown below.
-
On first entering Sonic, with the manager in
OFF, hold the posture steady and holdA + B + X + Yacross the PICO controllers for about 1 second to request calibration. Do this once. Pressing this combination again in a calibrated operating mode switches back toOFF; it does not refresh calibration. -
Release all four buttons, A, B, X and Y. Keep the same posture and heading, and wait about 3 seconds. Confirm that the host log shows
Calibration completeandOFF -> PLANNER. If the manager is still waiting for body frames, check tracking and transmission instead of repeatedly pressing ABXY. -
Hold
A + Xon the PICO controllers for about 1 second, then release. ConfirmPLANNER -> POSE, then slowly move both arms, turn the torso slightly and bend the knees. The controller should showreference status: live_reference, and the simulated or real robot should follow the corresponding movements. -
To stop real-time following, press
A + Xonce more to switch fromPOSEtoPLANNER. The current version consumes buffered references, then holds the last motion reference. It does not guarantee a return to the default posture, and this is not an exit from Sonic. To resume real-time following, pressA + Xonce to return toPOSE. Do not press it repeatedly. -
After confirming that real-time following has stopped, press
RB + Xon the robot remote controller to exit Sonic and return to normal walking mode. In PC simulation, press the ordinary number key1in the keyboard control terminal.
Common controls:
| Device | Buttons | Function |
|---|---|---|
| Robot remote controller | LB + RB + X | Enter the Sonic ready state from walking mode |
| PICO controllers | A + B + X + Y | Request calibration in OFF; press again in an operating mode to switch to OFF |
| PICO controllers | A + X | After calibration, switch between PLANNER and POSE; leaving POSE holds the last motion reference and does not guarantee the default posture |
| Robot remote controller | X | Reset heading alignment when no shoulder or trigger button is held |
| Robot remote controller | RB + X | Exit Sonic and return to normal walking mode |
| PC keyboard | 1 / Shift+2 (@) | Normal standing / walking and entry into Sonic; the keyboard terminal must have focus |
Acceptance Check
Verify in this order: devices → Sonic ready state → calibration → live data → robot following.
- Both leg trackers are online and sufficiently charged. The head, hands and legs of the avatar in the PICO tracking interface follow the operator.
- XRoboToolkit's
Head,Controller,Full-bodyand TrackingSendsettings are correct, and the connection status isWORKING. - The controller is in
com.bxi.sonic/sonic_teleop. Keyboard input logs alone do not prove that the state transition succeeded. - The host log confirms calibration and the sequence
OFF -> PLANNER -> POSE. - The controller shows
PICO source chunks readyandreference status: live_reference. The simulated or real robot follows the operator's small movements. - Pressing
A+Xagain stops real-time following and holds the reference. The appropriate exit key returns to the basic mode.
Troubleshooting
Safe Operation
- Power and battery: Before startup, check the robot, PICO headset, controllers and Motion Trackers. Confirm that all devices are powered on and have more than 50% battery. For devices that support use while charging, keep them connected to power during testing and route the cables so they do not restrict movement.
- Real-robot support and clearance: The real robot must be securely supported by a stand while entering Sonic. Keep people out of an area extending at least 1 meter around the robot.
- Recalibration: Before starting teleoperation again, repeat the PICO reference-posture calibration procedure in this guide. Confirm calibration is complete and release A, B, X and Y fully before pressing A+X once to start real-time following.
XRoboToolkit Cannot Connect to the Control Host
- Confirm that PICO and the host running Sonic are on the same LAN.
- For simulation, enter the PC IP; for a real robot, enter the robot IP. Do not enter PICO's own IP.
- Confirm which charged headset is currently in use. After replacing a headset, reconnect and recalibrate; do not keep filtering network traffic by the previous headset's IP.
- Check whether the IP address changed after switching networks.
- Confirm that XRoboToolkit shows
WORKING, and review its log for connection errors.
The Avatar's Legs Do Not Follow or Its Feet Float
- Confirm that both leg trackers are connected and sufficiently charged.
- Make sure the button and indicator side of each tracker faces upward along the body.
- Run Start Calibration and Adjust Floor again.
- Confirm that XRoboToolkit's
ModeisFull-bodyandNumis2.
Sonic Does Not Enter the Ready State
- PC simulation: Confirm that only the simulation entry point is running. Press
1, then@in the keyboard terminal and check the current control state. - Real robot: Confirm that self-check is complete and the robot is in normal walking mode, then press
LB + RB + Xon its remote controller. - Confirm that the Sonic Mod is loaded. Rebuild after updating a source deployment; follow the corresponding update process for prebuilt / App deployments.
- On first use, confirm that the packages in
requirements-pico.txtare installed in the Python environment actually used by the manager.
The Robot Does Not Follow After Calibration
Check the manager's current mode before choosing a button action. Repeatedly pressing ABXY is not a general recovery procedure:
| Current condition | Check and action |
|---|---|
OFF | Confirm valid body tracking and Send; press ABXY once to request calibration, release all buttons and wait for calibration to succeed |
Calibrated, PLANNER | Release all buttons, then press A+X once and confirm entry into POSE |
POSE, but no new poses | Check headset wear, application foreground state, Tracking Send, battery and network; check for extra SDK clients |
live_reference is normal, but MuJoCo does not move | Check whether MuJoCo is Paused; resume simulation, then check joint feedback |
Manager or bridge is faulted | Inspect the first startup error and Service port usage instead of repeatedly asking the operator to calibrate |
If the host repeatedly reports No body frames from PICO, an FPS value greater than 0 in the headset still does not prove that body frames have reached Sonic. Check battery, Full-body, Tracking Send and foreground operation first. If necessary, restart only the headset's XRoboToolkit application, reconnect, and recheck Controller and Full-body after reopening it. Once body data has recovered, calibrate according to the current mode. Do not launch an additional SDK probe to verify the data in parallel.
Unity Preview Shows Controller Motion, but Sonic Does Not Follow
The PC Unity preview and Sonic are separate SDK receiver programs. The companion Service covered by this guide terminates the existing feedback subscription when a new SDK subscription arrives, and the old client may not recover automatically. Motion in the preview therefore does not prove that Sonic is receiving the same data.
- Close the Unity preview or test program; keep XRoboToolkit running on the headset.
- Re-establish the Sonic manager's SDK session. For PC simulation, you can stop this page's simulation launch, start it again, then reconnect and calibrate. If the simulator must remain running, have a maintainer recover only the PICO manager and its Service.
- On a real robot, follow the site's maintenance procedure. Confirm that the state and posture are stable before calibrating. Do not copy the simulation restart procedure onto a running real robot.
- Verify recovery using current button logs,
POSEandlive_reference, rather than Service processes and TCP connections alone.
This is a confirmed possible failure mechanism; it does not mean that Unity causes every case of missing motion following. Check headset battery, disabled modes, paused transmission and paused simulation separately.
The Service or Manager Fails to Start
After entering Sonic, check the Service path in the logs and the parent-child process relationship. Check whether an independent Service already occupies a port:
pgrep -af 'manager_launcher.py|RoboticsServiceProcess|RobotLinuxDemo'
ss -lntp '( sport = :5556 or sport = :5557 or sport = :60061 )'
ss -ntp '( sport = :60061 or dport = :60061 )'
Port 60061 being bound to 127.0.0.1 is normal for this companion Service. It is used by the local SDK, not directly by the headset. One loopback connection may appear as separate client-side and server-side lines; count clients by their client PIDs.
Identify who started each instance before stopping extras through their original startup mechanism. Do not use pkill python3, killall or copied historical PIDs to stop processes in bulk. manager_state packets or an ESTABLISHED connection alone do not prove that body data is updating.
The Robot Moves in a Different Direction From the Operator
Stop real-time following, face the same direction as the robot, and recalibrate. If only the heading is offset, press X alone on the robot remote controller while no shoulder or trigger button is held to reset heading alignment.
Motion Stutters or the Posture Jumps
Stop large movements and check the wireless network quality between PICO and the robot, the tracker connections, and the XRoboToolkit log. Before resuming, verify the initial posture and surrounding safety again. If the issue continues, exit Sonic, then recalibrate and reconnect.








