系列文章目录
前言 - 概述
OCS2 是专为切换系统优化控制(Optimal Control for Switched Systems,OCS2)定制的 C++ 工具箱。该工具箱提供以下算法的高效实现:
- SLQ:连续时间域约束 DDP
- iLQR:离散时域约束 DDP
- SQP:基于 HPIPM 的多重打靶算法
- IPM: 基于非线性内点法的多重搜索算法
- SLP:基于 PIPG 的顺序线性规划算法
部分翻译:
| 英文 | 中文 |
|---|---|
| Multiple-shooting algorithm | 多重打靶法 |
| DDP | 微分动态规划 |
| HPIPM | 一个 QP 求解器 |
| Path integral stochatic optimal control | 路径积分随机最优控制 |
OCS2 通过增强拉格朗日法(Augmented Lagrangian)或松弛障碍法(relaxed barrier methods)处理一般路径约束。为了便于将 OCS2 应用于机器人任务,它为用户提供了额外的工具,以便根据 URDF 模型设置系统动力学(如运动学(kinematic)或动力学(dynamic)模型)和成本/约束(cost/constraints)(如避免自碰撞(self-collision avoidance)和末端执行器跟踪(end-effector tracking))。
该库还提供了一个自动微分(automatic differentiation)工具,用于计算系统动力学、约束和成本的导数(derivatives)。为了便于在机器人平台上部署,OCS2 提供了 ROS 接口工具。该工具箱的实现高效且数值稳定,加上其友好的用户界面,为在机载计算能力有限(limited onboard computation)的众多机器人应用中使用该工具箱铺平了道路。
0.1 如何使用 OCS2 工具箱?
OCS2 可以轻松安装在 Ubuntu 上。源代码也是公开的。要开始使用控制工具箱,请参阅 "开始安装 "和 "入门 "页面。
0.2 许可证
OCS2 工具箱根据 BSD 3 条款许可发布。请注意源代码目录中的许可证和注意事项文件。
0.3 荣誉
以下人员参与了 OCS2 的开发:
项目经理: Farbod Farshidian。
主要开发人员 Farbod Farshidian、Ruben Grandia、Michael Spieler、Jan Carius、Jean-Pierre Sleiman。
其他开发人员 Alexander Reske、Sotaro Katayama、Mayank Mittal、Jia-Ruei Chiu、Johannes Pankert、Perry Franklin、Tom Lankhorst、David Hoeller、Asutosh Satapathy、Markus Giftthaler、Edo Jelavic。
致谢: OCS2 工具箱的开发由苏黎世联邦理工学院的 ADRL 团队发起,该项目在苏黎世联邦理工学院的 RSL 继续发展。RSL 团队现在积极支持 OCS2 的开发。
0.4 引用 OCS2
要在学术研究中引用工具箱,请使用以下方式:
@misc{OCS2、
title = { {OCS2}: 开关系统优化控制开源库}、
note = {[在线]。Available: \url{https://github.com/leggedrobotics/ocs2}}、
author = {Farbod Farshidian and others}}.
}
0.5 视频教程
- OCS2 工具箱教程,Farbod Farshidian,MPC 研讨会,RSS 2021(链接)。
- 腿部运动和操纵的实时优化控制,Marco Hutter,MPC 研讨会,RSS 2021(链接)。
0.6 相关出版物
本工具箱已在以下出版物中使用:
- Farbod Farshidian, Michael Neunert, Alexander W Winkler, Gonzalo Rey, and Jonas Buchli. An efficient optimal planning and control framework for quadrupedal locomotion. In 2017 IEEE International Conference on Robotics and Automation (ICRA), 93–100. IEEE, 2017.
- Farbod Farshidian, Maryam Kamgarpour, Diego Pardo, and Jonas Buchli. Sequential linear quadratic optimal control for nonlinear switched systems. IFAC, 50(1):1463–1469, 2017.
- Farbod Farshidian, Edo Jelavic, Asutosh Satapathy, Markus Giftthaler, and Jonas Buchli. Real-time motion planning of legged robots: a model predictive control approach. In 2017 IEEE-RAS 17th International Conference on Humanoid Robotics (Humanoids), 577–584. IEEE, 2017.
- Markus Giftthaler, Farbod Farshidian, Timothy Sandy, Lukas Stadelmann, and Jonas Buchli. Efficient kinematic planning for mobile manipulators with non-holonomic constraints using optimal control. In 2017 IEEE International Conference on Robotics and Automation (ICRA), 3411–3417. IEEE, 2017.
- Farbod Farshidian, David Hoeller, and Marco Hutter. Deep value model predictive control. In Conference on Robot Learning (CoRL), 990–1004. PMLR, 2020.
- Ruben Grandia, Farbod Farshidian, Alexey Dosovitskiy, René Ranftl, and Marco Hutter. Frequency-aware model predictive control. IEEE Robotics and Automation Letters, 4(2):1517–1524, 2019.
- Maria Vittoria Minniti, Farbod Farshidian, Ruben Grandia, and Marco Hutter. Whole-body mpc for a dynamically stable mobile manipulator. IEEE Robotics and Automation Letters, 4(4):3687–3694, 2019.
- Jan Carius, Farbod Farshidian, and Marco Hutter. Mpc-net: a first principles guided policy search. IEEE Robotics and Automation Letters, 5(2):2897–2904, 2020.
- Ruben Grandia, Farbod Farshidian, René Ranftl, and Marco Hutter. Feedback mpc for torque-controlled legged robots. In 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 4730–4737. IEEE, 2019.
- Abel Gawel, Hermann Blum, Johannes Pankert, Koen Krämer, Luca Bartolomei, Selen Ercan, Farbod Farshidian, Margarita Chli, Fabio Gramazio, Roland Siegwart, and others. A fully-integrated sensing and control system for high-accuracy mobile robotic building construction. In 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2300–2307. IEEE, 2019.
- Jean-Pierre Sleiman, Farbod Farshidian, Maria Vittoria Minniti, and Marco Hutter. A unified mpc framework for whole-body dynamic locomotion and manipulation. IEEE Robotics and Automation Letters, 6(3):4688–4695, 2021.
- Ruben Grandia, Andrew J Taylor, Aaron D Ames, and Marco Hutter. Multi-layered safety for legged robots via control barrier functions and model predictive control. arXiv preprint arXiv:2011.00032, 2020.
- Magnus Gaertner, Marko Bjelonic, Farbod Farshidian, and Marco Hutter. Collision-free mpc for legged robots in static and dynamic scenes. In 2021 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2021.
- Jean-Pierre Sleiman, Farbod Farshidian, and Marco Hutter. Constraint handling in continuous-time ddp-based model predictive control. In 2021 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2021.
- Alexander Reske, Jan Carius, Yuntao Ma, Farbod Farshidian, and Marco Hutter. Imitation learning from mpc for quadrupedal multi-gait control. In 2021 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2021.
- Maria Vittoria Minniti, Ruben Grandia, Kevin Fäh, Farbod Farshidian, and Marco Hutter. Model predictive robot-environment interaction control for mobile manipulation tasks. In 2021 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2021.
- Mayank Mittal, David Hoeller, Farbod Farshidian, Marco Hutter, and Animesh Garg. Articulated object interaction in unknown scenes with whole-body mobile manipulation. arXiv preprint arXiv:2103.10534, 2021.
一、安装
1.1 前提条件
OCS2 库以 C++11 编写,在 Ubuntu 20.04 下测试,库版本与软件包源码中提供的版本一致。
1.1.1 源代码
源代码托管在 GitHub:leggedrobotics/ocs2。
# Clone OCS2 git clone :leggedrobotics/ocs2.git
讯享网
1.1.2 依赖
- C++ compiler with C++11 support
- Eigen (v3.3)
- Boost C++ (v1.71)
- GLPK
讯享网
sudo apt install libglpk-dev sudo apt install libmpfr-dev - catkin
sudo apt-get install catkin - pybind11_catkin, ROS package, installable via
讯享网
sudo apt install ros-noetic-pybind11-catkin - catkin-pkg package for python3. Install with
sudo apt install python3-catkin-tools - Doxygen for documentation. Install with
讯享网
sudo apt install doxygen doxygen-latex pip install sphinxcontrib-bibtex pip install sphinx-rtd-theme pip install breathe
1.1.3 可选依赖项
- 将 Pinocchio 和 HPP-FCL 克隆到工作区,以获得刚性多体动力学库和自碰撞支持
# Clone pinocchio git clone --recurse-submodules https://github.com/leggedrobotics/pinocchio.git # Clone hpp-fcl git clone --recurse-submodules https://github.com/leggedrobotics/hpp-fcl.git # install dependencies sudo apt install liburdfdom-dev liboctomap-dev libassimp-dev
- 对于 OCS2 单元测试和机器人示例中使用的各种机器人资产
讯享网# Clone ocs2_robotic_assets git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git
- rqt_multiplot 软件包可用于可视化求解器的性能指标和其他优化输出结果
sudo apt-get install ros-noetic-rqt-multiplot
- RaiSim 模拟器可用作滚动的提供者。相应的 ocs2_raisim 软件包有额外要求:
RaiSim 软件包需要通过克隆到工作区从源代码中安装:
讯享网git clone --depth 1 https://github.com/raisimTech/raisimLib.git -b v1.1.01请按照 RaiSim 网页上的说明进行安装。或者,为了让 catkin 容易找到安装程序并在将来方便卸载,可以考虑使用 CheckInstall 将 RaiSim 安装为 debian 软件包。为此,请替换原来的命令:
cmake .. -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL <other options> make install -j4与:
讯享网cmake .. <other options> (Without INSTALL_PREFIX) make -j4 && sudo checkinstall这将把 RaiSim 安装到 /usr/local/lib 的默认位置,catkin 也会自动检测到该位置。当 checkinstall 提出要求时,请将软件包名称更改为合适的名称(如 "raisim"),以便日后进行软件包管理时查找,例如卸载(dpkg -r <package_name>)。
要实现可视化,请使用 RaiSim Unity,在 raisimLib/raisimUnity 目录中提供了预置的可执行文件。例如,它可用于调试目的,查看 OCS2 和 RaiSim 之间的转换是否正确。
- 网格地图 catkin 软件包,可使用 sudo apt install ros-noetic-grid-map-msgs 安装。
- ONNX Runtime 是一种推理和训练加速器。在这里,它用于在 C++ 代码中部署学习到的 MPC-Net 策略。要在本地安装它,请执行以下操作:
cd /tmp wget https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/onnxruntime-linux-x64-1.7.0.tgz tar xf onnxruntime-linux-x64-1.7.0.tgz mkdir -p ~/.local/bin ~/.local/include/onnxruntime ~/.local/lib ~/.local/share/cmake/onnxruntime rsync -a /tmp/onnxruntime-linux-x64-1.7.0/include/ ~/.local/include/onnxruntime rsync -a /tmp/onnxruntime-linux-x64-1.7.0/lib/ ~/.local/lib rsync -a ~/git/ocs2/ocs2_mpcnet/ocs2_mpcnet_core/misc/onnxruntime/cmake/ ~/.local/share/cmake/onnxruntime我们提供了自定义的 cmake 配置和版本文件,以便在不修改 LIBRARY_PATH 和 LD_LIBRARY_PATH 的情况下启用 find_package(onnxruntime)。请注意,上述最后一条命令假定您已将 OCS2 克隆到用户主目录下的 git 文件夹中。
- 训练 MPC-Net 策略时建议使用虚拟环境:
讯享网sudo apt-get install python3-venv创建一个环境,并赋予其访问系统站点软件包的权限:
mkdir venvs && cd venvs python3 -m venv mpcnet激活环境并安装需求:
讯享网source ~/venvs/mpcnet/bin/activate python3 -m pip install -r ~/git/ocs2/ocs2_mpcnet/ocs2_mpcnet_core/requirements.txt较新的显卡可能需要 CUDA 功能,而标准 PyTorch 安装目前还不支持该功能。在这种情况下,检查 PyTorch Start Locally 是否有兼容的版本,例如,运行
pip3 install torch==1.10.2+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
- 可能出现的问题:
讯享网Could not find a package configuration file provided by "convex_plane_decomposition" with any of the following names: convex_plane_decompositionConfig.cmake convex_plane_decomposition-config.cmake Add the installation prefix of "convex_plane_decomposition" to CMAKE_PREFIX_PATH or set "convex_plane_decomposition_DIR" to a directory containing one of the above files. If "convex_plane_decomposition" provides a separate development package or SDK, be sure it has been installed." CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "grid_map_filters_rsl" with any of the following names: grid_map_filters_rslConfig.cmake grid_map_filters_rsl-config.cmake Add the installation prefix of "grid_map_filters_rsl" to CMAKE_PREFIX_PATH or set "grid_map_filters_rsl_DIR" to a directory containing one of the above files. If "grid_map_filters_rsl" provides a separate development package or SDK, be sure it has been installed.
解决方案:
- elevation mapping cupy
git clone https://github.com/leggedrobotics/elevation_mapping_cupy.git
- grid map
讯享网git clone https://github.com/ANYbotics/grid_map.git
1.2 安装
1.2.1 创建程序库
创建一个新的 catkin 工作区:
# Create the directories # Do not forget to change <...> parts mkdir -p <directory_to_ws>/<catkin_ws_name>/src cd <directory_to_ws>/<catkin_ws_name>/ # Initialize the catkin workspace catkin init catkin config --extend /opt/ros/noetic catkin config -DCMAKE_BUILD_TYPE=RelWithDebInfo
克隆 OCS2 库:
讯享网# Navigate to the directory of src # Do not forget to change <...> parts cd <directory_to_ws>/<catkin_ws_name>/src git clone :leggedrobotics/ocs2.git
构建并运行单元测试
# Build it # catkin build ocs2 catkin build -DCMAKE_BUILD_TYPE=Release # Source it source <directory_to_ws>/<catkin_ws_name>/devel/setup.bash # run tests catkin run_tests ocs2
讯享网catkin build -DCMAKE_BUILD_TYPE=Release -------------------------------------------------------------------------------- Profile: default Extending: [explicit] /opt/ros/noetic Workspace: /home/kuanli/ocs2_ws -------------------------------------------------------------------------------- Build Space: [exists] /home/kuanli/ocs2_ws/build Devel Space: [exists] /home/kuanli/ocs2_ws/devel Install Space: [unused] /home/kuanli/ocs2_ws/install Log Space: [exists] /home/kuanli/ocs2_ws/logs Source Space: [exists] /home/kuanli/ocs2_ws/src DESTDIR: [unused] None -------------------------------------------------------------------------------- Devel Space Layout: linked Install Space Layout: None -------------------------------------------------------------------------------- Additional CMake Args: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_BUILD_TYPE=Release Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False -------------------------------------------------------------------------------- Buildlisted Packages: None Skiplisted Packages: None -------------------------------------------------------------------------------- Workspace configuration appears valid. -------------------------------------------------------------------------------- [build] Found 82 packages in 0.0 seconds. [build] Package table is up to date. Starting >>> blasfeo_catkin Starting >>> cgal5_catkin Starting >>> elevation_map_msgs Starting >>> grid_map_core Starting >>> grid_map_msgs Starting >>> hpp-fcl Starting >>> ocs2_msgs Starting >>> ocs2_robotic_assets Finished <<< blasfeo_catkin [ 0.2 seconds ] Starting >>> ocs2_thirdparty Finished <<< cgal5_catkin [ 1.3 seconds ] Starting >>> semantic_sensor Finished <<< grid_map_core [ 0.2 seconds ] Starting >>> grid_map_costmap_2d Finished <<< ocs2_robotic_assets [ 0.2 seconds ] Starting >>> grid_map_cv Finished <<< ocs2_thirdparty [ 0.2 seconds ] Starting >>> grid_map_octomap Finished <<< elevation_map_msgs [ 0.6 seconds ] Starting >>> grid_map_sdf Finished <<< ocs2_msgs [ 1.1 seconds ] Starting >>> ocs2_switched_model_msgs Finished <<< grid_map_msgs [ 0.9 seconds ] Starting >>> convex_plane_decomposition_msgs _______________________________________________________________________________ Warnings << hpp-fcl:install /home/kuanli/ocs2_ws/logs/hpp-fcl/build.install.003.log Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Error: /undefined in getenv Operand stack: (outfile) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 4 %oparray_pop 1989 1 4 %oparray_pop 1977 1 4 %oparray_pop 1833 1 4 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:731/1123(ro)(G)-- --dict:0/20(G)-- --dict:76/200(L)-- --dict:5/30(L)-- --dict:11/30(L)-- Current allocation mode is local Current file position is 8386 GPL Ghostscript 9.50: Unrecoverable error, exit code 1 cd /home/kuanli/ocs2_ws/build/hpp-fcl; catkin build --get-env hpp-fcl | catkin env -si /usr/bin/make install; cd - ............................................................................... Finished <<< hpp-fcl [ 4.2 seconds ] Starting >>> ocs2_core Finished <<< semantic_sensor [ 0.1 seconds ] Starting >>> pinocchio Finished <<< grid_map_costmap_2d [ 0.1 seconds ] Finished <<< grid_map_octomap [ 0.2 seconds ] Finished <<< grid_map_sdf [ 0.2 seconds ] Finished <<< grid_map_cv [ 0.4 seconds ] Starting >>> grid_map_filters_rsl Starting >>> grid_map_ros Finished <<< ocs2_switched_model_msgs [ 0.5 seconds ] Finished <<< convex_plane_decomposition_msgs [ 0.5 seconds ] Finished <<< grid_map_filters_rsl [ 0.2 seconds ] Starting >>> convex_plane_decomposition Finished <<< ocs2_core [ 0.5 seconds ] Starting >>> ocs2_frank_wolfe Starting >>> ocs2_oc Finished <<< grid_map_ros [ 0.5 seconds ] Starting >>> elevation_mapping_cupy Starting >>> grid_map_filters Starting >>> grid_map_loader Starting >>> grid_map_pcl Finished <<< pinocchio [ 2.9 seconds ] Starting >>> grid_map_rviz_plugin Finished <<< ocs2_oc [ 0.2 seconds ] Finished <<< ocs2_frank_wolfe [ 0.2 seconds ] Starting >>> grid_map_visualization Starting >>> ocs2_mpc Finished <<< elevation_mapping_cupy [ 0.3 seconds ] Finished <<< convex_plane_decomposition [ 0.6 seconds ] Finished <<< grid_map_loader [ 0.2 seconds ] Finished <<< grid_map_rviz_plugin [ 0.4 seconds ] Starting >>> ocs2_qp_solver Finished <<< grid_map_visualization [ 0.3 seconds ] Finished <<< ocs2_mpc [ 0.3 seconds ] Starting >>> ocs2_raisim_core Finished <<< ocs2_qp_solver [ 0.3 seconds ] Finished <<< grid_map_filters [ 1.0 seconds ] Starting >>> grid_map_demos Starting >>> hpipm_catkin Starting >>> ocs2_ddp Starting >>> ocs2_robotic_tools Starting >>> ocs2_ros_interfaces Finished <<< ocs2_raisim_core [ 0.2 seconds ] Starting >>> ocs2_raisim_ros Finished <<< grid_map_pcl [ 1.2 seconds ] Starting >>> ocs2_slp Finished <<< ocs2_ddp [ 0.2 seconds ] Starting >>> ocs2_ocs2 Finished <<< ocs2_robotic_tools [ 0.2 seconds ] Starting >>> ocs2_cartpole Starting >>> ocs2_perceptive Finished <<< hpipm_catkin [ 0.2 seconds ] Finished <<< ocs2_raisim_ros [ 0.2 seconds ] Finished <<< grid_map_demos [ 0.6 seconds ] Finished <<< ocs2_slp [ 0.3 seconds ] Starting >>> grid_map Finished <<< ocs2_ocs2 [ 0.2 seconds ] Starting >>> convex_plane_decomposition_ros Starting >>> ocs2_ipm Starting >>> ocs2_python_interface Starting >>> ocs2_sqp Finished <<< ocs2_ros_interfaces [ 0.7 seconds ] Starting >>> ocs2_switched_model_interface Finished <<< ocs2_cartpole [ 0.3 seconds ] Starting >>> ocs2_cartpole_ros Finished <<< grid_map [ 0.1 seconds ] Starting >>> ocs2_pinocchio_interface Finished <<< ocs2_perceptive [ 0.3 seconds ] Finished <<< ocs2_sqp [ 0.2 seconds ] Finished <<< ocs2_ipm [ 0.3 seconds ] Finished <<< ocs2_python_interface [ 0.2 seconds ] Finished <<< convex_plane_decomposition_ros [ 1.0 seconds ] Starting >>> ocs2_double_integrator Finished <<< ocs2_pinocchio_interface [ 0.4 seconds ] Starting >>> ocs2_quadrotor Starting >>> ocs2_mpcnet_core Starting >>> ocs2_ballbot Starting >>> ocs2_centroidal_model Finished <<< ocs2_cartpole_ros [ 0.7 seconds ] Starting >>> ocs2_self_collision Starting >>> ocs2_sphere_approximation Finished <<< ocs2_double_integrator [ 0.3 seconds ] Starting >>> ocs2_double_integrator_ros Finished <<< ocs2_switched_model_interface [ 1.0 seconds ] Starting >>> ocs2_anymal_commands Finished <<< ocs2_centroidal_model [ 0.2 seconds ] Starting >>> ocs2_anymal_models Finished <<< ocs2_ballbot [ 0.3 seconds ] Starting >>> ocs2_ballbot_ros Finished <<< ocs2_quadrotor [ 0.2 seconds ] Finished <<< ocs2_self_collision [ 0.2 seconds ] Finished <<< ocs2_sphere_approximation [ 0.3 seconds ] Finished <<< ocs2_mpcnet_core [ 0.7 seconds ] Finished <<< ocs2_double_integrator_ros [ 0.8 seconds ] Starting >>> ocs2_quadrotor_ros Finished <<< ocs2_anymal_commands [ 1.0 seconds ] Starting >>> ocs2_legged_robot Finished <<< ocs2_anymal_models [ 1.0 seconds ] Starting >>> ocs2_mobile_manipulator Finished <<< ocs2_ballbot_ros [ 1.1 seconds ] Starting >>> ocs2_ballbot_mpcnet Starting >>> ocs2_self_collision_visualization Starting >>> segmented_planes_terrain_model Finished <<< ocs2_quadrotor_ros [ 0.7 seconds ] Finished <<< ocs2_legged_robot [ 0.4 seconds ] Starting >>> ocs2_legged_robot_ros Finished <<< ocs2_mobile_manipulator [ 0.3 seconds ] Finished <<< ocs2_ballbot_mpcnet [ 0.9 seconds ] Finished <<< ocs2_self_collision_visualization [ 0.9 seconds ] Starting >>> ocs2_pinocchio Starting >>> ocs2_mobile_manipulator_ros Finished <<< segmented_planes_terrain_model [ 1.2 seconds ] Finished <<< ocs2_legged_robot_ros [ 0.9 seconds ] Starting >>> ocs2_legged_robot_raisim Starting >>> ocs2_quadruped_interface Finished <<< ocs2_pinocchio [ 0.2 seconds ] Finished <<< ocs2_mobile_manipulator_ros [ 0.5 seconds ] Finished <<< ocs2_legged_robot_raisim [ 0.7 seconds ] Starting >>> ocs2_raisim Starting >>> ocs2_legged_robot_mpcnet Finished <<< ocs2_quadruped_interface [ 0.9 seconds ] Starting >>> ocs2_anymal_mpc Starting >>> ocs2_quadruped_loopshaping_interface Finished <<< ocs2_raisim [ 0.1 seconds ] Finished <<< ocs2_legged_robot_mpcnet [ 0.6 seconds ] Starting >>> ocs2_mpcnet Finished <<< ocs2_mpcnet [ 0.2 seconds ] Finished <<< ocs2_quadruped_loopshaping_interface [ 1.0 seconds ] Finished <<< ocs2_anymal_mpc [ 1.0 seconds ] Starting >>> ocs2_anymal_loopshaping_mpc Finished <<< ocs2_anymal_loopshaping_mpc [ 0.3 seconds ] Starting >>> ocs2_anymal Finished <<< ocs2_anymal [ 0.1 seconds ] Starting >>> ocs2_robotic_examples Finished <<< ocs2_robotic_examples [ 0.1 seconds ] Starting >>> ocs2 Starting >>> ocs2_doc Finished <<< ocs2 [ 0.1 seconds ] Finished <<< ocs2_doc [ 1.5 seconds ] [build] Summary: All 82 packages succeeded! [build] Ignored: None. [build] Warnings: 1 packages succeeded with warnings. [build] Abandoned: None. [build] Failed: None. [build] Runtime: 20.5 seconds total.
source devel/setup.bash catkin run_tests ocs2 ==> Expanding alias 'run_tests' from 'catkin run_tests ocs2' to 'catkin test ocs2' Starting >>> ocs2 Output << ocs2:results /home/kuanli/ocs2_ws/logs/ocs2/test.results.000.log Summary: 0 tests, 0 errors, 0 failures, 0 skipped cd /home/kuanli/ocs2_ws/build/ocs2; catkin test --get-env ocs2 | catkin env -si catkin_test_results; cd - Finished <<< ocs2 [ 0.2 seconds ] [test] Summary: All 1 packages succeeded! [test] Ignored: None. [test] Warnings: None. [test] Abandoned: None. [test] Failed: None. [test] Runtime: 0.4 seconds total.
1.2.2 构建本文档
假设已安装 python catkin 工具,请运行以下命令:
讯享网# Navigate to the directory of ocs2_doc # Do not forget to change <...> parts cd <directory_to_ws>/<catkin_ws_name>/src/ocs2/ocs2_doc # make build directory mkdir -p build # Navigate to the build folder cd build # build docs cmake .. make
这将生成文档并将其放在 build/output/sphinx 文件夹中。在浏览器中打开 index.html。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/84007.html