Anda di halaman 1dari 6

Simulation for Training and Testing Intelligent

Systems
Daniel W. Carruth*
* Center for Advanced Vehicular Systems, Mississippi State University, Starkville, MS, USA
dwc2@cavs.msstate.edu

Abstract— Intelligent systems require sizable sets of known range of scenarios that threaten the integrity of the system
data for training. Developing datasets from real-world data and the safety of people in the area of operation. Testing is
is a time-consuming and cumbersome process. Simulation also critical to the software development process.
provides an alternative with key advantages: rapid data There are other factors that limit our ability to develop,
collection, automated semantic tagging, lower cost, etc. at train, and test intelligent systems with real-world data:
the cost of realism. The major automotive autonomy efforts First, real world testing of field robots or self-driving
rely on simulation to supplement real-world driving with vehicles requires that developers and test teams have
millions of miles of simulated driving. Simulators are also access to real world devices. Given the cost of physical
being used to develop and test autonomous algorithms for
robots, and even their constituent parts, the cost of
do-it-yourself autonomous remote-control cars, small-to-
physical testing can be prohibitive. Second, real world
medium sized unmanned ground vehicles, and intelligent
testing requires physical test sites and instrumentation for
agents that exist only in virtual environments. Building and
collecting and evaluating performance. In addition, these
using simulated environments for training and testing
intelligent systems provides many significant advantages,
test sites need to provide the full variety of environments,
users must be aware of the limitations and constraints of
scenarios, stimuli, hardware, etc. to which the intelligent
simulated environments and carefully evaluate transfer of system is being trained to respond.
learning from simulated datasets to real-world Simulation is appealing as a potential solution for these
performance. challenges. In simulation, we can automatically annotate
sensor data. A simulation could generate hundreds of
thousands of simulated sensor data matched with fully
I. INTRODUCTION annotated ground truth. Human-in-the-loop simulation can
Intelligent systems are being increasingly applied in be used to generate training datasets that rely on human
practical ways to many domains. Of particular interest is data. Simulations can also use algorithms that run slower
the growing application to robotics and self-driving than real-time to generate datasets to train real-time
vehicles. Effectively training machine learning systems to systems. In simulation, we can randomly generate new
perform tasks requires large labeled datasets – the more environments and stimuli with which to train and test the
complex the task, the larger the required dataset. In models. We can store tests to benchmark systems or
training robots to perform object grasping, one example perform regular testing of software builds. Simulations
dataset contains 9.4 million example images [1]. can allow us to rapidly modify and evaluate system
ImageNET, a labeled image database, contains over 14 parameters that would be difficult to change in the field
million images [2]. Generating large labeled datasets is (wheelbase, camera position, field of view, etc.).
expensive, time-consuming, and cumbersome. Imagery While simulation is widely used for training and testing
must be collected, semantic classes defined, annotations robotic systems, mobile robot platforms, self-driving
made manually and validated. For the Cityscapes dataset, vehicles, and many other intelligent systems, simulation
it was estimated that fully annotating each image required will never be a perfect match to the real world. The
approximately 90 minutes [3]. transition from simulation to real world performance will
There are tasks that do not require time-intensive be constrained by general and specific limitations of
labeling of data. For example, an end-to-end neural simulation.
network for self-driving vehicles (e.g., [4]) requires a
large dataset of images annotated with steering angles. In II. RELATED WORK
this case, a training dataset can be generated by recording
camera data and steering angle data as a human driver A. Real-time Training and Testing
operates the vehicle. While effective for training a ML The DARPA Robotics Challenge (DRC) and the
model to drive on the same track, such a dataset is limited DARPA Virtual Robotics Challenge (VRC) was a high-
by the variability of the sites at which the data is collected, profile competition that used simulation to give teams
the behaviors of the driver, and other factors that limit the platforms to develop and test for a common platform. The
generalizability of the trained model. DRC and VRC were designed to drive innovation in
In addition to training systems, we must also have development of robotic systems, particularly humanoid
facilities to test the systems. Effective training and testing systems, for disaster response [5]. Six teams used Boston
depends on the ability to present the system with Dynamics Atlas robots [6] in the challenge. Atlas robot
representative scenarios that capture the range of scenarios hardware was not widely available to the teams.
that the system may observe in the field. In particular, the

101
An Open Source Robotics Foundation (OSRF) randomly generated tracks, a user can experiment with
simulator provided a development testbed for teams with transfer between virtual tracks and could try transferring
access to an Atlas and an opportunity to compete for training to a real world track.
teams without access to an Atlas [7]. One of the Atlas NVIDIA has developed an autonomous vehicle
teams, the Florida Institute of Human & Machine simulator that will allow developers to test and validate on
Cognition team, finished first in the Virtual Robotics “billions” of simulated miles. NVIDIA’s simulator will
Challenge and second in the DARPA Robotics Challenge provide “photorealistic” simulation for multiple sensors
[8]. (camera, LIDAR, and radar) and will support hardware-in-
In the transition from simulation to hardware, the team the-loop testing [14]. NVIDIA’s simulator attempts to
identified challenges related to sensing, controls, and provide realistic inputs to a complete autonomous vehicle
communication that required significant revisions to their software stack through a physical interface between a
system [8]. In particular, the simulation provided perfect, simulator server and a vehicle server. In comparison with
synchronized data without the noise, distortion, and error the Donkey simulator, the NVIDIA system will generate
found in real sensor data. Similarly, the physical higher quality images and NVIDIA is providing much of
parameters and controllers in the simulation did not the content creation. The NVIDIA simulations specifically
perfectly match the physical robot. A particular issue was provide tools for testing in conditions (adverse weather,
the absence of latency and communication issues in the time of day) that would be challenging to test in the real
simulation. Even when incorporating latency in world and will present difficulties for intelligent systems.
simulation, it can be difficult to capture fully the effects OpenRobotics has developed a vehicle and city
on sensor quality and operator perception and response simulation using the Gazebo simulator and the ROS
[9]. framework [15]. ROS is a popular framework for
For the upcoming DARPA Subterranean Challenge, developing robotic systems [16]. The Gazebo simulator
OpenRobotics is again leveraging simulation to create provides a virtual environment that ROS robots can
virtual environments with three subterranean domains: observe through simulated sensors and perform actions
tunnels, urban underground, and networks of caves [10]. based on commands from ROS. The OpenRobotics
Sites that would be difficult to access without simulation. simulator provides LIDAR, sonar, and camera sensors and
The simulation will allow more teams to compete and accepts throttle, brake, steer, and gear inputs [15]. Road
allow a “near infinite set of experiments” bounded only by network definitions and city models help address a portion
construction of test environments and computational of the content creation challenge.
resources [10]. This ability to generate an immense Video games can also provide a compelling platform
amount of data and perform a vast number of experiments for simulation, particularly for urban environments. The
is the primary advantage of simulations. video game industry spends far more money on creation
Simulation is also used at a smaller scale for the of realistic environments for games. Games like GTA V
Donkey car in the DIY Robocars community. DIY include a simulated living city complete with a variety of
Robocars is a community started by Chris Anderson in locations, cars, cyclists, and pedestrians. While they do
2017 to encourage building low-cost mobile platforms and not provide a perfect representation of the real world, they
testing autonomous driving algorithms [11]. DIY provide a far more realistic one than most research
Robocars equips remote-control cars with a camera, simulations. However, video games are typically not built
controller, and software. By using 1/10 and 1/16 scale with annotation, data collection, or controls needed for
remote-control cars and low-cost hardware, DIY Robocars effective generation of datasets or simulations for testing.
helps make self-driving cars accessible to many more The VIPER dataset is a large annotated synthetic
potential developers. dataset generated from the realistic environments built in
Donkey is an end-to-end neural network library used to GTA V [17]. Realistic outdoor environments, particularly
operate some DIY Robocars platforms [4]. Donkey uses urban environments, require significant content creation to
training data consisting of a collection of images and approach the composition of real world environments.
steering angles collected as a human operator remotely Richter et al leveraged a video game (GTA V) to generate
drives the car around a track. Keras is used to train a a dataset containing over 250,000 high resolution images
model that given an input image will predict a steering with associated annotations and ground truth data for
and throttle output. The steering and throttle are used to pixel-level semantic segmentation by instance, detection
drive the vehicle. and classification of objects, tracking of objects, 3D scene
A Unity-based simulator is available to provide organization, and visual odometry [17]. In addition, the
developers with virtual environments for training and resulting image dataset was demonstrated to be similar in
testing of the ML tools [12]. Using the simulator, someone composition and in realism by comparison to other
interested in Donkey can set up and experiment with the datasets made up of annotated real-world imagery.
system with no car and no track. The Donkey simulator
uses the Unity 3D game development platform’s graphics III. ADVANTAGES AND LIMITATIONS
and physics systems to simulate camera input and vehicle
behavior in simple virtual environments. The Donkey A. Advantages
simulator provides three types of environments: a Accessibility. The cost of robotic hardware is often
randomly generated road environment, a recreation of the prohibitive. In order to work with physical robotic
DIY Robocars warehouse, and a recreation of a track from systems, a developer must be either well-funded or must
Sparkfun AVC 2017 [13]. There is no expectation that scale back to platforms with reasonable cost (e.g., [11]).
training will transfer from the simulator to the real-world. In a well-funded environment, it may be impractical to
However, with multiple tracks in the simulator, including make available working hardware to entire development

102
teams. Even in the case of DIY Robocars and the Donkey build environments [15]. It can be easy in simulation to
car [4, 11], the user must maintain a working vehicle and modify lighting [14, 17], environments [12, 14, 17, 19],
have access to one or, ideally, more tracks. Generally, the hardware [19], sensor parameters, algorithms, random
only requirement for simulation is that you have access to stimuli [1, 12], and visuals [1, 20-25]. There are practical
computational resources. While more direct and limitations to real world testing [1]. Real world datasets
immediate access is best, the computational resources can and testing expose systems to the complex and
be local or cloud-based resources. In many cases, the unpredictable variation of the real world but only to the
simulation software itself is available at no cost (e.g., [7, variation available within those datasets or at those testing
12, 16, 18]). sites. Simulation provides the potential for generating
Hardware Not Required. The primary objective of sufficient variety for effective training while reducing the
simulation is to move research and development to virtual effort required for real world training and testing.
platforms. By removing the requirement for a physical Parallelization. Simulations can be distributed across
prototype, simulation can directly reduce build costs, any number of computer systems. Using simulation, we
design change costs, and time waiting for prototypes. can simulate hundreds of thousands of hours of training
Physical prototypes have engineering challenges that can [26] or billions of miles of driving [14].
leave development teams waiting on other systems [19]. Automated Annotation. Machine learning in particular
Infinite Virtual Resources. Real world testing and requires large annotated datasets. In simulation, we can
training requires real resources. Testing may damage, automatically generate annotated data sets. The Cityscapes
destroy, or consume resources purposefully (crash tests, dataset [3] is a real-world annotated dataset with 5000
welding parts) or incidentally (driving into a barrier). frames with pixel-level segmentation and labeling. The
Simulation avoids the cost associated with real resources. Cityscapes annotations reportedly required an estimated
This not only reduces the real cost of testing and training 90 minutes per image and include only 2D segmentation
but also reduces the risk associated with tests. Reduced and labeling. The VIPER dataset is an automatically
cost expands the possibilities for comprehensive testing generated dataset of 250K frames with comprehensive 2D,
including at the edge of performance or of unlikely ideas 3D, and temporal annotations [17]. To generate a dataset
[19]. the size of the VIPER dataset would require
Limited Human Involvement. Simulations can be run approximately 375,000 person-hours and would only
automatically. For software development and unit testing, include a small subset of the annotation data provided by
simulated tests can be incorporated into individual- or VIPER.
project-level builds to immediately identify broken Abstraction. Abstraction can provide immense benefits
models and codes [8]. A real-world test, especially for an for developing and testing systems in simulation but
autonomous vehicle, requires a test site, an operator, and, abstraction is also the source of the limitations of
for formal testing, a team of individuals to set up scenarios simulation. In real-world testing, we must build the
and collect data. Annotation of data that requires vehicle with a fully implemented powertrain, control
thousands of person-hours can be generated in real-time system, drive-by-wire system, computer processors,
[17, 19]. Removing humans from processes also has the sensors, wiring, and more. In simulated testing, by giving
potential benefit of reducing (not eliminating) biases. up some fidelity and generalizability, we can abstract
Ease of Experimentation. Simulation provides tools that away the details of some systems and other systems
make it easier to try out scenarios, modeling methods, and entirely.
training strategies. The reduced cost in time and resources
can limit the risk of embarrassing failure and open up the B. Limitations
possibility of testing innovative ideas or running Content Creation. It is possible that content creation is
experiments just to better understand the systems being the most significant barrier to use of simulation for
built and tested [19]. developing, training, and testing generalizable intelligent
Ease Data Collection. Simulators like the Donkey systems, especially if we include the models of physical
simulator support experimentation for both testing and for systems in our definition of content. Content creation,
learning. Simulation also helps to ease data collection. solely in terms of models of visual representations of
Data collection in the real world requires instrumentation environments, people, objects, is prohibitively costly in
that can be costly. In some cases, direct measurement is both time and money. Random generation of objects and
simply not possible. In simulation, measurements can be environments have been used successfully, especially
automated and are constrained only by access to the when combined with domain adaptation [4, 26]. We still
simulated systems. require accurate mechanical, electrical, sensor,
communication, and physics models to simulate simple
Dangerous Conditions. In simulation, we can test in tasks accurately.
conditions that would be impossible, impractical, or
unsafe. This includes extreme environments (space, While there are simulation tools and platforms that help
burning buildings) or simply dangerous conditions address some aspects of the content creation challenge, no
(pedestrian detection and AEB systems). simulation platform addresses all requirements. VIPER
leverages a video game for excellent environment models,
Increase Engagement. Intelligent systems, particular but experimenters have limited control over the test
embodied systems like robots, are exciting to students. environment. Gazebo and Unity-based tools offer
Through the combined benefits of low cost, accessibility, excellent control but limited environments for testing.
reduced risk, and abstraction, simulation allows students
to work on interesting problems. Flaws and Limitations. Simulations will never perfectly
match the real world. The benefits of the abstraction
Variation. Simulation allows near infinite variation, provided by simulation inherently comes with inaccuracy
constrained by computational resources and our ability to

103
and, ultimately, challenges generalization and transfer of
learning to real-world applications. Intelligent systems
will identify features that are inherent to the simulation
and will not transfer to the real world [26].
Transfer Simulation to Real. The key challenge is
transfer of intelligent systems from simulation to real
world in ways that allow us to leverage the advantages of
simulation but maintain the generalizability of our models. Figure 1. Simulated camera image (left) and segmented and box-
Multiple ML methods have demonstrated success in annotated image (right).
adapting synthetic semantically-labeled data to realistic
data while retaining accuracy of annotating for training evaluating the available methods for domain adaptation
with results that are equivalent or better than training on and applying them to our synthetic datasets.
annotated real-world datasets [20-25].
V. SUMMARY
IV. APPLICATIONS Intelligent systems require large datasets for training
At Mississippi State University, we are currently and testing. Simulation provides compelling advantages
developing an autonomous vehicle simulator (MAVS) for collecting datasets that include comprehensive
[27]. MAVS provides advanced physics-based sensor automated annotations for training and testing. In addition,
simulation and integrates with other simulation products simulation provides additional advantages for
(ROS, Matlab, Chrono). Internally, we use MAVS to development and testing of intelligent systems. However,
support the Center for Advanced Vehicular Systems simulation has limited generalizability and faces
HALO project [27]. significant challenges in construction of virtual
As part of this support, we recently implemented a draft environments and underlying modeling and simulation
automated annotation system for two reasons: First, we codes. Current research is exploring methods to address
wanted to provide a suitable dataset for training and limitations but simulation will never perfectly match the
testing ML algorithms for our specific needs, for which physical world. Developers using simulation must be
we do not have an annotated real world dataset nor the aware of the limitations of their simulation tools and the
resources to acquire one. Second, we wanted to abstract potential impact on generalizability of their models.
part of the sensor-processing task to allow other
developers to work further along the pipeline. ACKNOWLEDGMENT
MAVS can now provide automated 2D pixel-level The author would like to thank C. Goodin for his
image segmentation and box annotations for simulated assistance and guidance for developing in MAVS and the
cameras. Fig. 1 shows a single frame taken from our improved implementation of the initial effort.
simulated camera with the same frame with automated
pixel-level segmentation and box annotation. An initial REFERENCES
test dataset of 10,000 images and annotations was [1] K. Bousmalis, A. Irpan, P. Wohlhart, Y. Bai, M. Kelcey, M.
generated for training and testing. Kalakrishnan, L. Downs, J. Ibarz, P. Pastor, K. Konolige, S.
Levine, and V. Vanhoucke, “Using Simulation and Domain
In addition to the ability to annotate images, MAVS can Adaptation to Improve Efficiency of Deep Robotic Grasping,”
also provide all of the other benefits of simulation IEEE International Conference on Robotics and Automation
previously described. MAVS makes available a simulated (ICRA), Brisbane, 2018.
self-driving vehicle platform to any member of our team [2] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z.
willing to learn to operate it. The sensor processing team Huang, A. Karpathy, A. Khosla, M. Bernstein, A. Berg, and L.
is less inconvenienced by necessary mechanical work on Fei-Fei, “ImageNet Large Scale Visual Recognition Challenge,”
the vehicle. They can generate test data without using fuel, Int. J. Comput. Vis., vol. 115, pp. 211-252, 2015.
filling hard drives. MAVS can be used to generate random [3] M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R.
Benenson, U. Franke, S. Roth, and B. Schiele, “The Cityscapes
paths and automate driving along the paths. MAVS will Datasets for Semantic Urban Scene Understanding,” in Proc. Of
allow users to experiment with the vehicle and algorithms the IEEE Conference on Computer Vision and Pattern
in ways that would not be permissible with the real Recognition (CVPR), 2016.
vehicle. MAVS allows team members to simultaneously [4] W. Roscoe, “Donkey Car: An opensource DIY self driving
run simulations without restricting others access to the platform for small scale cars,” [Online]. Available:
vehicle and allows them to run many more experiments http://www.donkeycar.com [Accessed: July 10, 2018].
than would be possible in the real world. [5] “DARPA Robotics Challenge (DRC),” [Online]. Available:
https://www.darpa.mil/program/darpa-robotics-challenge
MAVS is also challenged by the limitations previously [Accessed July 10, 2018].
described. Content creation, especially content relevant to [6] Boston Dynamics, “Boston Dynamics Atlas Robot.” [Online].
our particular research interests, has proven to be a Available: http://www.bostondynamics.com/robot_Atlas.html
significant challenge. MAVS incorporates some basic [Accessed: July 12, 2018].
tools to generate random environments but those tools still [7] C.E. Aguero, N. Koenig, I. Chen, H. Boyer, S. Peters, J. Hsu, B.
use a limited set of visual representations. While MAVS Gerkey, S. Paepcke, J.L. Rivero, J. Manzo, E. Krotkov, and G.
leverages physics-based models it has clear limitations Pratt, “Inside the Virtual Robotics Challenge: Simulating Real-
with respect to visual fidelity, physical fidelity, and Time Robotic Disaster Response,” IEEE Transactions on
Automation Science and Engineering, vol. 12 (2), pp. 494-506,
currently includes no network or communication models. April 2015.
MAVS is not currently employing domain adaptation [8] M. Johnson, B. Shrewsbury, S. Bertrand, T. Wu, D. Duran, M.
for adapting synthetic data for training for real world Floyd, P. Abeles, D. Stephen, N. Mertins, A. Lesman, J. Carff, W.
application. Future work for the project will include Rifenburgh, P. Kaveti, W. Straatman, J. Smith, M. Griffioen, B.

104
Layton, T. de Boer, T. Koolen, P. Neuhaus, and J. Pratt, “Team [19] D.W. Carruth, “Virtual Reality for Education and Workforce
IHMC’s Lessons Learned from the DARPA Robotics Challenge Training,” in Proceedings of 2017 15th International Conference
Trials,” Journal of Field Robotics, vol. 32, no. 2, pp. 192-208, on Emerging eLearning Technologies and Applications (ICETA),
2015. 2017, pp. 1-6. doi: 10.1109/ICETA.2017.8102472.
[9] L. Jensen, “Evaluating the Validity of Latency Effects in Robotics [20] A. Shrivastava, T. Pfister, O. Tuzel, J. Susskind, W. Wang, and R.
Simulation,” M.S. thesis, Mississippi State University, Starkville, Webb, “Learning from Simulated and Unsupervised Images
MS, 2017. through Adversarial Training,” IEEE Conference on Computer
[10] M. Simon, “DARPA’s Next Challenge? A Grueling Underground Vision and Pattern Recognition (CVPR), Honolulu, HI, 2017, pp.
Journey,” Wired, [Online]. Available: 2242-2251. doi: 10.1109/CVPR.2017.241
https://www.wired.com/story/darpas-next-challenge-a-grueling- [21] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F.
underground-journey/ [Accessed: July 13, 2018]. Laviolette, M. Marchand, and V. Lempitsky, “Domain-
[11] “DIY Robocars,” [Online]. Available: https://diyrobocars.com/ Adversarial Training of Neural Networks,” Journal of Machine
[Accessed: July 14, 2018]. Learning Research, vol. 17, pp. 1-35, 2016.
[12] “Donkey Simulator,” [Online]. Available: [22] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P.
http://www.donkeycar.com/updates/simulator [Accessed: July 15, Abbeel, “Domain Randomization for Transferring Deep Neural
2018]. Networks from Simulation to the Real World,” in Proceedings
30th IEEE/RSJ International Conference on Intelligent Robots and
[13] T. Kramer. “Sparkfun AVC 2017 Donkey Simulator,” YouTube,
Systems (IROS), Vancouver, Canada, 2017.
October 19, 2017 [Video File]. Available:
https://youtu.be/_4fDMYh4ICA. [Accessed: July 14, 2018]. [23] E. Tzeng, C. Devin, J. Hoffman, C. Finn, P. Abbeel, S. Levine, K.
Saenko, and T. Darrell, “Adapting Deep Visuomotor
[14] “NVIDIA DRIVE Constellation: Virtual reality autonomous
vehicle simulator,” [Online]. Available: Representations with Weak Pairwise Constraints,” In Workshop
on the Algorithmic Foundations of Robotics (WAFR), 2016.
https://www.nvidia.com/en-us/self-driving-cars/drive-
constellation/ [Accessed: July 15, 2018]. [24] F. Sadeghi and S. Levine, CAD2RL: Real Single-Image Flight
[15] I. Chen and C. Aguero, “Vehicle and city simulation with Gazebo Without a Single Real Image,” in Proceedings of Robotics:
Science and Systems, Cambridge, MA, 2017. doi:
and ROS,” presented at ROSCON 2017, Vancouver, Canada,
2017, [Online]. Available: 10.15607/RSS.2017.XIII.034
https://roscon.ros.org/2017/presentations/ROSCon%202017%20V [25] P. Li, X. Liang, D. Jia, and E. Xing, “Semantic-aware Grad-GAN
ehicle%20and%20City%20Simulation.pdf [Accessed: July 15, for Virtual-to-Real Urban Scene Adaptation,” arXiv:1801.01726
2018]. [cs.CV], Jan. 2018.
[16] M. Quigley, K. Conley, B.P. Gerkey, J. Faust, T. Foote, J. Leibs, [26] K. Bousmalis and S. Levine, “Closing the Simulation-to-Reality
R. Wheeler, and A. Ng, “ROS: an open-source Robot Operating Gap for Deep Robotic Learning,” Google AI Blog, October 30,
System,” 2009 ICRA Workshop on Open Source Software, Kobe, 2017. [Online]. Available:
Japan, 2009. https://ai.googleblog.com/2017/10/closing-simulation-to-reality-
gap-for.html [Accessed: July 14, 2018].
[17] S.R. Richter, Z. Hayder, and V. Koltun, “Playing for
Benchmarks,” 2017 IEEE International Conference on Computer [27] C. Hudson, C. Goodin, M. Doude, and D.W. Carruth, “Analysis of
Vision (ICCV), Venice, 2017, pp. 2232-2241. doi: Dual LIDAR Placement for Off-Road Autonomy Using MAVS,”
10.1109/ICCV.2017.243 World Symposium on Digital Intelligence for Systems and
[18] “Unity Machine Learning,” [Online], Available: Machines, Kosice, Slovakia, 2018.
https://unity3d.com/machine-learning [Accessed: July 14, 2018].

105
106

Anda mungkin juga menyukai