Bridging the gap between Learning-to-plan, Motion Primitives and Safe Reinforcement Learning

Piotr Kicki, Davide Tateo, Puze Liu, Jonas Günster, Jan Peters, Krzysztof Walas

TL;DR

This paper introduces CNP3O, a novel method that bridges the gap between learning-to-plan, motion primitives (MPs), and safe reinforcement learning (SafeRL). By integrating these approaches, CNP3O enables robots to learn complex, dynamic tasks under kinodynamic constraints more efficiently and safely, outperforming existing SafeRL methods, especially when leveraging task-specific knowledge.

What Problem Does This Paper Address?

Advanced robotics applications, like dexterous manipulation or playing sports, require robots to plan and execute complex trajectories while adhering to various constraints. These constraints can include task requirements, safety limitations, or the physical capabilities of the robot (kinodynamic constraints). While "learning-to-plan" methods can generate sophisticated motions, they often demand a complete analytical model of the robot and the task, which is impractical for highly complex systems. On the other hand, SafeRL methods can learn from environment interactions without full models but struggle with scalability and effectively incorporating domain knowledge. This paper aims to bridge this gap by developing a method that combines the strengths of learning-to-plan and SafeRL, allowing for efficient learning of complex, constrained motions without requiring a perfect environmental model.

Methods

The core of the proposed method, CNP3O (Constrained Neural motion Planning with PPO), is a hybrid approach that integrates learning-to-plan with reinforcement learning and motion primitives (MPs).

  • Motion Primitives (MPs): The paper leverages MPs as a flexible and compact representation for trajectories. Specifically, it highlights B-splines as a particularly suitable MP representation due to their ability to impose boundary conditions not only on position but also on derivatives (velocity, acceleration, etc.). This allows for encoding prior knowledge about the task, such as desired end-effector speeds or smooth stopping.
  • Learning-to-Plan Integration: CNP3O extends existing learning-to-plan frameworks by incorporating reinforcement learning. It learns a distribution over trajectories, aiming to maximize cumulative reward while satisfying safety constraints.
  • Safe Reinforcement Learning (SafeRL): The method is framed within the Constrained Markov Decision Process (CMDP) setting. It uses an episodic version of the Proximal Policy Optimization (PPO) algorithm to learn a policy that generates safe and effective trajectories. Constraints are handled by relaxing them into the objective function with learnable scaling factors (Lagrange multipliers), which are adapted during training.
  • Hybrid Approach: CNP3O learns a neural network that generates MP-based trajectories. This network is trained using PPO, optimizing for both task reward and constraint satisfaction. The use of MPs allows for a lower-dimensional action space and more structured exploration compared to traditional black-box RL.

Datasets

The paper evaluates its approach on two simulated environments:

  • Heavy Object Task: Moving a heavy object (12kg) with a manipulator from one pedestal to another, requiring adherence to joint limits, torque limits, and collision avoidance.
  • Air Hockey Hitting Task: Controlling a robot manipulator to hit an air hockey puck into the opponent's goal, with constraints on end-effector position (staying on the table), joint limits, and collision avoidance.

The method was also tested on a real-world air hockey setup.

Key Insights and Ideas

  • Bridging the Gap: The paper successfully demonstrates a way to combine the benefits of learning-to-plan (structured motion generation, prior knowledge encoding) with SafeRL (learning from interaction, no full model required) and MPs (compact representation, constraint handling).
  • B-splines Shine: B-spline-based MPs are shown to be particularly effective for constrained trajectory generation. Their flexibility in imposing boundary conditions on derivatives allows for encoding crucial prior knowledge that significantly improves learning speed and performance.
  • Prior Knowledge is Powerful: Explicitly incorporating prior knowledge about the task (e.g., desired end-effector velocity or acceleration) through MP boundary conditions leads to substantially faster learning and better performance, especially in challenging scenarios.
  • Decoupled Constraint Learning: The method's approach to handling constraints by learning adaptive scaling factors allows for better management of multiple, potentially conflicting constraints.

Key Results

  • Outperformance: CNP3O consistently outperforms state-of-the-art SafeRL baselines (PPO-Lag, TRPO-Lag, PCPO, ATACOM) on both the heavy object and air hockey tasks, especially when prior knowledge is utilized.
  • Heavy Object Task: CNP3O with prior knowledge achieved the best performance, demonstrating faster learning and lower constraint violations compared to other methods.
  • Air Hockey Task: CNP3O achieved a near 100% scoring ratio with prior knowledge and showed significantly better performance than baselines, even without prior knowledge. The B-spline MP representation was found to be more suitable for this dynamic task.
  • Real-World Transfer: The method showed promising zero-shot transfer capabilities to a real air hockey robot, maintaining a comparable safety level to simulation, although with a slight drop in success rate due to the sim-to-real gap.

Limitations and Future Work

  • Constraint Knowledge Required: The current CNP3O algorithm requires knowledge of the constraints. The authors suggest that adapting it to work with samples from the environment is a possible future direction.
  • Data Hungry: The approach is noted to be relatively more data-hungry than classical RL methods as it learns from entire episodes. Future work could explore techniques like imitation learning or episodic RL to improve sample efficiency.
  • MP Learning Simplicity: The MP learning algorithm itself is described as simple and could benefit from modern learning techniques or better trust-region approaches.
  • Zero-Shot Transfer: While promising, improving zero-shot transfer to real robots could be enhanced through domain randomization or replanning strategies, which would likely require more training samples.
  • Smooth Trajectory Composition: The ability to impose boundary conditions on derivatives makes the framework well-suited for smoothly composing sequences of trajectories, which is identified as a key area for future research.

Summary updated

BibTeX
@inproceedings{kicki2024bridging,
  author = {Piotr Kicki and Davide Tateo and Puze Liu and Jonas Günster and Jan Peters and Krzysztof Walas},
  title = {{Bridging the gap between Learning-to-plan, Motion Primitives and Safe Reinforcement Learning}},
  booktitle = {Conference on Robot Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=ZdgaF8fOc0},
}
Figure