MIT Mini Cheetah–开源代码仿真环境搭建记录(Ubuntu20.04)
Mit Mini Cheetah 开源代码仿真环境搭建记录
MIT Mini Cheetah–开源代码仿真环境搭建记录(Ubuntu20.04)
一.安装依赖包
- sudo apt install mesa-common-dev freeglut3-dev coinor-libipopt-dev libblas-dev liblapack-dev gfortran liblapack-dev coinor-libipopt-dev cmake gcc build-essential libglib2.0-dev
- LCM 1.3.1 (it says Java 6, but you can use newer) (https://lcm-proj.github.io/)
git clone https://github.com/lcm-proj/lcm.git
cd lcm
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
3.Qt 5.10.0 or newer (requires the gamepad library) (https ://www.qt.io/download-qt-installer) 可以去官网下载Qt5.10.0或更新版本的安装包,清华大学开源软件镜像站下载了qt5.14.0安装包进行安装。
sudo chmod -R 755 qt-opensource-linux-x64-5.14.0-rc_167.run
./qt-opensource-linux-x64-5.14.0-rc_167.run
默认安装在home/Qt目录下,如手动选择安装在/opt/Qt5.14.0,后面需修改查找路径。
4.安装Eigen库
sudo apt-get install libeigen3-dev
二. 下载源码并编译,整个工程可以用Qt Creator打开
git clone https://github.com/mit-biomimetics/Cheetah-Software.git
cd Cheetah-Software
cd scripts # for now, you must actually go into this folder
./make_types.sh # you may see an error like `rm: cannot remove...` but this is okay
若前面安装Qt在其他路径,打开scripts文件夹中的find_qt_path.sh,修改至正确的安装路径,如
QT_VER=”$(ls /opt/Qt/ | grep 5 -m1)”
printf “/opt/Qt/${QT_VER}/gcc_64/”
继续编译
cd ..
mkdir build
cd build
cmake .. # there are still some warnings here
make -j8
三. 运行
电脑连接遥控手柄。
- 窗口1
cd ~/Cheetah-Software-master/build/sim
./sim
点击选择Mini Cheetah、Simulator,点击Start
2. 窗口2
cd ~/Cheetah-Software-master/build/user/MIT_Controller
./mit_ctrl m s
3. SimControlPanel窗口
Robot Control Parameters
第18行use_rc改为0,翻身
第2行control_mode 改为1,站立;
由1改4,踏步,手柄可控制前后左右;
由1改3,遥控手柄的摇杆可控制身体扭转;
由3或4改为6,停止站立;
改为8,开启视觉;
改为9,后空翻。
四. CMake 错误
- 在clone googletest的时候卡住很久不动或失败。
需要科学上网,切换到 Cheetah-Software 目录 下 common 文件的Cmakelist.txt 文件将里面的git_tag的 master 切换为 main 即可
或删掉这部分测试不需要,后续影响不大
common下的CMakeLists.txt,删掉第19行-第51行, if(CMAKE_SYSTEM_NAME MATCHES Linux)至endif.
2. 其他关于Qt的问题如果是因为装了多个版本的问题,可以下载旧版,在窗口 qmake -v 查看目前系统使用的Qt版本,如果不对,打开
/usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
将源文件改为Qt安装地址,如
/opt/Qt/5.14.0/gcc_64/bin
/opt/Qt
3. qt_version_tag, qt_version@qt5.14 not found
也是因为多个版本Qt引起的,删掉build文件夹,在打开一个命令行控制窗口
export NO_CONDA_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
mkdir build
cd build
PATH=$NO_CONDA_PATH cmake ../
make -j8
4. 报错关于cc1:all warnings being treated as errors
找到报错文件相关文件,搜索-Werror 将其删掉。grep -rl “-Werror”
五. 运行错误
- 找不到Default User Parameter File
common文件夹下utilities.cpp,
std::string getConfigDirectoryPath() {return “../../config/”;}
2. 点击start启动后没有出现模拟窗口
sim/include文件夹下DrawList.h,299行:
std::string _baseFileName = “../../resources/”;
网络参考资料
更多推荐
所有评论(0)