Study of Variational Inference for Flexible Distributed Probabilistic Robotics

By combining stochastic variational inference with message passing algorithms we show how to solve the highly complex problem of navigation and avoidance in distributed multi-robot systems in a computationally tractable manner, allowing online implementation. Subsequently, the proposed variational method lends itself to more flexible solutions than prior methodologies. Furthermore, the derived method is verified both through simulations with multiple mobile robots and a real world experiment with two mobile robots. In both cases the robots shares the operating space and needs to cross each other’s paths multiple times without colliding.


Introduction
Uncertainty is an inherent part of robotics that has to be dealt with explicitly through the robust design of sensors, mechanics, and algorithms. Unlike many other engineering research areas that also have to deal with uncertainties, robotics problems usually also consist of a heterogeneous set of interconnected sub-problems and have strict real-time requirements making it even harder to deal with uncertainty in an appropriate manner [1].
A common approach to model uncertainties in robotics is to employ probability mass functions and/or probability density functions, hereinafter jointly referred to as probability distributions, over model variables. One can then represent many classical robotics problems as a joint distribution, p(x, z), over observable variables, x, and latent variables, z. Given the knowledge that the observable variables, x, can be assigned specific values x, solving the problem then boils down to solving the posterior inference problem given by the conditional distribution Unfortunately, the marginalization by the integral in the denominator of Equation (2) is in general intractable to compute in most realistic problems and thereby the reason why one often has to resort to approximate inference [2]. The classical solution to this problem has been to simplify the model of a problem, p, sufficiently to obtain an approximate problem definition, q ≈ p, for which one can derive or use analytical solutions like the Kalman filter. Hereinafter referred to as the "model simplification method". Typically it is only possible to derive analytical solutions for a very limited set of probability distributions. Thereby, it may be necessary to apply crude approximations to obtain a solution, making it a rather inflexible method. However, such . We propose to solve complicated robotics problems explicitly taking uncertainty into account by utilizing variational inference as seen in the single blue box. To distribute the necessary computations we propose to utilize the concept of message-passing algorithms to divide the overall problem into a set of sub-problems that potentially can be sparsely connected, as illustrated in the green box with blue boxes inside. To make these sub-problems computational tractable we furthermore propose to solve them utilizing stochastic variational inference as seen in the green box with yellow boxes inside.
solutions tend to be computationally efficient, which is why they were commonly used in the early days of probabilistic robotics where computational resources were limited. One good example of this is Kalman filter-based simultaneous localization and mapping (SLAM). It is well known that in many cases the true posterior, p, is multi-modal e.g. due to ambiguities and changes in the environment [3]. However, Kalman filter-based SLAM implicitly assumes a uni-modal Gaussian posterior, q, which in some cases can lead to poor solutions. Another possibility is to use Monte Carlo methods such as particle filters. These methods have the benefit that they usually do not enforce any restrictions on the model, p, making these methods highly flexible. Furthermore, with these methods, it is often possible to obtain any degree of accuracy, at the cost of losing computational efficiency. The computational complexity usually makes these methods unsuitable for solving complex robotics problems in real-time. An example of the use of Monte Carlo methods in robotics is the particle filter-based SLAM algorithm called FastSLAM [4] which only utilizes a particle filter to estimate the posterior of the robots pose and settles for Kalman filters for estimating the pose of landmarks.
The third set of methods, that have gained increasing interest in the last decade due to the advancement in stochastic optimization and increase in computational resources, is the optimization-based methods called variational inference. In variational inference optimization is used to approximate the distribution, p(z), that we are interested in finding, by another simpler distribution q(z), called the variational distribution. Like analytical solutions, variational inference assumes an approximation model, q, and thereby introduces a bias into the solution. The set of possible models that can be employed in modern variational inference is wide, making the method very flexible for modelling robotics problems. This optimization-based approach also makes the distinction between the model of the real problem, p, and the model used to find an approximate solution, q, very explicit and gives a measure of the applicability of the approximate model, q. Furthermore, the use of an approximate model, q, usually allows this set of methods to be more computationally efficient than Monte Carlo methods. As such, variational inference can be viewed as a compromise between the computational efficiency of the model simplification method and the flexibility of Monte Carlo methods. This makes variational inference especially interesting for robotics applications.
Initial efforts on applying variational inference for robot applications have shown promising results in a variety of problems. In [5] variational inference is used to solve several tasks related to navigation in spatial environments for a single robot. In [6] varia-tional inference is used to learn low-level dynamics as well as meta-dynamics of a system, that is subsequently used to plan actions at multiple temporal resolutions. In a similar fashion it is also demonstrated in [7] how variational inference can be used to learn both low-level and high-level action policies from demonstrations. In [8] variational inference with a mixture model as the variational distribution is used to find approximate solutions to robot configurations satisfying multiple objectives. Variational inference have also been used in some distributed settings. In [9] they do centralised training with decentralised execution for cooperative deep multi-agent reinforcement learning, where a variational distribution is used in the approximation of a shared global mutual information objective common for all the agents. In [10] variational inference is used to learn a latent variable model that infers the role and index assignments for a set of demonstration trajectories, before these demonstrations are passed to another algorithm that than learns the optimal policy for each agent in a coordinated multi-Agent problem. Common for [9] and [10] is that variational inference is used to learn global parameters in a centralized fashion. In [11] a more decentralized approach is taken. Here variational inference is used locally on each robot in a swarm to estimates a Bayesian Hilbert Map. These locally estimated maps are subsequently merged through a method called Conflation. An method applicable due to an assumption about normal distributed random variables. While others have successfully used variational inference for robotics applications even in distributed settings, the use of a combination of stochastic variational inference and message-passing for decentralized distributed robotic problems has so far been an untouched topic.
In the present effort, we unite these two major solution approaches in variational inference to outline a flexible framework for solving probabilistic robotics problems in a distributed way. The main contribution in this paper is: • An demonstration of the feasibility of combining stochastic variational inference with message-passing for distributed robotic applications by deriving an algorithm for multi-robot point-to-point navigation with co-operative avoidance under uncertainty. An approach which we validate through simulations and a real-world experiment with two robots.
In Section 2 we formally present the basics of variational inference, message-passing and stochastic variational inference. In Section 3 we introduce the problem of and derive the algorithm for multi-robot point-to-point navigation with co-operative avoidance under uncertainty. In Section 4 we present the results of simulations and a real-world experiment. Finally, in Section 5 and Section 6 we conclude upon the obtained results and discuss the potential use cases of the proposed approach.

Variational inference
Variational inference uses optimization to approximate one distribution, p(z) by another simpler distribution q(z) called the variational distribution. Notice that, in general, p(z) does not need to be a conditional distribution, p(z|x = x), as in Equation (2). However, for the sake of the topic in this paper we will focus on the conditional distribution case. Thus, we will concentrate on solving a variational inference problem on the form where D is a so-called divergence measure, measuring the similarity between p and q, and Q is the family of variational distributions that we want to find our approximation from. The notation D(x||y) denotes that we are dealing with a divergence measure and that the order of arguments, x and y, matters. The family of variational distributions, Q, is usually selected as a compromise between how good an approximation one wants and computational efficiency. The divergence measure, D, can have a rather large impact on the approximation. However, experiments have shown that for the family of α-divergences, subsuming the commonly used Kullback-Leibler divergence, all choices will give similar results as long as the approximating family, Q, is a good fit to the true distribution [12]. Section 2.1 and 2.2 present two solution approaches commonly used in variational inference, namely Message-passing algorithms and stochastic variational inference. Messagepassing algorithms exploit the dependency structure of a given variational inference problem to decompose the overall problem into a series of simpler variational inference subproblems, that can be solved in a distributed fashion [12]. Message-passing algorithms do not give specific directions on how to solve these sub-problems, and thus classically required tedious analytical derivations, that effectively limited the usability of the method. On the other hand, modern stochastic variational inference methods directly solve such variational inference problems utilizing stochastic optimization that inherently permits the incorporation of modern machine learning models, like artificial neural networks into the problem definition [13,14]. As such the fusion of these two approaches can potentially result in a transparent and flexible framework in which complex problems can be solved distributively, making it a perfect fit for a broad interdisciplinary research area such as robotics, inherently accommodating recent trends in research fields such as deep learning, cloud robotics and multi-robot systems.

Message-Passing
The overall idea behind message-passing algorithms is to take a possible complicated problem as defined by Equation (3) and brake it down into a series of more tractable problems that depend on the solution of the other problems [12,15]. This way of solving a variational inference problem is known as message-passing because the solution of each sub-problem can be interpreted as a message sent to the other sub-problems. This is done by assuming that the model of our problem, p(z|x), naturally factorizes into a product of probability distributions where superscript (a) is used to denote the index of the a'th factor. Notice that the factorization need not be unique and that each probability distribution, p (a) (z|x), can depend on any number of the variables of p(z|x). The choice is up to us. Similarly, we can choose a variational distribution, q(z), that factorizes into a similar form Now by defining the product of all other than the a'th factor of q(z) and p(z|x), respectively as and by further assuming that q \a * (z) ≈ p \a (z|x) is in fact a good approximation, it is possible to rewrite our full problem in Equation (3) into a series of approximate sub-problems on the form 1: Initialize q (a) * (z) for all a ∈ A 2: repeat 3: Pick a factor a ∈ A 4: Solve Equation (8) to find q (a) * (z) 5: until q (a) * (z) converges for all a ∈ A Figure 2. The generic message-passing algorithm Assuming a sensible choice of factor families, Q (a) , from which q (a) can be chosen, the problem in Equation (8) can be more tractable than the original problem, and by iterating over these coupled sub-problems as shown in Figure 2, we can obtain an approximate solution to our original problem.
The approach is not guaranteed to converge for general problems. Furthermore, Equation (8) might still be a hard problem to solve, thus previously in practice, the approach has been limited to problems for which Equation (8) can be solved analytically such as fully discrete or Gaussian problems [12]. However, besides breaking the original problem into a series of more tractable sub-problems, this solution approach also gives a principle way of solving the original problem in a distributed fashion, which can be a huge benefit in robotics applications. Furthermore, depending on the dependency structure of the problem, a sub-problem might only depend on the solution of some of the other sub-problems, which can significantly reduce the amount of communication needed due to sparsely connected networks.

Stochastic Variational inference
Stochastic Variational inference (SVI) reformulates the minimization problem of a variational inference problem, e.g. Equation (3) or Equation (8), into a dual maximization problem with an objective, L, that is suited for stochastic optimization. To use stochastic optimization we need to assume that the variational distribution, q, is parameterized by some parameters, φ. We will denote the parameterized variational distribution by, q φ . The steps and assumptions taken to obtain this dual problem and the objective function, L, of the resulting maximization problem of course depends on whether we have chosen the Kullback-Leibler divergence [16][17][18], α-divergences [19] or another divergence measure [20]. However, the resulting maximization problem ends up being on the form This dual objective function, L, does not depend on the posterior, p(z|x = x), but only the variational distribution, q φ (z) and the unconditional distribution p(z, x = x) making the problem much easier to work with. Furthermore, by e.g. utilizing the reparameterization trick or the REINFORCE-gradient it is possible to obtain an unbiased estimate of the gradient, ∇ φ L, of the dual objective L. Stochastic gradient ascent can then be used to iteratively optimizes the objective through the update equation where superscript l is used to denote the l'th iteration. If the sequence of learning rates, ρ l−1 , follows the Robbins-Monro conditions, then stochastic gradient ascent converges to a maximum of the objective function L, and since Equation (9) is dual to the original minimization problem, thus providing a solution to the original problem.
An unbiased gradient estimator with low variance is pivotal for this method and often variance reduction methods are necessary. However, a discussion of this subject is outside the scope of this paper and can often be done automatically by probabilistic programming libraries/languages such as Pyro [13]. Besides providing the basic algorithms for stochastic variational inference, such modern probabilistic programming languages also provide ways of defining a wide variety of probability distributions and extensions to stochastic variational inference that permits incorporating and learning of parameterized functions, such as neural networks, into the unconditional distribution p(z, x = x). Thereby, making the approach very versatile. The benefit of solving variational inference problems with stochastic optimization is that noisy estimates of the gradient are often relatively cheap to compute due to e.g. subsampling of data. Furthermore, the use of noisy gradient estimates can cause algorithms to escape shallow local optima of complex objective functions [18].
To summerize, if we want to distribute a complex inference problem, one potential solutions is to first find variational inference sub-problems via the message-passing method, and than use stochastic variational inference to solve these sub-problems. This procedure is illustrated in Figure 1 and the next section illustrates one usage of our method for a distributed multi-robot systems.

Navigation with Co-operative Avoidance under Uncertainty
This section illustrates how the two methods can be combined to derive an algorithm for solving a practical problem in robotics. Section 3.1 introduces the problem dealt with in this paper, in Section 3.2 the algorithm is derived and explained, and finally, in Section 4 the result of simulations and a real-world experiment is presented.
p(z t p,2 ) z g,1 z g,2 q * Z t n q * z t+1 p,n q * z t+2 p,n q * z t+3 p,n Figure 3. The derived algorithm for cooperative navigation under uncertainty of multiple uni-cycle type robots works by letting each robot solve a sub-problem with stochastic variational inference and broadcast the solution to the other robots. Based on the broadcasted solution, a robot implicitly derives a distribution over the other robot's future positions, q * z τ p,n ; τ > t, and use the information in its sub-problem.

Problem Definition and Modelling
Consider N uni-cycle robots placed in the same environment. Each of them have to navigate to a goal location, z g,n = z x,g,n , z y,g,n T , by controlling their translational and rotational velocities while communicating with the other robots to avoid collision. We will consider the 2-dimensional case where the robots can obtain a mean and covariance estimate of their own current pose at time t, z t q,n = z t x,n , z t y,n , z t ψ,n T , e.g. from a standard localization algorithm such as AMCL from the Nav2 ROS2 package [21]. Therefore, we model the current pose of the n'th robot as the following normal distribution p(z t q,n ) = N(µ z t q,n , σ z t q,n ).
We do not consider the dynamics of the robots but settle for a standard discrete kinematic motion model of a uni-cycle robot given by where z τ a,n = z τ a1,n , z τ a2,n T , z τ a1,n and z τ a2,n are the translational and rotational velocities of the n'th robot at time τ normalized to the range 0, 1 , respectively, A is a linear scaling of the velocity to be in the range z τ a,n , z τ a,n corresponding to the minimum and maximum velocities of the n'th robot, and ∆T is the temporal difference between τ and τ + 1. Since Equation (13), among other things, does not consider the dynamics of the motion an estimate based on this will yield an error. To model this error, we employ an uniform distribution and define where M is a constant vector that captures the magnitude of the model error. Since Equation (13) is obtained through the use of the forward Euler method, M could potentially be obtained as an upper bound by analyzing the local truncation error. However, this would probably be too conservative. Instead, we consider M as a tuning parameter. The robots do not naturally have any preference for selecting specific translational and rotational velocities, thus, we also model the prior over the normalized velocities as a uniform distribution. That is p z τ a,n = U(0, 1).
So far we have modeled everything we need to describe the uncertainty in the motion of each of the robots. Now we turn to the problem of modeling optimality and constraints. The only criteria of optimality that we will consider are that the robots get closer to their respective goal locations, z g,n . To do so we define the following simple reward function where z τ p,n = 1 0 0 0 1 0 z τ q,n .
To include the optimality into the probabilistic model we use a trick commonly utilized in probabilistic Reinforcement Learning and Control [22]. We start by defining a set of binary optimality variables, x τ O,n , for which x τ O,n = 1 denotes that time step τ is optimal for the n'th robot, and conversely x τ O,n = 0 denotes that time step τ is not optimal. We now define the distribution of this optimality variable at time τ, x τ O,n , conditioned on the pose of the robot at time τ, z τ q,n , as where c 1 is a tuning constant. Notice that since r z τ q,n ≥ 0 it follows that e −c 1 ·r(z τ q,n ) ∈ 0, 1 . The intuition behind Equation (17) is that the state with the highest reward has the highest probability and states with lower reward have exponentially lower probability.
As stated the robots should avoid colliding with each other. Therefore, we would like to impose a constraint on the minimum distance, d min , that the n'th and m'tn robots should keep. To do so we define Similarly, as we modeled optimality we can now also define binary constraint variables, x τ C,n,m , for which x τ C,n,m = 1 denotes that the minimum distance constraint between the n'th and m'tn robot is violated at time τ, and model the constraint by the distribution given by where c 2 is a tuning constant. Again, when the distance between two robots becomes larger it has an exponentially less probability of violating the distance constraint. With the above variable definitions, we can now formulate a solution to the navigation problem at time t as the following conditional probability distribution p z t a,1 , . . . , z t a, where n , z t a,n , z t+1 q,n . . . , z k·t−1 a,n , z k·t q,n , To capitalize, Equation (20) states that we are interested in finding the distribution over the next action, z t a,n , that each robot should take conditioned on that it should be optimal, specified by the "observations" x t O = 1, and should not result in violation of the constraints, specified by the "observations" x t C = 0. Furthermore, it states that we can obtain this distribution as the marginal to the conditional distribution on the right-hand side of the equal sign. If we can evaluate this problem efficiently in real-time, it will act as probabilistic model predictive control taking the next k time-steps into account. However, as discussed in the introduction solving such a problem is in general intractable. Therefore, the next section will derive an approximate solution based on message-passing and Stochastic variational inference. 1: On each of the n robots 2: repeat 3: t ← t + 1 4: Get µ z t q,n , σ z t q,n from localization algorithm 5: Initialize φ t, * n = α t n , β t n , . . . , α kt−1 n , β kt−1 n 6: repeat 7: if messages available for m ∈ [1, N]\n then 8: Store µ z t q,m , σ z t q,m and φ t, * m 9: end if 10: Solve Equation (29) to find φ t, * n 11: Broadcast µ z t q,n , σ z t q,n and φ t, *

Algorithm Derivation
Instead of solving Equation (20), we will in this section show how to find an approximate solution based on variational inference. The derived algorithm is shown in Figure 4. At each time step, t, we want to approximate Equation (20) by solving the following problem while making sure that it is easy to obtain the marginals for the variables of interest, z t a,1 , . . . , z t a,N , from this approximation. To utilize the idea of message-passing we need to find a natural factorization of the model of the problem. By applying the definition of conditional probability together with the chain rule, and by considering the dependency structure of the model, the conditional probability distribution on the right-hand side of Equation (20) can be rewritten to From Equation (22) it is seen that the model naturally factorizes into a fraction related to the constraints and N factors related to the pose, actions, and optimality variables of each of the N robots. Thus, it is natural to choose a variational distribution that factorizes as Now considering Equation (8) we can distribute the computations by letting the n'th robot solve a problem on the form arg min and broadcast the result, q * Z t n , to the rest of the vehicles. This could be repeated until convergence or simply until a solution for the next time step, t + 1, has to be found. However, Equation (24) still include the unknown term p X t C = 0 . To overcome this hurdle we utilize stochastic variational inference, for which we can work with the unconditional distribution given by Equation (25) instead. where All terms in Equation (25) except for the variational distribution, q Z t m , were defined in Section 3.1. To choose an appropriate variational distribution, q Z t m , consider Equation (26) describing the motion of the robot. The only distribution in Equation (26) that actually can be directly controlled is p(z τ a,n ), since p(z t q,n ) is the current best estimate of the n'th robots current location provided by a localization algorithm, and p z τ+1 q,n |z τ q,n , z τ a,n is derived from the kinematics of the robots. Therefore, an appropriate choice of variational distribution is q Z t n = p(z t q,n ) kt−1 ∏ τ=t p z τ+1 q,n |z τ q,n , z τ a,n q(z τ a,n ), leaving only the distribution q(z τ a,n ) left to be choosen. q(z τ a,n ) has a direct connection to p z t a,n in Equation (15), and thus it is natural to choose a distribution that shares some of the same properties such as the support. Therefore, we have choosen which has the exact same support as and even subsumes p z t a,n . To summarize, at each time-step, t, each robot, n, has to iteratively solve a sub-problem through stochastic variational inference represented by where φ t n = α t n , β t n , . . . , α kt−1 n , β kt−1 n , and broadcast the result φ t, * n to the other vehicles as illustrated in Figure 3. In practice, to easen the computational burden some of the terms can be removed from Equation (29), since only the evaluation of the constraints involving the n'th robot is non-constant. Overall we have divided the original approximation problem in Equation (21) into a series of less computational demanding sub-problems that can be solved distributively on each of the robots. The next section presents a simulation study and a real world experiment utilizing this algorithm to multiple robots safely navigate the same environment.

Validation
To validate the algorithm described in Section 3 we both performed a simulation study and a real-wold experiment descriped in Section 4.1 and Section 4.2, respectively. In both cases the models described in Section 3.1 were implemented utilizing the probabilistic programming language Pyro [13], and Pyro's build-in stochastic variational inference solver was used. For solver options we chose "Trace_ELBO", thus implicitly using the Kullback-Leibler divergence, and the commonly used "Adam" stochastic optimization solver with 10 epochs/iterations pr. send message.
R goal R env goal zones robots Figure 5. Illustration of the simulated environment with N = 4. Two goal zones are generated for each of the robots, and the robot is initialized in the center of one of these goal zones.

Simulations
To evaluate the stochastic properties of the proposed solution, we implemented a simple simulation environment for simulating N uni-cycle robots in parallel and in an asynchronous fashion. The environment where designed to cause as many close encounters as possible. For each of the robots in this environment two goal zones with a radius, R goal , are generated evenly on the circumference of a circle with radius, R env . When the simulation starts each of the robots are randomly initialized with a position in the center of one of their respective goal zones. The goal of the robots is then to drive as many times a possible between the two goal zones without colliding with the robots during the simulated time. The setup is illustrated in Figure 5. video of each of the simulations are available at [23]. The parameters chosen for the model are summarized in Table A1 in Section A. To quantify the ability of the algorithm to avoid collisions we utilize the minimum separating distance (MSD) metric also used in [24]. We calculate the MSD of the i'th simulation as the minimum distance between any of the robots during the whole simulation: and z t,i p,n is the position of the n'th robot at time t in the i'th simulation, and R i n is the radius of the n'th robot. Figure 6 shows the smallest separating distance (SSD) between any of the robots during all of the simulation, together with the mean of the MSD of the 50 simulations, and the smallest MSD recorded in any of the simulations. Figure 7 shows how many times the robots reached a goal zone during the simulations. From these simulations it can be concluded that the algorithm successfully manages to guide the robots towards their goals while still avoiding collisions.

Real-wold experiment
The real-wold experiment was performed with two TurtleBot3 Burger robots, each equipped with the standard lidar and an Intel NUC10FNK as the on-board processing unit. The parameters chosen for the model are summarized in Table A1 in Section A. To facilitate communication between the robots as needed for message-passing as described in Section 3.2 the meta operating system ROS2 was utilized. 5 Ghz Wi-Fi provided by an Asus rt-ax92u router was used as the communication medium. As in the simulations, the robots were programmed to get alternating goal locations, z g,n , each time they reached within 20cm of their current goal locations. To provide the estimate of the robots current pose distribution, p(z t q,n ), we utilized AMCL from the Nav2 ROS2 package [21]. The implemented algorithm is available at [25].
The results of the experiments are shown in Figure 8, Figure 9, and Figure 10. On average the robots managed to solve their sub-problem and sent a solution to the other robot 3.01 times pr. time-step. Figure 8 shows the full path taken by the robots during the 388 s long experiment. Robot 0 and Robot 1 traveled approximately 37, 5 m and 34, 8 m, respectively, while reaching their goals 17 times each giving plenty of opportunities for collisions. Figure 9 shows the distance between the robots and their respective goals together with the SSD between to two robots themselves during the experiments, and the MSD for the whole test. In this test the MSD was 7.8 cm. From the plot, it is clear to see that the   Figure 9. Each of the robots distances to their respective current goals, together with the distance between the two robots for the first 100 s of the experiment, and the minimum distance conservatively calculated as 2 times the length of the TurtleBot3 Burger platform, 2 · 138mm. The jumps in the plots of the robots' distances to their goals are due to change in goal location. The plots show that the robots several times manage to reach their goal without violating a safe distance, d min , to each other. robots several times manage to reach their goal, while keeping a distance larger than d min to each other. Figure 10 illustrates in more detail how the algorithm behaves in one of the situations where the robots were close to each other. To avoid a collision, at time t = 33 robot 2 waits for robot 1 to pass. At time t = 34 robot 1 has passed and robot 2 begins planning a trajectory towards its goal and drives towards the goal at t > 34. At time t = 39 robot 1 has reached one of its goals and starts planning a trajectory towards its other goal. However, for t > 39 robot 2 is blocking robots 1's path, and therefore robot 1 does not drive that far. Overall, the experiment illustrates how the algorithm successfully manages to make the robots drive to their goals while avoiding collisions despite the uncertainty in the localization from AMCL and uncertainty in the future movement of the other vehicle.

Conclusion
In this paper, we have discussed how variational inference can be a tractable way of solving robotics problems with non-neglectable uncertainties. More specifically, we have p(z t p,1 )/q * (z t p,1 ); τ > t p(z t p,2 )/q * (z t p,2 ); τ > t µzτ p,n ; τ > t µ z t p,n µzτ p,1 ; τ < t µzτ p,2 ; τ < t Figure 10. Kernel density estimate plots of the robots final predicted positions, z τ p,n ; τ > t, together with kernel density estimate plot of the robots initial positions, z 0 p,n , the mean of the samples used to generate each plot, µ z τ p,n ; τ > t and µ z τ p,n , and finally the traces of their traversed paths, µ z τ p,n ; τ < t, for each t ∈ [33, 45]. The plots clearly illustrate how the robots manage to negotiate trajectories that avoid a collision while taking the relevant uncertainties into account.
shown how two main solution approaches to variational inference, message-passing algorithms and stochastic variational inference, relate. We outline how these two approaches potentially can be combined to flexibly solve problems with uncertainty in a distributed manner. By deriving and implementing an algorithm for navigation of multiple robots with co-operative avoidance under uncertainty, we furthermore demonstrate the feasibility of the proposed approach. Finally, we demonstrate that the derived algorithm works both in simulations with multiple robots and in a real-world experiment with two mobile robots.

Discussion
Many algorithms in robotics are already based on and derived directly from probabilistic models. The wide set of possible models that can be employed in stochastic variational inference, should make it straightforward to apply the approach proposed in this paper to many of these probabilistic models. Thereby, resulting in new interesting algorithms. Furthermore, due to the separation into sub-problems, the approach could potentially lead the way for offloading more computations to the cloud. Since variational inference can incorporate neural networks, the approach also allows for the combination of classical modeling based methods and modern purely learning-based methods. Funding: This research received no external funding Data Availability Statement: The software code used for the simulations and the experiment is available at [23] and [25], respectivily. [23] also contains all the data recorded during the simulations together with a .mp4 file animation of each of the simulations.

Conflicts of Interest:
The authors declare no conflict of interest.