项目来源
注:这个项目比较新,我的配置是Ubuntu20.04+Ros Noetic,可以较快的复现。一些比较老的项目由于配置等问题复现可能就比较麻烦。
本篇只是对原项目的复现,下一篇把Dex-Net的模型引入,利用Dex-Net实现抓取
自己操作
一些问题
-
有个包pyquaternion一直装不上,用conda和pip安装了就是无法import
- 后面发现是版本问题,搞
Python3.8
就可以,
- 后面发现是版本问题,搞
-
报错:
return F.conv2d(input, weight, bias, self.stride, RuntimeError: GET was unable to find an engine to execute this computation
- 降低torch 版本,去pytorch官网下载更低版本的,参考这个回答
- https://github.com/microsoft/TaskMatrix/issues/283
- 降低torch 版本,去pytorch官网下载更低版本的,参考这个回答
-
操作多去看看原视频里是怎么操作的就好
我的环境配置分享
- 这里附上我的conda和pip环境配置列表文件
使用流程
- conda创建环境
conda create --name LEGO python=3.8
- build项目
git clone https://github.com/pietrolechthaler/UR5-Pick-and-Place-Simulation/
cd UR5-Pick-and-Place-Simulation/catkin_ws
source /opt/ros/noetic/setup.bash
catkin build
source devel/setup.bash
echo "source $PWD/devel/setup.bash" >> $HOME/.bashrc
- 下载并安装YOLO5
cd ~
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip3 install -r requirements.txt
- 启动Gazbeo世界
roslaunch levelManager lego_world.launch
- 先移动一下桌子,再ctrl +z 发现机械臂位置正常了
- 先在gazebo里点一下继续
- 选择产生积木多少
rosrun levelManager levelManager.py -l [level]
rosrun levelManager levelManager.py -l 4
#可选1~4
- 启动机械臂-发现机械臂动了一下
rosrun motion_planning motion_planning.py
- 展示
rosrun vision lego-vision.py -show