ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Robotics Distributed System based on Kubernetes

To folks who were unable to attend: I’m very sorry. We actually had a hilarious number of technical issues and ended up having a meeting split between webex and Google Meet. As a result we were unable to record it. Please take a look at the presentation material provided by @tomoyafujita, and he mentioned he’d be willing to answer any follow-up questions.

Thank you, @tomoyafujita, for an excellent presentation!

3 Likes

Thank you very much for sharing the work, Tomoya!! I think this is the future of cloud robotics.

Hi @tomoyafujita I am very interested about fleet management system and its architecture, I wan to join you guys.

1 Like

@Youssef_Lahrouni

happy to hear that! Any idea will do good, so feel free to ask us anything.
Actually we are trying to find more practical trial environment (could be Sony internal, but also willing to work together as open collaboration), say 10 robotics system and navigation application something like that. so that we can squeeze out more problems to adjust and fix.

1 Like

I set up K8s master and slave just like Tomoya did and ran a talker and listener ROS2 application in each node. Interestingly, it works sometimes but not always … I don’t have a clue. I used Weave Net as Tomoya suggested. Is there anything special I need to set up in Weave Net for stable ROS2 communication?

@yjkim046

I need to set up in Weave Net for stable ROS2 communication?

No i do not think so,

it works sometimes but not always …

maybe you can share what happened a little bit more? lister cannot get a message?

@tomoyafujita
Sorry, it works. It took time for us to sort our the internal problem.

BTW, what would you say to making each robot as a single-node cluster (as opposed to worker node) and build a multi-cluster system for multi-robots?
Some cloud-side guy is telling me that Kubernetes is designed to orchestrate containers not nodes, which means that ‘nodeSelector’ is simply a guideline to K8s, not a rule that K8s should follow. In that case, it’s not guaranteed to run the talker at a specific node as we wanted to.

@yjkim046

Sorry, it works.

sounds good, happy to hear that.
we have never done using Navigation2 with Kubernetes so this is really good information. thanks.

what would you say to making each robot as a single-node cluster (as opposed to worker node) and build a multi-cluster system for multi-robots?

i would say probable and possible, using federation to connect each cluster. actually we have tried to use federation to connect multi-cluster system, it works okay. but our use case is more like generic multi-cluster system like cloud and edge. not have concrete image or use case for what you mention.

Kubernetes is designed to orchestrate containers not nodes,

i guess this is correct. but it does not mean the following,

‘nodeSelector’ is simply a guideline to K8s, not a rule that K8s should follow.

sounds politics for me,

at least k8s has interface for Pods assignment for Nodes such as label, nodeSelector and nodeAffinity. besides, there is Device-Plugins to advertise hardware device on the specific nodes.

@tomoyafujita Thank you, Tomoya … I have a couple of more questions that I’d like to ask… :slight_smile:

In your setup, I see that 3 K8s nodes are in the same LAN. What if those nodes are in different network? Is it supposed to work?

In WeaveNet site, they say they support multicast even if the underlying network doesn’t. Would this mean WeaveNet is able to support UDP even if the underlying network doesn’t?

@yjkim046

What if those nodes are in different network? Is it supposed to work?

No, it is not.
if you have to do that, you could use VPN to connect network sites.
this is not our major use case but we tried to use OpenVPN site 2 site configuration to connect different LAN.

Would this mean WeaveNet is able to support UDP even if the underlying network doesn’t?

No sure about this, I’ve never tried something like that. but interested.

@tomoyafujita
It doesn’t work again :frowning: I can ping the talker node from the listener node and vice versa … but the listener cannot get messages. Have you encountered this kind of problem?

@yjkim046

so far we detected this issue, technically this happens physical machine, but it is likely to happen when we use docker container. As a quick work-around, can you try to use rmw_cyclonedds? we confirmed that this problem does not happen.

I really appreciate your sharing. ROS&K8s is future. I have one question.

If I want to use ROS2 to communicate different node in same pod on Kubernetes, Whay should I do? Should I use Weave Net? Sounds like I don’t need to use Weave Net.

Could you tell me how to get the instruction? I wan na try ROS2 on kubernetes.

@QLV5645-QLJ

If I want to use ROS2 to communicate different node in same pod on Kubernetes

i guess that to communicate different nodes in different container in the same pod.

Should I use Weave Net?

No, it is not necessary.
WeaveNet is one of the CNI(Container Network Interface) implementation.
you could use anything you want, also WeaveNet works fine.

at your point, Pod shares network interface and namespace, which means all of the containers( and any nodes in any containers) in the same pod can communicate with each other as localhost.

hope this helps, best

Thanks for your replying. This will help me a lot! I have one more question.

Replacing the network model by one of the CNI implementation in K8s can enable ROS2 communication. Right? So if I wan na use cloud(K8s) to run a turtlebot(edge device) through ROS2 communication, what should I do? Just replace the network model?

@QLV5645-QLJ

Replacing the network model by one of the CNI implementation in K8s can enable ROS2 communication. Right?

yes, that is WeaveNet. (targeting 100% emulation for layer 2)
if i answer on this precisely, that is DDS communication and what’s important is multicast group packets can be through.

what should I do? Just replace the network model?

yes, WeaveNet should be used, if you are using DDS(UDP multicast for participant discovery). but if you use P2P(not multicast) discovery or something, Flannel should be working.

Awesome! By configuring the P2P communication, I have already enable ros2 communication between different containers inside kubernetes. But still can not enable remote ros2 communication between two nodes, where one node is in container(inside k8s) and the other node is outside the k8s. This refer to the deployment on real turtlebot. Do you have any suggestion?

@QLV5645-QLJ

where one node is in container(inside k8s) and the other node is outside the k8s.

this other node is in the same cloud network? asking instances that run k8s and instance that runs other node can connect?

Not in the same network. Yes, instance that runs other node can connect. This node means a ros2 process. For example, I wan na use cloud to control turtlebot when the turtlebot is connnected to the cloud vpn.