Skip to main content

MPCPoseTracking Class

Track a moving pose using MPC. More...

Declaration​

class moveit_pro::behaviors::MPCPoseTracking { ... }

Included Headers​

#include <mpc_pose_tracking.hpp>

Base class​

classMPCBehaviorBase<IMPL>

A base class for behaviors to help set up and execute MPC. More...

Public Constructors Index​

MPCPoseTracking (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &shared_resources)

Public Static Functions Index​

static BT::PortsListprovidedPorts ()
static autogetResiduals ()

Define the residuals used by this MPC behavior. More...

static BT::KeyValueVectormetadata ()

Description​

Track a moving pose using MPC.

This behavior uses Model Predictive Control (MPC) to track a target pose in real-time. The behavior optimizes several residuals simultaneous to achieve effective tracking.

Target Pose​

The target pose is provided through the target_pose and target_twist input ports. The target pose must be in world frame. The target pose is tracked by a site defined in the MuJoCo model, e.g. end_effector.

Optimization Problem​

The optimization problem aims to minimize the following cost: $l(x, u) = \sum_{i=1}^M w_i \cdot \|r_i(x, u)\|$ where $w_i$ is a non-negative weight for each residual functions, and $r_i(x, u)$ is the residual function. The goal of the optimization is to minimize the sum of the weighted residual norms. This site tracking behavior optimizes the following residuals.

  • Cartesian velocity
  • Cartesian acceleration:
  • Joint velocity and acceleration.
  • Force/torque constraints.
  • Site tracking errors. For further details on the residual functions, please refer to the documentation of each residual function.

Tuning Tips​

  • Adjust the weights of the residual functions to prioritize specific constraints.
  • As a starting point, the cost of position error should be 10x that of the velocity error, and the velocity error should be 10x that of the acceleration error.

Definition at line 47 of file mpc_pose_tracking.hpp.

Public Constructors​

MPCPoseTracking()​

moveit_pro::behaviors::MPCPoseTracking::MPCPoseTracking (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > & shared_resources)

Declaration at line 50 of file mpc_pose_tracking.hpp, definition at line 29 of file mpc_pose_tracking.cpp.

Public Static Functions​

getResiduals()​

auto moveit_pro::behaviors::MPCPoseTracking::getResiduals ()
inline static

Define the residuals used by this MPC behavior.

This method allows the use of a MPCProblem instance to add residual-specific ports.

Returns

A BT::PortsList containing the required ports for the behavior.

Definition at line 60 of file mpc_pose_tracking.hpp.

metadata()​

BT::KeyValueVector moveit_pro::behaviors::MPCPoseTracking::metadata ()
static

Declaration at line 71 of file mpc_pose_tracking.hpp, definition at line 40 of file mpc_pose_tracking.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::MPCPoseTracking::providedPorts ()
static

Declaration at line 53 of file mpc_pose_tracking.hpp, definition at line 35 of file mpc_pose_tracking.cpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.15.0.