哥们刚开始搞,报了一堆错,害。
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
到目前为止,编译过程是不报错了,后面有报错再说吧。