问题汇总:(该知乎为本人帐号)
- unable to lock directory /var/lib/apt/lists/lock
这个问题的原因是:之前程序不正常中断,有程序在运行导致资源被锁不可用
解决方法:
sudo fuser -vki /var/lib/apt/lists/lock
2.github clone 有问题的时候
1) 可以把https换成git,即 https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot变成git://http://github.com/fmauch/universal_robot.git src/fmauch_universal_robot
2) github.com
后面加上cnpmjs.org
,即:github.com.cnpmjs.org
3. 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误
看清无法下载中下列签名无效的编码,这里是F42ED6FBAB17C654,可以去替换下面的解决方法中的序列码
解决方案:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F42ED6FBAB17C654 && sudo apt-get update
4. 更新安装包
更新可用软件包: sudo apt update
更新已安装软件包: sudo apt upgrade
5. E: Sub-process /usr/bin/dpkg returned an error code (1)
解决方案:删除有问题的软件包,重新下载。如果不能删除,就先把软件包所在的文件夹改名字,然后新建文件夹下载该软件替换掉之前软件包中的内容,然后删掉新建的,把旧文件夹名字改回来即可
sudo mv cache/apt/archives cache/apt/archives.bk
sudo mkdir cache/apt/archives
sudo apt-get update
sudo apt-get install -f
sudo mv cache/apt/archives/python3.6-dev_3.6.9-1~18.04ubuntu1.4_amd64.deb cache/apt/archives.bk
sudo rm -rf archives
sudo mv archives.bk archives
sudo apt-get dist-upgrade
6.error: ‘ur_msgs::SetPayload::Request {aka struct ur_msgs::SetPayloadRequest_<std::allocator<void> >}’ has no member named ‘center_of_gravity’
原因:
git clone https://github.com/ros-industrial/ur_msgs.git src/ur_msgs
之后再编译catkin_make即可成功
7. ros path error
环境变量问题
source devel/setup.bash
8. UR5示教器问题:no route to host
这个问题是示教器的IP不是PC机的IP,需要更换。查看命令:ifconfig
9. UR5 示教器报错the connection to the remote PC at could not be established
connect timed out
这个也是PC机IP问题。主要是虚拟机的IP地址和机械臂要改写到一个频段内。
需要更改其他位置中etc/network/interface
auto ens33
iface ens33 inet static
address 192.168.3.107
netmask 255.255.255.0
gateway 192.168.3.108
dns-nameservers 8.8.8.8
ens33改成你自己PC名字,IP也改成你自己的,网络连接如果虚拟机,改成桥接模式
重启后,ping一下,看看是不是可以ping 通
10. 报错:Exception while loading move_group capability 'move_group/MoveGroupExecuteTrajectoryAction': According to the loaded plugin descriptions the class move_group/MoveGroupExecuteTrajectoryAction with base class type move_group::MoveGroupCapability does not exist. Declared types are move_group/ApplyPlanningSceneService move_group/ClearOctomapService move_group/MoveGroupCartesianPathService move_group/MoveGroupExecuteService move_group/MoveGroupGetPlanningSceneService move_group/MoveGroupKinematicsService move_group/MoveGroupMoveAction move_group/MoveGroupPickPlaceAction move_group/MoveGroupPlanService move_group/MoveGroupQueryPlannersService move_group/MoveGroupStateValidationService
Available capabilities: move_group/ApplyPlanningSceneService, move_group/ClearOctomapService, move_group/MoveGroupCartesianPathService, move_group/MoveGroupExecuteService, move_group/MoveGroupGetPlanningSceneService, move_group/MoveGroupKinematicsService, move_group/MoveGroupMoveAction, move_group/MoveGroupPickPlaceAction, move_group/MoveGroupPlanService, move_group/MoveGroupQueryPlannersService, move_group/MoveGroupStateValidationService
解决方法:
找到move_group添加move_group/MoveGroupExecuteTrajectoryAction
删除move_group/MoveGroupKinematicsService,改成如下情况即可
<param name="capabilities" value="move_group/MoveGroupCartesianPathService
move_group/MoveGroupExecuteTrajectoryAction
move_group/MoveGroupMoveAction
move_group/MoveGroupPickPlaceAction
move_group/MoveGroupPlanService
move_group/MoveGroupQueryPlannersService
move_group/MoveGroupStateValidationService
move_group/MoveGroupGetPlanningSceneService
move_group/ClearOctomapService
" />
11. 启动rviz,报错could not get fresh data package from...
还有pip问题,可以重新启动,感觉是个bug,时好时坏。