facebook home-robot环境搭建
文章目录

HomeRobot:一种经济实惠的兼容机器人,可以在家中导航并操纵各种物体以完成日常任务。
开放词汇移动操纵(OVMM)是指在任何看不见的环境中拾取任何物体并将其放置在指定位置的问题。对于机器人成为人类环境中有用的助手来说,这是一个基本挑战,因为它涉及解决机器人技术中的子问题:感知、语言理解、导航和操作对于 OVMM 来说都是至关重要的。此外,整合这些子问题的解决方案也带来了巨大的挑战。为了推动这一领域的研究,我们引入了 HomeRobot OVMM 基准,其中代理导航家庭环境以抓取新物体并将它们放置在目标容器上。HomeRobot 有两个组件:一个模拟组件,它在新的高质量多房间家庭环境中使用大量多样化的精选对象集;和一个现实世界的组件,为低成本的 Hello Robot Stretch 提供软件堆栈,以鼓励跨实验室复制现实世界的实验。
1. mamba安装
安装mamba
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
sudo chmod u+x ./Mambaforge-Linux-x86_64.sh
sudo ./Mambaforge-Linux-x86_64.sh -p /usr/local/mambaforge
2. 获取源码并安装
home-robot的镜像源地址
https://github.com/hello-robot/stretch_install/blob/master/docs/install_ubuntu_20.04.md
sudo apt update
sudo apt install build-essential zip unzip
git clone https://github.com/facebookresearch/home-robot.git
cd ./home-robot
# If using ROS - make sure you don't have PYTHONPATH set
unset PYTHONPATH
# Otherwise, use the version in src/home_robot
mamba env create -n home-robot -f src/home_robot/environment.yml
# Activate the environment
conda activate home-robot
# Optionally, update this environment to install ROS
mamba env update -f src/home_robot_hw/environment.yml
export HOME_ROBOT_ROOT=$HOME/home-robot
export CUDA_HOME=/usr/local/cuda-11.7
conda activate home-robot
cd $HOME_ROBOT_ROOT
./install_deps.sh
报错
请确认您有正确的访问权限并且仓库存在。
fatal: 无法克隆 '[email protected]:Jdvakil/spot-sim2real.git' 到子模组路径 '/home/moresweet/home-robot/src/third_party/spot-sim2real'
这是因为源项目已经改名,通过访问作者的主页得知
修改
.git
下的config以及.gitmodules
红框处修改为
直接注释掉这个模块,根据作者回答
这个模块并不重要
安装habitat和pytorch-3d
python -m pip install -e src/third_party/habitat-lab/habitat-lab
python -m pip install -e src/third_party/habitat-lab/habitat-baselines
python -m pip install "git+https://github.com/facebookresearch/pytorch3d.git"
# Install home robot sim interfaces
pip install -e src/home_robot_sim
anaconda 国内源,修改.condarc
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
biobakery: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
ursky: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
出现github慢的问题可以使用代理,链接前面加https://ghproxy.com
或者https://mirror.ghproxy.com
安装成功即为配置完毕
3. 问题
3.1 No module named ‘home_robot_hw’
cd cd home_robot_hw/
pip install -e .
3.2 AttributeError: module ‘numpy’ has no attribute ‘float’.
AttributeError: module ‘numpy’ has no attribute ‘float’.
np.float
was a deprecated alias for the builtin float
. To avoid this error in existing code, use float
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
# 版本降级
conda install numpy==1.23.5
3.3 vcs 命令找不到
sudo apt-get install python3-vcstool
3.4 realsense安装以及catkin_make找不到库
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install realsense2
vcpkg需要在cmakeList中加入一行自己的vcpkg.cmake
链接文件
3.5 stretch.urdf找不到(无实体机器人不能解决)
roslaunch home_robot_hw startup_stretch_hector_slam.launch
又报错
FileNotFoundError: [Errno 2] No such file or directory: '/home/moresweet/ROS_WS/src/stretch_ros/stretch_description/urdf/stretch.urdf'
确认确实没有
https://github.com/facebookresearch/home-robot/blob/main/docs/calibration.md
其中包含标定文件需要自己生成
标定包就是在stetch_ros/stretch_calibration
中
export HELLO_FLEET_PATH=/home/moresweet/stretch_user
根据资料,这个环境变量的设置在实体机的左臂上
3.6 ros time_out
根据官方教程第五步测试time_out错误
通过调试,是因为等待is_runstopped
话题消息回应超时,而server发送的是/grasping/request
,说明需要的话题应该来自实体机器人,所以我们仿真选手走到第4步即可。