pocketxjl / humanoid-control

A humanoid bipedal walking control repo using NMPC and WBC, and simulation with mujoco. Contact: xuejl2001@mail.ustc.edu.cn
MIT License
188 stars 34 forks source link

编译时出现错误 #5

Closed rcone11 closed 3 months ago

rcone11 commented 3 months ago

在ubuntu20.04系统下,OCS2已经全部编译成功了,我将OCS2和这个文件夹分别放进了两个工作空间当中,如果我将这个文件在OCS2的工作空间中进行编译就可以编译成功,但是在这个文件的工作空间中执行catkin build humanoid_controllers humanoid_legged_description mujoco_sim时,就报了下面的错误,该怎么解决?

Errors     << humanoid_interface:cmake /home/rui/wbc_ws/logs/humanoid_interface/build.cmake.008.log
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "ocs2_core" with
  any of the following names:

    ocs2_coreConfig.cmake
    ocs2_core-config.cmake

  Add the installation prefix of "ocs2_core" to CMAKE_PREFIX_PATH or set
  "ocs2_core_DIR" to a directory containing one of the above files.  If
  "ocs2_core" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:21 (find_package)

cd /home/rui/wbc_ws/build/humanoid_interface; catkin build --get-env humanoid_interface | catkin env -si  /usr/bin/cmake /home/rui/wbc_ws/src/humanoid-control/humanoid_interface --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/rui/wbc_ws/devel/.private/humanoid_interface -DCMAKE_INSTALL_PREFIX=/home/rui/wbc_ws/install -DCMAKE_BUILD_TYPE=RelWithDebInfo; cd -

...............................................................................
Failed     << humanoid_interface:cmake                   [ Exited with code 1 ]
Failed    <<< humanoid_interface                         [ 0.4 seconds ]       
Abandoned <<< humanoid_dummy                             [ Unrelated job failed ]
Abandoned <<< humanoid_estimation                        [ Unrelated job failed ]
Abandoned <<< humanoid_wbc                               [ Unrelated job failed ]
Abandoned <<< humanoid_controllers                       [ Unrelated job failed ]
[build] Summary: 4 of 9 packages succeeded.                                    
[build]   Ignored:   None.                                                     
[build]   Warnings:  None.                                                     
[build]   Abandoned: 4 packages were abandoned.                                
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 0.7 seconds total
zhj3180 commented 3 months ago

我是把他所有要求的包放在src里,编译之后,再git clone把这个humanoid-control放到src,按照他的安装指令安装就可以

rcone11 commented 3 months ago

我是把他所有要求的包放在src里,编译之后,再git clone把这个humanoid-control放到src,按照他的安装指令安装就可以

是的,将所有的包放进一个工作空间内是可以编译成功的,但是,放在不同的工作空间就会出现我发的图片上的问题,另外,请问你在mujoco上运行成功了吗

zhj3180 commented 3 months ago

放在不同空间我没有试过,mujoco运行没问题。要等到终端显示所有的模型函数加载完,再在mujoco里按空格,不然直接就摊那里了

rcone11 commented 3 months ago

放在不同空间我没有试过,mujoco运行没问题。要等到终端显示所有的模型函数加载完,再在mujoco里按空格,不然直接就摊那里了

bashrc文件中需要添加别的代码吗?比如sourec或者export之类的代码?

zhj3180 commented 3 months ago

export ROBOT_TYPE=a1这个是在跑四足control的时候加的,设定机器人型号,在legged_control是必要的,这个项目是基于四足的,这里不知道是不是必要的。要不加个联系方式交流?方便把联系方式用邮件发我吗?zhanghongjia01@163.com