How can publish in TCP while subscribe in UDP?
I have a question on TCP and UDP. As I need do close loop control with message published on ROS: the robot will collect LIDAR data and send to laptop through the topic mechanism; the control variable should publish from the laptop to the robot also through the topic mechanism.
After some study, it seems I should choose UDP, not TCP_NODELAY and surely not TCP. As the default is TCP, so transport hints should be used [ros::Subscriber sub = nh.subscribe("my_topic", 1, callback, ros::TransportHints().udp())]. My question here is on wiki it says "You cannot currently specify the transport hints on the Publisher side. This will likely be an option in the future", if on the publisher side it is still TCP, how can UDP built at the subscribe side? As I understand, UDP means publisher will publish without care if there is connection, am I right?
It also says "The UDP-based transport, which is known as UDPROS and is currently only supported in roscpp, separates message into UDP packets". Does this mean I cannot subscribe using UDP in python program, right?