Hi my new friend!

斯坦福大学GibsonEnv环境搭建

  • Home
  • 斯坦福大学GibsonEnv环境搭建
Scroll down

简介

为了在3DGS三维重建的时候获得更加真实的场景数据,摒弃Gazebo自建场景,这些场景只方便测试控制算法,对于感知数据的真实性难以保证。下面尝试Gibson环境,已尝试Matterport3D搭建失败。

前置环境:

1
2
3
apt-get install libglew-dev libglm-dev libassimp-dev xorg-dev libglu1-mesa-dev libboost-dev \
mesa-common-dev freeglut3-dev libopenmpi-dev cmake golang libjpeg-turbo8-dev wmctrl \
xdotool libzmq3-dev zlib1g-dev

尝试python3.8

使用python3.8创建环境,为了后期适配ROS。

1
2
conda create -n gibsonenv python=3.8 anaconda
conda activate gibsonenv

为了对应CUDA 11.8,采用torch 2.0.0

1
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118

安装tensorflow-gpu

1
pip install tensorflow-gpu==2.2.0

克隆仓库

1
2
3
4
git clone https://github.com/StanfordVL/GibsonEnv.git
cd GibsonEnv
./download.sh
./build.sh build_local

首先会报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GibsonEnv/gibson/core/channels/external/glew.c:2774:1: error: unknown type name ‘PFNGLCLEARDEPTHFOESPROC’; did you mean ‘PFNGLCLEARDEPTHFPROC’?
2774 | PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~~
| PFNGLCLEARDEPTHFPROC
/home/adipandas/git_clones/GibsonEnv/gibson/core/channels/external/glew.c:2774:48: warning: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
2774 | PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES = NULL;
| ^~~~
/home/adipandas/git_clones/GibsonEnv/gibson/core/channels/external/glew.c:2775:1: error: unknown type name ‘PFNGLCLIPPLANEFOESPROC’; did you mean ‘PFNGLCLIPPLANEFPROC’?
2775 | PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~
| PFNGLCLIPPLANEFPROC
/home/adipandas/git_clones/GibsonEnv/gibson/core/channels/external/glew.c:2775:46: warning: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
2775 | PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES = NULL;
| ^~~~
/home/adipandas/git_clones/GibsonEnv/gibson/core/channels/external/glew.c:2776:1: error: unknown type name ‘PFNGLDEPTHRANGEFOESPROC’; did you mean ‘PFNGLDEPTHRANGEFPROC’?
2776 | PFNGLDEPTHRANGEFOESPROC __glewDepthRangefOES = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~~
| PFNGLDEPTHRANGEFPROC
......

需要在GibsonEnv/gibson/core/channels/external/glew.c中把没有的全换成对应的,应将2774-2779行修改为:

1
2
3
4
5
6
PFNGLCLEARDEPTHFPROC __glewClearDepthfOES = NULL;
PFNGLCLIPPLANEFPROC __glewClipPlanefOES = NULL;
PFNGLDEPTHRANGEFPROC __glewDepthRangefOES = NULL;
PFNGLFRUSTUMFPROC __glewFrustumfOES = NULL;
PFNGLGETCLIPPLANEFPROC __glewGetClipPlanefOES = NULL;
PFNGLORTHOFPROC __glewOrthofOES = NULL;

再次编译即可成功,随后安装python包

1
pip install -e .

首先报错:

1
lib/python3.10/site-packages/setuptools/_distutils/dist.py:268: UserWarning: Unknown distribution option: 'tests_require'

需要在setup.py中把tests_require改为:

1
2
3
4
#     tests_require=[],
extras_require={
'test': ['pytest'],
},

再次报错:

1
error: Multiple top-level packages discovered in a flat-layout:

在setup.py中添加:

1
2
3
4
setup(name='gibson',
version='0.3.1',
py_modules=[],
...

好的,现在让我们运行python examples/demo/play_husky_nonviz.py:

1
Segmentation fault (core dumped)

至此,在Ubuntu 20.04上提高python、pytorch、tensorflow、CUDA版本安装的尝试宣告失败

docker运行

能用,但感觉不太好用

我是学生,给我钱

其他文章
目录导航 置顶
  1. 1. 简介
  2. 2. 尝试python3.8
  3. 3. docker运行
请输入关键词进行搜索