
Mixed-Reality Robot Behavior Replay: A System Implementation
Zhao Han,1*Tom Williams,1Holly A. Yanco2
1MIRRORLab, Department of Computer Science, Colorado School of Mines, 1500 Illinois St., Golden, CO, USA 80401
2HRI Lab, Department of Computer Science, University of Massachusetts Lowell, 1 University Ave., Lowell, MA, USA 01854
zhaohan@mines.edu, twilliams@mines.edu, holly@cs.uml.edu,
Abstract
As robots become increasingly complex, they must explain
their behaviors to gain trust and acceptance. However, it may
be difficult through verbal explanation alone to fully convey
information about past behavior, especially regarding objects
no longer present due to robots’ or humans’ actions. Humans
often try to physically mimic past movements to accompany
verbal explanations. Inspired by this human-human interac-
tion, we describe the technical implementation of a system
for past behavior replay for robots in this tool paper. Specifi-
cally, we used Behavior Trees to encode and separate robot
behaviors, and schemaless MongoDB to structurally store
and query the underlying sensor data and joint control mes-
sages for future replay. Our approach generalizes to different
types of replays, including both manipulation and navigation
replay, and visual (i.e., augmented reality (AR)) and auditory
replay. Additionally, we briefly summarize a user study to fur-
ther provide empirical evidence of its effectiveness and effi-
ciency. Sample code and instructions are available on GitHub
at https://github.com/umhan35/robot-behavior-replay.
1 Introduction
Robots used in domains like collaborative manufacturing,
warehousing, and assistive living stand to have benefits such
as improving productivity, reducing work-related injuries,
and increasing the standard of living. Yet the increasingly
complexity of the manipulation and navigation tasks needed
in these domains can be difficult for users to understand,
especially when users need to ascertain the reasons behind
robot failures. As such, there is a surge of interest in im-
proving robot understandability by enabling them to ex-
plain themselves, e.g., through function annotation (Hayes
and Shah 2017), encoder-decoder deep learning framework
(Amir, Doshi-Velez, and Sarne 2018), interpretable task
representation (Han et al. 2021), and software architecture
(Stange et al. 2022). Different dimensions of robot expla-
nations have also been explored, such as proactive explana-
tions (Zhu and Williams 2020), preferred explanations (Han,
Phillips, and Yanco 2021), and undesired behaviors (Stange
and Kopp 2020). However, these works focused on explain-
ing a robot’s current behaviors.
*Most of this work was completed while Zhao Han was affili-
ated with the University of Massachusetts Lowell.
Presented at the AI-HRI Symposium at AAAI Fall Symposium Se-
ries (FSS) 2022
Figure 1: Manipulation replay using the replay technique
described in this paper. The robot’s arm movement and the
green projection (bottom) to indicate the object to be grasped
were being replayed to clarify a perception failure: A torn-
up wood chip was unknowingly misrecognized as one of the
gearbox bottoms. Key frames from the same replay and two
other types of replays are illustrated in Figure 2–4.
One challenge within this space is enabling robots to
explain their past behavior after their environment has
changed. This is an interesting yet challenging problem be-
cause objects present in the past might have already been
replaced or removed from the scene, making the task of re-
ferring to those objects during explanation particularly chal-
lenging (see also Han, Rygina, and Williams 2022). More-
over, a robot may not be capable of reasoning and explaining
its past behaviors due to unawareness of failures (see Figure
2 and 4), and limited semantic reasoning about objects like
ground obstacles or tabletop objects (see also Figure 3).
To help explain a robot’s past behaviors, we describe in
this tool paper the implementation of a mixed-reality robot
behavior replay system that builds on previous work on Visu-
alization Robots Virtual Design Elements (VDEs) (Walker
et al. 2022). While previous VDEs in this category have
primarily sought to visualize future robot behaviors (Rosen
et al. 2019), we instead use this technique to visualize previ-
ously executed behaviors. The robot behaviors that our tech-
nique is capable of replaying generalize to replay of both
manipulation and navigation behaviors. (See Figure 2–4).
Our replay technique can also handle replay of non-physical
cues: verbalization, e.g., sound and speech and visualiza-
tion, such as projector-based augmented reality (Han et al.
2020b, 2022). Empirical evidence of the effectiveness and
efficiency of our approach in explaining past behavior has
arXiv:2210.00075v1 [cs.RO] 30 Sep 2022