运行前确保你的PC和铁蛋都已经连接至同一个局域网下。
# 在铁蛋的Jetson NX板上执行这些命令
cd /etc/mi
sudo nano cyclonedds.xml
# 将文件里的内容照着下面这个例子修改:
# <?xml version="1.0" encoding="UTF-8" ?>
# <CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyc$
# <Domain id="42">
# <General>
# <NetworkInterfaceAddress>wlan0</NetworkInterfaceAddress>
# <AllowMulticast>true</AllowMulticast>
# </General>
# <Discovery>
# <ParticipantIndex>auto</ParticipantIndex>
# <MaxAutoParticipantIndex>100</MaxAutoParticipantIndex>
# <Peers>
# <Peer address="localhost"/>
# </Peers>
# </Discovery>
# </Domain>
# </CycloneDDS>
# 重启铁蛋,让配置生效
sudo reboot
在PC端配置ROS_DOMAIN_ID,这样就能在同一局域网内收到铁蛋的ROS 2消息了
# 在你自己的电脑上执行这些命令
sudo gedit ~/.bashrc
# 在~/.bashrc这个文件里加两行:
export ROS_DOMAIN_ID=42
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
# 然后保存退出,执行该命令让配置生效:
source ~/.bashrc
# 然后安装依赖(我用的是ROS 2 Humble版本,根据你自己的ROS 2版本修改)
sudo apt install ros-humble-rmw-cyclonedds-cpp
cd ~
mkdir -p hci_ws/src
cd hci_ws/src
git clone https://github.com/0nhc/cyberdog_hci.git
cd ..
colcon build
source install/setup.bash
source ~/hci_ws/install/setup.bash
ros2 run cyberdog_remote client # 默认运行这个是站立