欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ROS中python3.6环境的创建

程序员文章站 2024-03-11 10:06:07
...

ROS中python3.6环境的创建

首先使用virtualenv创建环境
virtualenv -p /usr/bin/python3.6 venv
然后安装ros的一些依赖包

source venv/bin/activate
pip install catkin_pkg pyyaml empy rospkg numpy

安装一个消息包

sudo apt-get install ros-melodic-jsk-recognition-msgs & sudo apt-get install ros-melodic-jsk-rviz-plugins

安装算法环境依赖
(1)安装常规库

pip install torch==1.4.0 torchvision==0.5.0
pip install easydict tensorboardX scikit-image numpy numba pyyaml tqdm opencv-python

(2)安装特殊库
安装spconv

cd topic_ws/src/object_detect/for_ros/lib/spconv
python setup.py bdist_wheel
cd dist/
pip install <spconv>.whl

安装iou 、pointnet等

cd topic_ws/src/object_detect/for_ros/iou3d_nms/
 rm -rf build/
 python setup.py install
 cd ~/liang/topic_ws/src/object_detect/for_ros/pointnet2/pointnet2_stack/
rm -rf build/
rm -rf dist

安装leishen_ops_cuda

cd topic_ws/src/object_detect/leishen/single_stage_model/dataset/leishen_dataset/leishen_ops/
rm -rf build/
rm -rf dist
python setup.py install

安装ros_numpy

cd topic_ws/ros_numpy/
rm -rf build/
python setup.py install

安装segfps

cd  new_train/ops/fps_wit_forgound_point/
python setup.py install

安装roiaware_pool3d

cd pvdet/dataset/roiaware_pool3d/
python setup.py install