-
Notifications
You must be signed in to change notification settings - Fork 358
Launch composable nodes (how-to): The program 'burgerimage' received an XWindow System error. #560
Description
Bug report
I'm following the tutorial at https://docs.ros.org/en/galactic/How-To-Guides/Launching-composable-nodes.html. When I run the launch file I get the following error message:
[component_container-1] (burgerimage:22832): Gdk-ERROR **: 15:24:40.279: The program 'burgerimage' received an XWindow System error.
[component_container-1] This probably reflects a bug in the program.
[component_container-1] The error was 'BadAccess (attempt to access private resource denied)'.
[component_container-1] (Details: serial 255 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
[component_container-1] (Note to programmers: normally, X errors are reported asynchronously;
[component_container-1] that is, you will receive the error a while after causing it.
[component_container-1] To debug your program, run it with the GDK_SYNCHRONIZE environment
[component_container-1] variable to change this behavior. You can then get a meaningful
[component_container-1] backtrace from your debugger if you break on the gdk_x_error() function.)
[ERROR] [component_container-1]: process has died [pid 22832, exit code -5, cmd '/opt/ros/galactic/lib/rclcpp_components/component_container --ros-args -r __node:=image_container -r __ns:=/'].
Required Info:
- Operating System:
Ubuntu 20.04.4 LTS - Installation type:
From sourcegit clone https://github.com/ros2/demos.git -b galactic
Not sure if this is related: I have to ignore the packagelifecyclein order for the rest of the packages to build. - Version or commit hash:
Output of git rev-parse HEADed6a3eb69c78e01fe0133a5265c3ff252ac9a3cb - DDS implementation:
The default rmw implementation - Client library (if applicable):
rclpy
Steps to reproduce issue
-
Create a new ROS 2 package, for instance:
ros2 pkg create --build-type ament_python composable_nodes_launcher --dependencies rclpy image_tools -
Create a new launch file and paste the code from the tutorial onto that file:
import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
def generate_launch_description():
"""Generate launch description with multiple components."""
container = ComposableNodeContainer(
name='image_container',
namespace='',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[
ComposableNode(
package='image_tools',
plugin='image_tools::Cam2Image',
name='cam2image',
remappings=[('/image', '/burgerimage')],
parameters=[{'width': 320, 'height': 240, 'burger_mode': True, 'history': 'keep_last'}],
extra_arguments=[{'use_intra_process_comms': True}]),
ComposableNode(
package='image_tools',
plugin='image_tools::ShowImage',
name='showimage',
remappings=[('/image', '/burgerimage')],
parameters=[{'history': 'keep_last'}],
extra_arguments=[{'use_intra_process_comms': True}])
],
output='both',
)
return launch.LaunchDescription([container])
-
Open the
setup.pyfile and add the imports and the line(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),within the data_files brackets. -
Compile, source and launch.
Expected behavior
The example doesn't crash.
Actual behavior
The example crashes with the error message shown above.
Additional information
As mentioned I have to ignore the package lifecycle in order for the rest of the demos repository packages to build.
To ignore the lifecycle package I created a CATKIN_IGNORE inside of it. With this workaround image_tools builds fine.