  Reactive trajectory optimization for robotics presents formidable challenges,
demanding the rapid generation of purposeful robot motion in complex and
swiftly changing dynamic environments. While much existing research
predominantly addresses robotic motion planning with predefined objectives,
emerging problems in robotic trajectory optimization frequently involve
dynamically evolving objectives and stochastic motion dynamics. However,
effectively addressing such reactive trajectory optimization challenges for
robot manipulators proves difficult due to inefficient, high-dimensional
trajectory representations and a lack of consideration for time optimization.
  In response, we introduce a novel trajectory optimization framework called
RETRO. RETRO employs adaptive optimization techniques that span both spatial
and temporal dimensions. As a result, it achieves a remarkable computing
complexity of $O(T^{2.4}) + O(Tn^{2})$, a significant improvement over the
traditional application of DDP, which leads to a complexity of $O(n^{4})$ when
reasonable time step sizes are used. To evaluate RETRO's performance in terms
of error, we conducted a comprehensive analysis of its regret bounds, comparing
it to an Oracle value function obtained through an Oracle trajectory
optimization algorithm. Our analytical findings demonstrate that RETRO's total
regret can be upper-bounded by a function of the chosen time step size.
Moreover, our approach delivers smoothly optimized robot trajectories within
the joint space, offering flexibility and adaptability for various tasks. It
can seamlessly integrate task-specific requirements such as collision avoidance
while maintaining real-time control rates. We validate the effectiveness of our
framework through extensive simulations and real-world robot experiments in
closed-loop manipulation scenarios.
