When i try to run the example code , it is successful. But as i run it in the ros2 foxy env,it failed.
I can change code by ChannelFactoryInitialize(2, "eth0") to pass the compile . But when I use the node ,it also failed caused by [ClientStub] send request error. id: 1376073417687 .
May be it is the cycloneDDS problem ,but I have no idea to solve it.