宇树科技ROS编译时遇到的几个问题与解决

哥们刚开始搞,报了一堆错,害。

1. Cmake版本错误

Cmake版本过低,直接按照这个链接安装新的就行。
链接: link

2. robot_state_publisher

报错信息如下所示:

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "robot_state_publisher" with any of the following names:

    robot_state_publisherConfig.cmake
    robot_state_publisher-config.cmake

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


-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

这个是忘记安装robot_state_publisher这个包了,安装一下就行。

sudo apt-get install ros-melodic-robot-state-publisher

3. xacro

报错信息如下所示:

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "xacro" with any of
  the following names:

    xacroConfig.cmake
    xacro-config.cmake

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


-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

安装一下就行了。

sudo apt install ros-melodic-xacro

4. move-base-msgs

报错信息如下所示:

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

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


-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

安装一下就行了。

sudo apt-get install ros-melodic-move-base-msgs

5. -llcm

报错信息如下所示:

/usr/bin/ld: 找不到 -llcm
collect2: error: ld returned 1 exit status
unitree_guide/unitree_guide/CMakeFiles/junior_ctrl.dir/build.make:538: recipe for target '/home/unitree/Utrobot/devel/lib/unitree_guide/junior_ctrl' failed
make[2]: *** [/home/unitree/Utrobot/devel/lib/unitree_guide/junior_ctrl] Error 1
CMakeFiles/Makefile2:3617: recipe for target 'unitree_guide/unitree_guide/CMakeFiles/junior_ctrl.dir/all' failed
make[1]: *** [unitree_guide/unitree_guide/CMakeFiles/junior_ctrl.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed

安装一下就行了。

sudo apt-get install liblcm-dev

到目前为止,编译过程是不报错了,后面有报错再说吧。

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值