My launch file worked for months and then suddenly stop working with the following error:
[INFO] [launch]: All log files can be found below /root/.ros/log/2022-10-11-13-50-06-875954-92ef4b39436c-288795
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [288805]
[INFO] [spawn_entity.py-2]: process started with pid [288808]
[INFO] [robot_state_publisher-3]: process started with pid [288810]
[robot_state_publisher-3] Parsing robot urdf xml string.
[robot_state_publisher-3] Link BASE had 1 children
[robot_state_publisher-3] Link LINK_1 had 1 children
[robot_state_publisher-3] Link LINK_2 had 1 children
[robot_state_publisher-3] Link LINK_3 had 1 children
[robot_state_publisher-3] Link LINK_4 had 1 children
[robot_state_publisher-3] [INFO] [1665496207.239646453] [robot_state_publisher]: got segment BASE
[robot_state_publisher-3] [INFO] [1665496207.239798989] [robot_state_publisher]: got segment LINK_1
[robot_state_publisher-3] [INFO] [1665496207.239817132] [robot_state_publisher]: got segment LINK_2
[robot_state_publisher-3] [INFO] [1665496207.239827544] [robot_state_publisher]: got segment LINK_3
[robot_state_publisher-3] [INFO] [1665496207.239843665] [robot_state_publisher]: got segment LINK_4
[robot_state_publisher-3] [INFO] [1665496207.239880454] [robot_state_publisher]: got segment world
[spawn_entity.py-2] [INFO] [1665496207.562289803] [spawn_entity]: Spawn Entity started
[spawn_entity.py-2] [INFO] [1665496207.562763886] [spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-2] [INFO] [1665496207.564276168] [spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-2] [INFO] [1665496207.579126990] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-2] [INFO] [1665496207.579766050] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-2] Traceback (most recent call last):
[spawn_entity.py-2] File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_generator_py/import_type_support_impl.py", line 46, in import_type_support
[spawn_entity.py-2] return importlib.import_module(module_name, package=pkg_name)
[spawn_entity.py-2] File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
[spawn_entity.py-2] return _bootstrap._gcd_import(name[level:], package, level)
[spawn_entity.py-2] File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
[spawn_entity.py-2] File "<frozen importlib._bootstrap>", line 991, in _find_and_load
[spawn_entity.py-2] File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
[spawn_entity.py-2] File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
[spawn_entity.py-2] File "<frozen importlib._bootstrap>", line 556, in module_from_spec
[spawn_entity.py-2] File "<frozen importlib._bootstrap_external>", line 1166, in create_module
[spawn_entity.py-2] File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
[spawn_entity.py-2] ImportError: /opt/ros/foxy/lib/libgazebo_msgs__rosidl_generator_c.so: undefined symbol: geometry_msgs__msg__Vector3__Sequence__are_equal
[spawn_entity.py-2]
[spawn_entity.py-2] During handling of the above exception, another exception occurred:
[spawn_entity.py-2]
[spawn_entity.py-2] Traceback (most recent call last):
[spawn_entity.py-2] File "/opt/ros/foxy/lib/gazebo_ros/spawn_entity.py", line 367, in <module>
[spawn_entity.py-2] main()
[spawn_entity.py-2] File "/opt/ros/foxy/lib/gazebo_ros/spawn_entity.py", line 362, in main
[spawn_entity.py-2] exit_code = spawn_entity_node.run()
[spawn_entity.py-2] File "/opt/ros/foxy/lib/gazebo_ros/spawn_entity.py", line 225, in run
[spawn_entity.py-2] success = self._spawn_entity(entity_xml, initial_pose, self.args.spawn_service_timeout)
[spawn_entity.py-2] File "/opt/ros/foxy/lib/gazebo_ros/spawn_entity.py", line 272, in _spawn_entity
[spawn_entity.py-2] client = self.create_client(SpawnEntity, '%s/spawn_entity' % self.args.gazebo_namespace)
[spawn_entity.py-2] File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py", line 1249, in create_client
[spawn_entity.py-2] check_for_type_support(srv_type)
[spawn_entity.py-2] File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/type_support.py", line 29, in check_for_type_support
[spawn_entity.py-2] msg_type.__class__.__import_type_support__()
[spawn_entity.py-2] File "/opt/ros/foxy/lib/python3.8/site-packages/gazebo_msgs/srv/_spawn_entity.py", line 355, in __import_type_support__
[spawn_entity.py-2] module = import_type_support('gazebo_msgs')
[spawn_entity.py-2] File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_generator_py/import_type_support_impl.py", line 48, in import_type_support
[spawn_entity.py-2] raise UnsupportedTypeSupport(pkg_name)
[spawn_entity.py-2] rosidl_generator_py.import_type_support_impl.UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package 'gazebo_msgs'
[ERROR] [spawn_entity.py-2]: process has died [pid 288808, exit code 1, cmd '/opt/ros/foxy/lib/gazebo_ros/spawn_entity.py -entity URDF_6links_v1 -topic robot_description --ros-args'].
The spawn entity code I used is :
spawn_entity_cmd = Node(
package='gazebo_ros',
executable='spawn_entity.py',
arguments=['-entity', robot_name_in_model,
'-topic', 'robot_description',
],
output='both')
ld = LaunchDescription()
ld.add_action(spawn_entity_cmd)
What can cause these errors?