Ask Your Question
0

c++: fatal MoveIt 2 error: Killed signal terminated program cc1plus compilation.

asked 2020-12-19 03:07:22 -0500

Danroy gravatar image

updated 2020-12-21 09:46:20 -0500

gvdhoorn gravatar image

Hallo everyone, i am trying to install MoveIt2 on ros2. Therefore i am following the tutorial at MoveIt 2 Install. I was able to install ros2 correctly and also tried the listener and talker node to see if it works properly. But when i execute the command

colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release

on the install moveit2 page my terminal crashes with the following

Starting >>> geometric_shapes
Starting >>> moveit_msgs
Starting >>> srdfdom
Starting >>> moveit_common
Finished <<< moveit_common [0.65s]
Starting >>> hardware_interface
Finished <<< srdfdom [1.04s]
Starting >>> moveit_resources_panda_description
Finished <<< moveit_resources_panda_description [0.40s]
Starting >>> moveit_resources_fanuc_description
Finished <<< geometric_shapes [1.55s]
Starting >>> moveit_resources_panda_moveit_config
Finished <<< hardware_interface [1.21s]
Starting >>> controller_interface
Finished <<< moveit_resources_panda_moveit_config [0.47s]
Starting >>> test_robot_hardware
Finished <<< moveit_resources_fanuc_description [0.57s]
Starting >>> warehouse_ros
Finished <<< controller_interface [0.47s]
Starting >>> moveit_resources_fanuc_moveit_config
Finished <<< test_robot_hardware [0.58s]
Starting >>> controller_manager
Finished <<< warehouse_ros [0.64s]
Starting >>> moveit_resources_pr2_description
Finished <<< moveit_resources_fanuc_moveit_config [0.36s]
Starting >>> transmission_interface
Finished <<< moveit_resources_pr2_description [0.48s]
Starting >>> warehouse_ros_mongo
Finished <<< transmission_interface [0.65s]
Starting >>> moveit_resources
Finished <<< controller_manager [0.84s]
Starting >>> joint_state_controller
Finished <<< moveit_resources [0.40s]
Starting >>> joint_trajectory_controller
Finished <<< warehouse_ros_mongo [0.68s]
Starting >>> diff_drive_controller
Finished <<< joint_state_controller [0.75s]
Starting >>> ros2_control
Finished <<< joint_trajectory_controller [0.78s]
Finished <<< diff_drive_controller [0.76s]
Starting >>> ros2_controllers
Finished <<< ros2_control [0.45s]
Finished <<< ros2_controllers [0.26s]
Starting >>> fake_joint_driver
Finished <<< fake_joint_driver [0.50s]
Finished <<< moveit_msgs [6.63s]
Starting >>> moveit_core
Finished <<< moveit_core [1.86s]
Starting >>> moveit_ros_occupancy_map_monitor
Starting >>> moveit_simple_controller_manager
Finished <<< moveit_simple_controller_manager [0.47s]
Finished <<< moveit_ros_occupancy_map_monitor [0.57s]
Starting >>> moveit_ros_planning
Finished <<< moveit_ros_planning [1.16s]
Starting >>> moveit_kinematics
Starting >>> moveit_ros_warehouse
Starting >>> moveit_ros_robot_interaction
Starting >>> moveit_fake_controller_manager
Finished <<< moveit_fake_controller_manager [0.85s]
Starting >>> moveit_planners_ompl
Finished <<< moveit_kinematics [0.98s]
Starting >>> moveit_ros_move_group
Finished <<< moveit_ros_robot_interaction [1.04s]
Finished <<< moveit_ros_warehouse [1.08s]
Starting >>> moveit_ros_benchmarks
Finished <<< moveit_ros_benchmarks [0.74s]
Finished <<< moveit_planners_ompl [0.97s]
Finished <<< moveit_ros_move_group [0.99s]
Starting >>> moveit_ros_planning_interface
Finished <<< moveit_ros_planning_interface [0.54s]
Starting >>> moveit_ros_visualization
Starting >>> moveit_servo
Starting >>> run_move_group
Starting >>> run_moveit_cpp
Finished <<< run_move_group [0.75s]
Finished <<< run_moveit_cpp [0.81s]
Finished <<< moveit_servo [1.19s]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
[Processing: moveit_ros_visualization]
--- stderr: moveit_ros_visualization
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/build.make:158: motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_states.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:561: motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< moveit_ros_visualization [14min 25s, exited with code 2]

Summary: 38 packages finished [14min 38s]
  1 package failed: moveit_ros_visualization
  1 package had stderr output: moveit_ros_visualization

I hope somebody ... (more)

edit retag flag offensive close merge delete

Comments

1

Are you running Ubuntu in a VM? If so: increase the amount of memory assigned to the VM.

If you can't, or this isn't a VM (but some other memory constraint platform/system), try reducing the number of parallel jobs.

The error you show is typically caused by the compiler running out of memory.

gvdhoorn gravatar image gvdhoorn  ( 2020-12-21 09:47:28 -0500 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2021-03-05 00:41:01 -0500

updated 2021-03-05 14:31:29 -0500

This is a classic gcc error, it happens when the system runs out of memory.

The most conservative way I found to make it work (almost always) in those situations is decreasing the number of threads of the compiler and also configuring the parameter "ggc-min-expand" to some convenient value.

Specifically this would translate to colcon as the following example command line:

colcon build --parallel-workers 1 --cmake-args -DCMAKE_CXX_FLAGS="--param ggc-min-expand=20"

This will make the compilation slower but it maximum memory it takes will be lower.

Generalizing the answer to ROS1 the example would be:

 catkin_make -j 1 -DCMAKE_CXX_FLAGS="--param ggc-min-expand=20"
edit flag offensive delete link more
0

answered 2021-01-03 03:09:18 -0500

Danroy gravatar image

Well, thanks for your response. You are right. I was able to fix it by running the build command a few times after my computer froze. Thanks for your answer gvdhoom.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-12-19 03:07:22 -0500

Seen: 1,391 times

Last updated: Mar 05 '21