Skip to main content

机器人操作手册

查看网口速度

nload +网卡名称

VR重连

cd kuavo-ros-opensource/
source ./devel/setup.bash
roscd noitom_hi5_hand_udp_python/
vim launch/launch_quest3_ik.launch
# 修改其中的IP
sudo systemctl restart ocs2_h12pro_monitor.service

手动启动VR

sudo su
cd kuavo-ros-opensource
source devel/setup.bash
source devel/setup.bash
roslaunch humanoid_controllers load_kuavo_real_with_vr.launch

下位机编译

拉取项目

cd kuavo-ros-opensource/
git fetch origin
git checkout 某个分支
git branch

清除并重新编译

sudo su
catkin clean -y
catkin config -DCMAKE_ASM_COMPILER=/usr/bin/as -DCMAKE_BUILD_TYPE=Release
source installed/setup.bash
catkin build humanoid_controllers
catkin build h12pro_controller_node
catkin build humanoid_plan_arm_trajectory
catkin build kuavo_ros_interfaces
cd src/humanoid-control/h12pro_controller_node/scripts
./deploy_autostart.sh

samplerate依赖库缺失

./samplerate_install.sh

ocs动态库编译错误

rm -rf /var/ocs/错误版本的模型文件

libdrake.so缺失

sudo bash -c "apt install tmux -y && echo 'export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/drake/lib' >> /root/.bashrc && echo 'set-environment -g LD_LIBRARY_PATH \"/opt/ros/noetic/lib:/opt/ros/noetic/lib/x86_64-linux-gnu:/opt/drake/lib:\$LD_LIBRARY_PATH\"' >> /root/.tmux.conf && source /root/.bashrc && tmux new-session -d 'tmux source-file /root/.tmux.conf; bash'"

编辑配置文件为夹爪,与末端夹爪对应

vim src/kuavo_assets/config/kuavo_v49/kuavo.json
vim src/manipulation_nodes/noitom_hi5_hand_udp_python/launch/launch_quest3_ik.launch
vim src/humanoid-control/humanoid_controllers/launch/load_kuavo_real_with_vr.launch
# 将其中的dex_hand修改为lejuclaw

手臂出现限位锁住后仍抖动严重

/home/lab/kuavo-ros-opensource/src/humanoid-control/humanoid_controllers/config/kuavo_v45/mpc
vi task.info

# 将centroidalModelType 设置为1
parameter:
# 关节参数[vel, kp_pos, kd_pos, tor, kp_vel, kd_vel, ki_vel]
Left_joint_arm_1: [0, 35, 2, 0, 0, 0, 0]
Left_joint_arm_2: [0, 30, 2, 0, 0, 0, 0]
Left_joint_arm_3: [0, 30, 2, 0, 0, 0, 0]
Left_joint_arm_4: [0, 30, 2, 0, 0, 0, 0]
Left_joint_arm_5: [0, 30, 2, 0, 0, 0, 0]
Left_joint_arm_6: [0, 30, 2, 0, 0, 0, 0]
Right_joint_arm_1: [0, 35, 2, 0, 0, 0, 0]
Right_joint_arm_2: [0, 30, 2, 0, 0, 0, 0]
Right_joint_arm_3: [0, 30, 2, 0, 0, 0, 0]
Right_joint_arm_4: [0, 30, 2, 0, 0, 0, 0]
Right_joint_arm_5: [0, 30, 2, 0, 0, 0, 0]
Right_joint_arm_6: [0, 30, 2, 0, 0, 0, 0]

Head_joint_low: [0, 4, 3, 0, 0, 0, 0]
Head_joint_high: [0, 10, 6, 0, 0, 0, 0]
# 修改Left和Right的对应值即可

查看相机设备号

rs-enumerate-devices | grep "Serial Number"

ping不通外网

sudo nmcli connection WIFI名称 ipv4-route-metric 优先级大小	# 通常设置为50,名称为乐聚训练场-5G

拷贝所有info.json

rsync -avm --include='*/' --include='info.json' --exclude='*' leju_kuavo@192.168.20.4:/media/data ~/

域名无法解析

分析工具:ping, traceroute, route

# 编辑主配置文件
sudo nano /etc/systemd/resolved.conf

# 取消注释并添加以下内容:
[Resolve]
DNS=223.5.5.5 8.8.8.8
# 解析所有域名
Domains=~.

# 重启服务并重建符号链接
sudo systemctl restart systemd-resolved
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

# 设置开机自动启动
sudo systemctl enable systemd-resolved.service

上下位机连接

1.建立连接

sudo nmcli connection show	# 查看当前网络连接,其中ethernet为有线连接,轮臂机器人有两个有线连接,人形机器人为一个
ifconfig # 查看当前网卡设备
插拔上下位机网卡,通过ifconfig确认是哪一个**网络设备**
sudo nmcli connection add con-name WIFI名称 ifname 网卡名称 ipv4.addresses 192.168.26.12/24 ipv4.gateway 192.168.26.1 ipv4.method manual type ethernet #创建一个ethernet有线连接,ip为192.168.26.12,掩码为24即255.255.255.0,网关为192.168.26.1
sudo systemctl restart NetworkManager # 重启网络服务

然后就可以确认一下上下位机网络是否修复完成,若仍然无法ping通kuavo_master或者延迟过高,正常为1ms左右,则

1.删除部分不用的wifi网络或者ethernet网络,可能存在IP污染,注意轮臂机器人为两个有线网
2.进入下位机进行如上配置,但注意下位机配置时IP为192.168.26.1/24,网关为192.168.26.12,与上位机相反
3.设备问题

2.若上位机网卡偏移

sudo nano /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="网卡mac地址", NAME="网卡名称"
# 保存
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo systemctl restart systemd-udevd

3.查看 dhcp 分配历史

# 查看 dhcp 分配历史
cat /var/lib/dhcp/dhcpd.leases

可以查看dhcp分配的ip及其对应mac表的历史