When calling rclpy.init() and ChannelFactoryInitialize(0) in the same program, depending on the order of execution, either the error [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Precondition Not Met or [ChannelFactory] create domain error. msg: Occurred upon initialisation of a cyclonedds.domain.Domain will occur. The root cause is that both ROS 2 and the SDK attempt to initialize a DDS domain with ID 0 by default. This can be resolved by modifying the domain used by ROS 2 via export ROS_DOMAIN_ID=1.
When calling
rclpy.init()andChannelFactoryInitialize(0)in the same program, depending on the order of execution, either the error[rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Precondition Not Metor[ChannelFactory] create domain error. msg: Occurred upon initialisation of a cyclonedds.domain.Domainwill occur. The root cause is that both ROS 2 and the SDK attempt to initialize a DDS domain with ID 0 by default. This can be resolved by modifying the domain used by ROS 2 viaexport ROS_DOMAIN_ID=1.