Communication Setup
Wired network between the edge computer and Roban, ROS images, controller switching, and CycloneDDS configuration.
The edge computer runs the model, the lower-level computer runs the HEFT controller, and the upper-level computer provides camera images. This page configures communication and switching tools on the edge computer; the robot side should already be running a control program that supports heft_pico and amp.
First install the main LeTools-Learning environment. Every /path/to/... below must be replaced with an absolute path on your machine; the libraries used by the CLI are the x86_64 build and must not be used directly on an ARM64 edge computer.
1. Connect the Network and Camera
Connect the edge computer and the robot over a wired network. The addresses below are examples; you can reuse an existing network, but all configurations must be consistent:
| Device | Address |
|---|---|
| Robot lower-level computer / gateway | 192.168.26.1 |
| Robot upper-level computer / ROS Master | 192.168.26.12 |
| Edge computer | 192.168.26.10, netmask 255.255.255.0, gateway 192.168.26.1 |
If you need to set up bridging on the lower-level computer, the two interfaces must be the physical Ethernet ports on the lower-level computer that connect to the upper-level computer and the edge computer respectively; confirm them with ip -br addr. For the bridging script, see the LETools whole-body VLA tutorial.
The script disables interfaces, clears the existing IP, and adjusts bridge traffic filtering. Record the original configuration before proceeding and have a local terminal or backup connection ready; do not run it directly on the interface carrying your current SSH session, and do not copy the example interface names or addresses verbatim.
On the edge computer, confirm that both the upper- and lower-level computers are reachable via ping. Then set ROS in the terminal you will use to launch the Client:
export ROS_MASTER_URI=http://192.168.26.12:11311
export ROS_IP=192.168.26.10
rostopic list
rostopic hz /camera/color/image_raw/compressedYou should see the camera topic and receive data. If the data collection service is not running, start the camera service on the upper-level computer first; if the actual topic differs, update the deployment configuration accordingly.
2. Build the Controller Switching Tool
Open-source users should use the master branch of LejuLab-Deploy. Exit the Conda environment and run the following on the edge computer:
git clone --branch master https://gitcode.com/OpenLET/LejuLab-Deploy.git
cd LejuLab-Deploy
sudo apt-get update
sudo apt-get install -y build-essential cmake libacl1-dev libncurses5-dev
source installed/setup.bash
catkin buildIf you use zsh, replace setup.bash with setup.zsh. After building, confirm that devel/lib/leju-rl-controller/controller_switch_cli exists. You can reuse an existing working switching tool, but the tool and its shared libraries must come from matching versions.
3. Configure DDS and Test Switching
Edit configs/deploy/cyclonedds_roban_edge.xml in LeTools-Learning and set the name of NetworkInterface to the actual wired NIC name on the edge computer that connects to the robot.
export ROBOT_VERSION=17
export CYCLONEDDS_URI="file:///path/to/LeTools-Learning/configs/deploy/cyclonedds_roban_edge.xml"
export LD_LIBRARY_PATH="/path/to/LejuLab-Deploy/src/lejusdk/3rd_party/x86_64/cyclonedds-cxx-0.10.2/lib:/path/to/LejuLab-Deploy/src/lejusdk/3rd_party/x86_64/cyclonedds-0.10.2/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
/path/to/LejuLab-Deploy/devel/lib/leju-rl-controller/controller_switch_cli ampTest while the robot is in a safe standing state. Seeing 控制器切换请求已发送: amp means the request has been sent; you must also check the logs or status on the robot side to confirm that the switch actually succeeded.
Fill the tool and shared-library paths into the existing heft configuration section of configs/deploy/roban_wholebody_deploy.yaml:
heft:
switch_cli: "/path/to/LejuLab-Deploy/devel/lib/leju-rl-controller/controller_switch_cli"
switch_library_path: "/path/to/LejuLab-Deploy/src/lejusdk/3rd_party/x86_64/cyclonedds-cxx-0.10.2/lib:/path/to/LejuLab-Deploy/src/lejusdk/3rd_party/x86_64/cyclonedds-0.10.2/lib"Do not add a second heft section with the same name; add subsequent inference configuration under this same section.
4. Install CycloneDDS 0.10.2
In the LeTools main environment, build the Python package against the native libraries from the repository in the previous step so that it matches the version on the lower-level computer:
conda activate letools
export CYCLONEDDS_HOME=/path/to/LejuLab-Deploy/src/lejusdk/3rd_party/x86_64/cyclonedds-0.10.2
export CMAKE_PREFIX_PATH="${CYCLONEDDS_HOME}${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}"
mkdir -p /tmp/cyclonedds-python-wheel
python -m pip wheel \
--no-deps \
--no-build-isolation \
--no-binary cyclonedds \
--wheel-dir /tmp/cyclonedds-python-wheel \
cyclonedds==0.10.2
python -m pip install \
--force-reinstall \
--no-deps \
/tmp/cyclonedds-python-wheel/cyclonedds-0.10.2-*.whl
python -m pip show cycloneddsConfirm that the displayed version is 0.10.2. This only checks the Python package installation; you still need to complete the network, camera, and controller-switching verification.
Next: Inference Deployment.