{'fraction_non_alphanumeric': 0.02574324610882565, 'fraction_numerical': 0.004580346918868485, 'mean_word_length': 4.683297180043384, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fast Simulation of Vehicles with Non-deformable Tracks

This paper presents a novel technique that allows for both computationally fast and sufficiently plausible simulation of vehicles with non-deformable tracks. The method is based on an effect we have called Contact Surface Motion. A comparison with several other methods for simulation of tracked vehicle dynamics is presented with the aim to evaluate methods that are available off-the-shelf or with minimum effort in general-purpose robotics simulators. The proposed method is implemented as a plugin for the open-source physics-based simulator Gazebo using the Open Dynamics Engine.


I. INTRODUCTION
Tracked vehicles are often preferred over the wheeled ones in tasks where traversing complicated terrain is needed, such as in Urban Search and Rescue missions. Tracks provide higher stability, better traction and help the vehicle traverse holes in the underlying terrain.
It is common in robotics research that the initial development of algorithms is first conducted in a simulator or game engine to avoid excessive wear of the real vehicle. In this phase, approximate simulation methods usually suffice, differing by the level of approximation and computation time. General-purpose simulators like Gazebo, V-REP, Webots, MORSE and Actin are often used for this task [1], providing various approximate motion models implemented in their physics engines (ODE, Bullet, Havoc).
Simulation of wheels is straightforward in these simulators, thus all of them provide means to simulate wheeled vehicles, including skid-steer motion of multi-wheel vehicles. However, there is no straightforward approach for tracked vehicle simulation, thus this motion model is not available in most simulators. After an exhaustive search, only two simulators were found providing a tracked robot in its robot model library -the commercial simulators Webots and V-REP. However, none of these implementations is both plausible on difficult terrain and computationally light.
The most plausible and general simulation methods for rubber belts are based on finite elements analysis, where the belt is subdivided in many small elements that interact in a defined way. We omit this class of methods in this work due to their inherent excessive computational complexity which makes them impractical for quick algorithm prototyping. Further argument for omitting these methods is that none of the most used open-source dynamics engines used in robotics supports simulation based on finite elements.
In this paper, we present a novel technique for nondeformable tracks simulation, which we implemented in the open-source simulator Gazebo [2]. The method provides a fast, simple and plausible simulation of non-deformable tracks with minimal changes to the simulator code and no changes to its physics engine (ODE). The method was successfully used in our prior work [3] for assessing safety of actions a tracked vehicle can perform. We would like to emphasize that our motivation is to have a fast and plausible method that can be easily integrated into existing robotics simulators and does not require implementation of state-ofthe art physics engine components (which are usually absent in the robotics simulators).
We compare this method to other already known motion models. Finally, we propose a set of metrics that allow to compare the methods in terms of plausibility, computational time, and the range of track types that can be simulated by each of the respective techniques.

II. TYPES OF CATERPILLAR TRACKS
To clearly specify the type of vehicles this work is focused on, a short taxonomy of track types follows.
Based on the material the track is made of, the two basic types are metal tracks and rubber tracks. Metal tracks are usually made of many small track plates connected together with hinge-like joints. Rubber tracks are made of a continuous steel-reinforced band of rubber.
Another distinctive feature of different track types is the deformability of the outer shape of the track. The deformable track systems need a set of inner (sometimes also outer) wheels keeping the track approximately in the required shape and providing suspension (see Figure 1). in between the wheels, hence the name deformable tracks. Metal tracks are usually deformable, and also deformable rubber tracks exist.
Non-deformable tracks have solid guides (infills), which prevent the outer belt shape from bending and deformation (see Figure 1). This design is often chosen for rubber tracks, and it is the type this comparison is focused on.
A special category-conveyor belts and escalators-may be added to this taxonomy. In many design principles they are similar to the tracks for vehicles, but the main difference is they are always fixed to the environment and thus have no dynamics as a whole.
Independently from the above categories, tracks can be equipped with grousers. These protrusions enlarge the contact surface and help to increase traction in soft materials (depicted in Figure 1).

III. RELATED WORK
Depending on the purpose of the simulation, either very precise and detailed, or approximate models can be used. The former ones have been studied extensively in literature, whereas the approximate models, due to their triviality and inaccuracy, have not been examined profoundly despite their frequent use in nowadays robotics.

A. Precise Models
Simulation of the deformable tracks can be completely set up using existing robotics simulators -the track consists of a set of solid track plates connected with hinge joints, several wheels and, possibly, suspension of the wheels. All these components are available in simulators like Gazebo, Webots or V-REP. However, this type of simulations is both computationally intensive and very unstable for the high number of constrained dynamic elements [4]. Only the V-REP simulator provides a reliable simulation of this type, and many parameters have to be very finely tuned for it to work. Sokolov et al. [5] tried to implement this method in Gazebo, but the reported results are unsatisfactory.
When the general-purpose simulators fail, specialized simulators were developed to simulate the deformable track dynamics. Wallin et al. [6] compared several formulations of the mechanical joints when applied to metal tracks. They conclude that each formulation has its advantages and disadvantages and has to be chosen with respect to the specific use-case.
As discussed in the introduction, considerable effort is devoted to simulation of tracks using the Finite Elements Analysis [7], [8]. But the precision and computational demands are of higher orders than the methods we focus on.
In agriculture and military research, the track-soil interaction is of high interest (mainly due to sinkage of the track plates). Most of these works seem to only consider planar motion of the vehicle [9], [10], [11] and mainly concentrate on computing correct sinkage-induced behavior. Yamakawa and Watanabe [12] provide a fully three-dimensional simulation taking into account the track-soil interactions and wheel suspension.

B. Approximate Models
Common feature of the models described in the previous section is that they properly simulate some effects, but are either very computationally intensive, or neglect some other important effects (they e.g. assume motion on flat ground with small obstacles only).
We are not aware of any approximate model for the deformable track type, because its behavior is highly nonlinear and it essentially requires to model the individual parts of the track separately. The rest of this section thus concentrates on approximate models for non-deformable tracks.
In some environments, only flat ground is present (e.g. in household robotics or storehouse helper robots). Then there is effectively only a very small difference between a tracked robot and a 4-wheel robot with skid-steer control.
In some cases, the tracks can be treated completely passive and the robot motion can be roughly estimated by setting zero friction to the track surface, and pushing the robot with a virtual force instead of driving the tracks. This force can be applied via a P(ID) controller, so that the robot achieves the desired velocity and keeps it. However, the usual effects of friction can not be simulated. Consequently, the robot can not stand on a tilted plane without control force (which the real robot can do).
When negotiation of obstacles needs to be accounted for, the 4-wheel approximation would fail because the robot could not support itself on obstacle edges by the middle parts of the tracks. In this case, the problem is often solved by putting more virtual intersecting wheels inside the track. This approach has been tested by Sokolov et al. [13], and is available as a predefined model in V-REP and Webots simulators. The model still uses the skid-steer wheel control with synchronized wheel velocities on each side. On one hand, it has problems imitating the skid-steer behavior properly. On the other hand, the robot is able to overcome some obstacles and can support itself by any part of the track.But the geometry of such model does not correspond to the real geometry, which is why these models cannot plausibly simulate e.g. climbing up a staircase. We have observed in Section V that this model also gets stuck in some cases where the real robot would continue going. These models also do not work very well with the standard friction pyramid approximation of friction direction -it is instead needed to use the more precise (and more computationally expensive) friction cone model [1].
The V-REP simulator offers another method of approximate simulation, which is only suitable for conveyor belts and other static elements. It bypasses the physics by directly setting linear velocity of the whole conveyor belt mechanism, letting it interact with other bodies, and resetting all forces that acted on it afterwards. This way, the conveyor belt can exert forces on objects colliding with it, but at the same time, it stays on its place unaffected by any kind of dynamics (because the forces are zeroed-out each simulation step).

C. Skid-steer Motion
The slippage in the skid-steer behavior is an essential part of motion of tracked vehicles. While it automatically emerges from the precise simulation models as a result of track tension and other forces acting on the individual parts of the track, a kinematic model is also available for approximate or kinematics-only simulations.
Martínez et al. [14] define virtual points called Instantaneous Centers of Rotation (ICR) which depend on the desired turning radius and on a coefficient called steering efficiency. The robot follows a circular path centered at the ICR and if the steering efficiency is equal to 1, the motion is the same as the motion of a geometrically equal differentialdrive wheeled vehicle.
Janarthanan et al. [15] extend this theory for tracked vehicles with road wheels.

IV. MODEL BASED ON CONTACT SURFACE MOTION
Our novel method exploits the dynamic simulation formulation as Linear Complementarity Problem (LCP), which is used in ODE [16] and other robotics simulators. It does not, however, depend on any particular LCP solver implementation.

A. LCP Formulation
The dynamic simulation problem is an application of Newton's second law: where t is time, F is the force acting on the dynamic system, M is the mass and inertia matrix, andq is the linear and angular velocity of the bodies (which is the derivative of the system state q). The force F is split into external force F e and constraint force F c [4], which is a set of forces generated by joint constraints that keep joint constraints valid in the next time step. The constraints are written in the forṁ where J is the constraint Jacobian. An observation in [4] states that the direction of the constraint force is given by J, so it is sufficient to search for the constraint force magnitude λ (so that F c = J λ).
In simulation, the derivative is discretized into short time steps ∆t (usually 1 ms) and the state of the system is integrated step-by-step using Euler's integration [4]. The state of the system in the next time step n + 1 can be expressed as where the new velocity vector v n+1 (corresponding toq in the continuous setting) is obtained from Equation 1 : The unknown constraint force magnitude λ is the solution of the following LCP [4]:

B. Contact Constraint Equations
In each time step, when links L 1 and L 2 collide, a set of contact points {C i } N i=0 is generated at places where the links touch or penetrate each other. Every contact point is assigned a contact joint, which is a temporary constraint between L 1 and L 2 . The set of constraints yielded by the contact joint consists of a position constraint (repelling the two links from each other along the contact normal), and a velocity constraint for friction (stopping parallel motion of the two links), which often utilizes the Coulomb friction representation [17], [18].
Linear velocity of L 1 is denoted by v 1 , angular velocity by ω 1 , and r 1i is the vector from the center of L 1 to C i ; respective definitions hold for L 2 . Further, t i denotes the main tangential friction direction (which is perpendicular to the contact normal).
The approximate velocity constraint for Coulomb friction at contact point C i with friction coefficient µ i is [17]: which can be interpreted as "stop any motion in direction t i ". The LCP solver tries to find magnitude of the friction force in direction −t i (which is bounded by µ i ) that would satisfy this equation.

C. Contact Surface Motion Model
With the previous definitions, our novel method can be described as a modification of Equation 3. To account for the track velocity v t , Equation 3 is adjusted to: which might be interpreted as "find a force that would keep relative motion of L 1 and L 2 at velocity v t ". With this change, the model will move just by applying the modified friction constraints and setting v t . Nevertheless, this model is not able to correctly simulate grousers. If the real track has grousers, one way to add a similar effect to the simulation is to increase the friction coefficient. This method proved useful in our previous work [3] where we heavily utilized the simulator to find a control policy suitable also for the real robot.
There are more precise models for contacts with friction [18], but the practical experiments have shown that even the friction pyramid approximation used in ODE is sufficient for our method to work.
This method can be also easily used for tracks of various shapes. The only requirement is to be able to compute the normals of contact points on the tracks.

D. Enabling Skid-Steer Motion
The last part to be defined is the friction direction t i . If only forward motion is required, it can be simply set to be parallel to the tracks. However, this setting causes problems when the robot is to turn around using skid-steering motion (since the friction forces are not consistent with the turning maneuver).
Here we connect the dynamic simulation with the kinematic model of tracked vehicle motion by Martínez et al. introduced in Section III-C. The whole vehicle is said to be following a circular path centered at ICR (or driving straight if ICR is in infinity). Thus, we know the desired trajectory of all contact points on the track, and we set each direction t i to be tangent to this trajectory, see Figure 2.
This model has been successfully used in our previous work [3]. Implementation of the proposed method (and some other) has been offered to the Gazebo community [2].

V. COMPARISON OF MODELS
In this section, a comparison of methods of modeling nondeformable tracks is presented.

A. Tested Models
The tested models are described in the following sections (and depicted in Figure 1). Each model is shortly introduced, and an abbreviation for it is defined, which is used throughout the rest of the text and figures. All the tested models differ only in representation of the main tracks -all other properties, such as mass, inertia, shape etc. were the same for all models.
With each of the models, identification of the most realistic set of parameters was done. The optimized parameters were always linear and angular gain -ratios that convert control inputs from simulator to velocity commands for the models. Other parameters were added only for the models they make sense with, and consist of steering efficiency and friction coefficients in the first and second friction direction.
First, we tried to manually find a suitable set of parameters and estimated the ranges for each of them. Then we did 5 iterations of optimization, in each of which we examined 5 samples from a multivariate Gaussian distribution centered on the so far best set of parameters (with covariance derived from the estimated ranges). Examination of each sample consisted of traversing all defined scenarios with model settings taken from the sample, and summing up the weighted metric values (defined further in this section). To account for the uncertainty in the simulator, each traversal was tried 3 times and the metric value was averaged over these trials. 1) Model based on Contact Surface Motion: This is the novel model shortened as CSM.
2) Wheels instead of tracks: Model with 4 wheels instead of each track (4wheels) or 8 wheels (8wheels). All wheels are velocity-controlled using a skid-steer wheel control mechanism (with wheels on each side synchronized in velocity).
3) Subdivision to plates: Model with belt subdivided into 10 cm plates (plates10) or 2 cm plates (plates2) interconnected by hinge joints, plus sprocket and idler wheels. Versions with grousers attached to the track plates are shortened as plates10g and plates2g. The inner space of the track is filled with a solid box which can collide with the track plates, thus emulating the non-deformability of the track. Only the sprocket wheel is controlled, using torque control. This model requires more tuning in the simulator. To simplify it, the sprocket wheel is represented by a cylinder with infinite friction with the track plates (so that it efficiently transfers force to them without the need to model the teeth and their interaction with the plates). Further, lateral motion of track plates has to be avoided (otherwise, they would slip off the track very easily). This would be best done with a planar joint, which is however not available in Gazebo/ODE. As a workaround, placing two virtual vertical plates to the sides of each track (that collide only with the track plates) yields a similar behavior (although it is not ideal).

4) No friction:
Model with zero friction between the tracks and ground (no friction). The collision shape of the track is the same as in the CSM model, but the friction of the track is set to zero, and the whole model is force-controlled by applying a virtual force at its center of mass. The applied force is always perpendicular to the vertical axis of the robot.
5) The real robot: The real robot was also part of the test. It is the Absolem platform used in Urban Search and Rescue project TRADR [19]. Position of the robot in 6D space was measured by an IMU combined with track and laser odometry [20].

B. Test Scenarios
The models were tested in the following scenarios. Each scenario specifies a different metric showing how successful the model was, and was selected specifically to discover weak points of the models. All the scenarios start with the robot in rest, no initial speed, forces or torques. A view on the obstacles in the scenarios is provided in Figure 3.
CPU time was measured in all scenarios. It represents the (real-world) time difference between the start of first scenario execution, and the end of the last scenario execution (so it is summed up over all scenarios for each model). The   simulators were running with high process priority without an upper bound on performance. The time complexity could be probably lowered for most of the models by adjusting the dynamics engine for the particular case; our measurements show CPU time needed by the implementation in the stock simulator without any code modifications. Where a metric refers to the error from real robot trajectory, it means the scenario was traversed with the real robot, and the trajectory was recorded as a reference.  2) Rotating in place: Keep the center at one place while rotating at 0.6 rad.s −1 for 10 seconds. Metric: Angular distance from heading 6.0 rad, metric distance from the starting point.

C. Test results
Each model was tested 10 times in each scenario, and the values of the metrics were averaged over these tests.
The detailed results are shown in Table I. A summary  extracted from the test results is given in Table II. From the table, it follows that the track plate models are slower by an order of magnitude or two than the other models. We have also observed, that the 10 cm plates are too rough approximation of the smoothly curved belt, and the resulting model's motion could be described as "bumpy". Last observation for track plate models is that without grousers, the robot is often not able to climb up the pallet. That, however, corresponds to the expected real behavior of a belt without grousers.
The wheeled models are computationally fast and provide good plausibility in most scenarios. They suffer from unrealistic slippage in the stand on staircase scenario, because the friction forces have unrealistic directions. The pallet scenario showed to be a big problem for these methods-if a sharp edge (e.g. a step or pallet edge) touches the track in a point where neighboring wheels intersect, the model suddenly stops moving as a result of unrealistic forces and their directions. We think it is not a bug in our implementation, since the same behavior was also observed with the wheeled track model available in V-REP simulator (which even uses a different dynamics engine-Bullet).
The no friction model provided good results in all tested scenarios, except stand on staircase. That failure is obviously caused by the missing friction between tracks and ground. It was the fastest tested model.
The proposed Contact Surface Motion model was the second fastest tested model. It provided good results in all tested scenarios except circular path. Here, the parameter optimization was not able to find a set of parameters that would provide good performance for both rotate in place and circular path; with the best set of parameters, the robot was turning too quickly in the circular path scenario. Together with no friction, only these two models traversed the pallet without problems.

VI. CONCLUSION AND FUTURE WORK
Simulation of tracked vehicles is a complicated task even when it is narrowed down only to simulation of nondeformable tracks. The presented Contact Surface Motion model proved to be one of the fastest methods that still provide highly plausible results in most cases. It is the first computationally-light method allowing the use of precise geometry of the tracks while keeping plausible dynamic behavior. It can be utilized not only for simulation of tracked vehicles, but also for conveyor belts, treadmills and any other kind of moving planar surfaces.
The proposed set of metrics for comparison of the simulation models showed as a practical test for discovering weak and strong points of each model. Once the pull request to Gazebo [2] is merged, the testing world and obstacles [21] can be utilized by others to compare with their models.