Class MPPIOptimizer

Class Documentation

class MPPIOptimizer

Public Functions

MPPIOptimizer(double num_samples, double horizon_steps, double dt, double lambda, double max_lin_vel = 1.0, double max_ang_vel = 1.0, double max_lin_acc = 1.0, double max_ang_acc = 1.0, double fov = M_PI / 2.0, double safety_radius = 0.6)

Constructor for MPPIOptimizer.

Parameters:
  • num_samples – Number of samples to generate for MPPI.

  • horizon_steps – Number of steps in the prediction horizon.

  • dt – Time step for the simulation.

  • lambda – Temperature parameter for MPPI.

  • max_lin_vel – Maximum linear velocity in m/s.

  • max_ang_vel – Maximum angular velocity in rad/s.

  • max_lin_acc – Maximum linear acceleration in m/s^2.

  • max_ang_acc – Maximum angular acceleration in rad/s^2.

  • fov – Field of view in radians for trajectory sampling.

  • safety_radius – Safety radius for obstacle avoidance in meters.

MPPIResult compute_control(const geometry_msgs::msg::Pose &current_pose, const nav_msgs::msg::Path &path, const pcl::PointCloud<pcl::PointXYZ> &points)

Computes the control commands using MPPI optimization.

Parameters:
  • current_pose – Current pose of the robot.

  • path – Planned path to follow.

  • points – Point cloud of the environment.

Returns:

MPPIResult containing the best control commands and trajectories.