我想在 Gazebo 中模拟 Tiago 机器人,并且我正在使用 ROS 可用包。以前我模拟没有问题,但现在不行。我在 KVM 虚拟机上使用 ROS melodic 和 ubuntu 18.04。当我使用catkin_make
命令构建工作区时,发生以下错误:
[ 1%] Built target _tiago_pick_demo_generate_messages_check_deps_PickUpPoseGoal
[ 1%] Generating dynamic reconfigure files from cfg/SphericalGrasp.cfg: /home/pouyan/tiago_ws/devel/include/tiago_pick_demo/SphericalGraspConfig.h /home/pouyan/tiago_ws/devel/lib/python2.7/dist-packages/tiago_pick_demo/cfg/SphericalGraspConfig.py
[ 1%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libposition_controllers.so
[ 1%] Built target tiago_pcl_tutorial_gencfg
Scanning dependencies of target run_traj_control
[ 1%] Built target _tiago_pick_demo_generate_messages_check_deps_PickUpPoseResult
Scanning dependencies of target transmission_interface_parser
[ 1%] Built target _tiago_pick_demo_generate_messages_check_deps_PickUpPoseActionResult
Generating reconfiguration files for SphericalGrasp in spherical_grasps_server
[ 1%] Building CXX object tiago_tutorials/tiago_trajectory_controller/CMakeFiles/run_traj_control.dir/src/run_traj_control.cpp.o
Wrote header file in /home/pouyan/tiago_ws/devel/include/tiago_pick_demo/SphericalGraspConfig.h
[ 1%] Building CXX object ros_control/transmission_interface/CMakeFiles/transmission_interface_parser.dir/src/transmission_parser.cpp.o
Scanning dependencies of target gazebo_ros_block_laser
Scanning dependencies of target effort_controllers
[ 1%] Built target force_torque_sensor_controller
[ 1%] Built target actuator_state_controller
[ 1%] Built target tiago_pick_demo_gencfg
Scanning dependencies of target gazebo_ros_laser
Scanning dependencies of target polled_camera_generate_messages_cpp
[ 1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_effort_controller.cpp.o
[ 1%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libimu_sensor_controller.so
Scanning dependencies of target polled_camera_generate_messages_eus
[ 1%] Built target polled_camera_generate_messages_cpp
[ 1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_velocity_controller.cpp.o
[ 1%] Built target polled_camera_generate_messages_eus
[ 1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_position_controller.cpp.o
[ 1%] Built target position_controllers
[ 1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_group_effort_controller.cpp.o
[ 2%] Linking CXX executable /home/pouyan/tiago_ws/devel/lib/pal_gazebo_worlds/increase_real_time_factor
[ 2%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/src/gazebo_ros_block_laser.cpp.o
[ 3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/src/gazebo_ros_laser.cpp.o
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libjoint_state_controller.so
[ 3%] Built target imu_sensor_controller
Scanning dependencies of target diagnostic_msgs_generate_messages_lisp
[ 3%] Built target diagnostic_msgs_generate_messages_lisp
[ 3%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_group_position_controller.cpp.o
[ 3%] Built target increase_real_time_factor
Scanning dependencies of target diagnostic_msgs_generate_messages_py
[ 3%] Built target diagnostic_msgs_generate_messages_py
Scanning dependencies of target polled_camera_generate_messages_nodejs
[ 3%] Built target polled_camera_generate_messages_nodejs
[ 3%] Built target joint_state_controller
Scanning dependencies of target polled_camera_generate_messages_lisp
Scanning dependencies of target diagnostic_msgs_generate_messages_eus
[ 3%] Built target diagnostic_msgs_generate_messages_eus
[ 3%] Built target polled_camera_generate_messages_lisp
Scanning dependencies of target diagnostic_msgs_generate_messages_nodejs
Scanning dependencies of target polled_camera_generate_messages_py
[ 3%] Built target diagnostic_msgs_generate_messages_nodejs
[ 3%] Built target polled_camera_generate_messages_py
Scanning dependencies of target diagnostic_msgs_generate_messages_cpp
Scanning dependencies of target MultiCameraPlugin
[ 3%] Built target diagnostic_msgs_generate_messages_cpp
Scanning dependencies of target gazebo_ros_projector
[ 3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/MultiCameraPlugin.dir/src/MultiCameraPlugin.cpp.o
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libjoint_torque_sensor_state_controller.so
[ 3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_projector.dir/src/gazebo_ros_projector.cpp.o
[ 3%] Built target joint_torque_sensor_state_controller
Scanning dependencies of target gazebo_ros_hand_of_god
[ 3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_hand_of_god.dir/src/gazebo_ros_hand_of_god.cpp.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/build.make:62: recipe for target 'tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/src/look_to_point.cpp.o' failed
make[2]: *** [tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/src/look_to_point.cpp.o] Error 1
CMakeFiles/Makefile2:28217: recipe for target 'tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/all' failed
make[1]: *** [tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/build.make:62: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/src/nodes/segment_table.cpp.o' failed
make[2]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/src/nodes/segment_table.cpp.o] Error 1
CMakeFiles/Makefile2:41209: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/all' failed
make[1]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/all] Error 2
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/build.make:62: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/src/pcl_filters.cpp.o' failed
make[2]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/src/pcl_filters.cpp.o] Error 1
CMakeFiles/Makefile2:41315: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/all' failed
make[1]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/all] Error 2
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libtransmission_interface_parser.so
[ 3%] Built target transmission_interface_parser
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libaruco_ros_utils.so
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/build.make:62: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/src/gazebo_ros_block_laser.cpp.o' failed
make[2]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/src/gazebo_ros_block_laser.cpp.o] Error 1
CMakeFiles/Makefile2:44726: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/all' failed
make[1]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/all] Error 2
[ 3%] Built target aruco_ros_utils
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/build.make:62: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/src/gazebo_ros_laser.cpp.o' failed
make[2]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/src/gazebo_ros_laser.cpp.o] Error 1
CMakeFiles/Makefile2:44827: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/all' failed
make[1]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/all] Error 2
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libeffort_controllers.so
[ 3%] Built target effort_controllers
[ 3%] Linking CXX executable /home/pouyan/tiago_ws/devel/lib/tiago_trajectory_controller/run_traj_control
[ 3%] Built target run_traj_control
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libgazebo_ros_hand_of_god.so
[ 3%] Built target gazebo_ros_hand_of_god
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libgazebo_ros_projector.so
[ 3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libMultiCameraPlugin.so
[ 3%] Built target MultiCameraPlugin
[ 3%] Built target gazebo_ros_projector
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j16 -l16" failed
我搜索了很多但不知道如何解决。
谢谢
解决方案:根据Marcus的回答,我将KVM的内存大小增加了一倍。为了编辑 KVM 的内存大小,这个 Youtube 视频对我有用:https://www.youtube.com/watch?v=LwLHwXWoYjk
答案1
你的内存耗尽了,严重到你的操作系统杀死了你的编译器。
因此,减少并行度,或者为构建虚拟机分配更多 RAM。