Specialization of RobotDynamicsInterface for mobile robots operating in SE2. More...
#include <base_robot_se2.h>
Public Types | |
using | Ptr = std::shared_ptr< BaseRobotSE2 > |
![]() | |
using | Ptr = std::shared_ptr< RobotDynamicsInterface > |
![]() | |
typedef Eigen::VectorXd | ControlVector |
typedef std::shared_ptr< SystemDynamicsInterface > | Ptr |
typedef Eigen::VectorXd | StateVector |
Public Member Functions | |
BaseRobotSE2 ()=default | |
Default constructor. More... | |
void | dynamics (const Eigen::Ref< const StateVector > &x, const Eigen::Ref< const ControlVector > &u, Eigen::Ref< StateVector > f) const override=0 |
int | getInputDimension () const override=0 |
corbo::SystemDynamicsInterface::Ptr | getInstance () const override=0 |
void | getPoseSE2FromState (const Eigen::Ref< const Eigen::VectorXd > &x, double &pos_x, double &pos_y, double &theta) const override |
Convert state vector to pose (x,y,theta) More... | |
void | getPositionFromState (const Eigen::Ref< const Eigen::VectorXd > &x, double &pos_x, double &pos_y) const override |
Convert state vector to position (x,y) More... | |
int | getStateDimension () const override |
void | getSteadyStateFromPoseSE2 (double pos_x, double pos_y, double theta, Eigen::Ref< Eigen::VectorXd > x) const override |
Convert pose (x,y,theta) to steady state. More... | |
bool | isContinuousTime () const override |
bool | isLinear () const override |
virtual bool | mergeStateFeedbackAndOdomFeedback (const teb_local_planner::PoseSE2 &odom_pose, const geometry_msgs::Twist &odom_twist, Eigen::Ref< Eigen::VectorXd > x) const override |
Merge custom state feedback with pose and twist feedback. More... | |
![]() | |
virtual void | getPoseSE2FromState (const Eigen::Ref< const Eigen::VectorXd > &x, teb_local_planner::PoseSE2 &pose) const |
Convert state vector to PoseSE2 object. More... | |
virtual void | getSteadyStateFromPoseSE2 (const teb_local_planner::PoseSE2 &pose, Eigen::Ref< Eigen::VectorXd > x) const |
Convert PoseSE2 to steady state. More... | |
virtual bool | getTwistFromControl (const Eigen::Ref< const Eigen::VectorXd > &u, geometry_msgs::Twist &twist) const =0 |
Convert control vector to twist message. More... | |
virtual void | reset () |
![]() | |
virtual double | getDeadTime () const |
virtual void | getLinearA (const StateVector &x0, const ControlVector &u0, Eigen::MatrixXd &A) const |
virtual void | getLinearB (const StateVector &x0, const ControlVector &u0, Eigen::MatrixXd &B) const |
void | setLinearizationMethod (std::shared_ptr< FiniteDifferencesInterface > lin_method) |
SystemDynamicsInterface () | |
virtual | ~SystemDynamicsInterface ()=default |
Specialization of RobotDynamicsInterface for mobile robots operating in SE2.
This abstract class defines a base class for robots in which the full state vector x is embedded in SE2, i.e. x = [pos_x, pos_y, theta] with pos_x, pos_y as real numbers and theta in [-pi, pi).
Note, these models allow for simple conversion between state vectors and poses.
Definition at line 63 of file base_robot_se2.h.
using mpc_local_planner::BaseRobotSE2::Ptr = std::shared_ptr<BaseRobotSE2> |
Definition at line 86 of file base_robot_se2.h.
|
default |
Default constructor.
|
overridepure virtual |
|
overridepure virtual |
Implements corbo::SystemDynamicsInterface.
Implemented in mpc_local_planner::SimpleCarModel, mpc_local_planner::KinematicBicycleModelVelocityInput, and mpc_local_planner::UnicycleModel.
|
overridepure virtual |
|
inlineoverridevirtual |
Convert state vector to pose (x,y,theta)
[in] | x | Reference to the state vector [getStateDimension() x 1] |
[out] | pos_x | X-component of the position part |
[out] | pos_y | Y-component of the position part |
[out] | theta | Orientation (yaw angle) in [-pi, pi) |
Implements mpc_local_planner::RobotDynamicsInterface.
Definition at line 114 of file base_robot_se2.h.
|
inlineoverridevirtual |
Convert state vector to position (x,y)
[in] | x | Reference to the state vector [getStateDimension() x 1] |
[out] | pos_x | X-component of the position |
[out] | pos_y | Y-component of the position |
Implements mpc_local_planner::RobotDynamicsInterface.
Definition at line 106 of file base_robot_se2.h.
|
inlineoverridevirtual |
Implements corbo::SystemDynamicsInterface.
Definition at line 97 of file base_robot_se2.h.
|
inlineoverridevirtual |
Convert pose (x,y,theta) to steady state.
Converts a pose to state vector with dimensions [getStateDimension() x 1]. In case getStateDimension() > 3, the state information is incomplete and hence it is assumed that a steady state for this particular pose is avaiable, which means that there exist a control u such that f(x,u) = 0 (continuous time) or f(x,u) = x (discrete time).
For example, in case the remaining state components correspond to just integrators, they can be set to zero.
[in] | pos_x | X-component of the position part |
[in] | pos_y | Y-component of the position part |
[in] | theta | Orientation (yaw angle) in [-pi, pi) |
[out] | x | Reference to the state vector [getStateDimension() x 1] |
Implements mpc_local_planner::RobotDynamicsInterface.
Definition at line 123 of file base_robot_se2.h.
|
inlineoverridevirtual |
Implements corbo::SystemDynamicsInterface.
Definition at line 100 of file base_robot_se2.h.
|
inlineoverridevirtual |
Implements corbo::SystemDynamicsInterface.
Definition at line 103 of file base_robot_se2.h.
|
inlineoverridevirtual |
Merge custom state feedback with pose and twist feedback.
Many robots in ROS publish their state information (pose, linear and angular velocity)e.g. via an odometry message (potentially corrected by localization). However, for more complex robot models, it might not be possible to obtain the full state information without any observer or further measurements. For this purpose, custom state feedback can be provided. But as the complete navigation stack relies on the information obtained by odometry, this method allows for merging of both sources. In particular, it overrides only state components related to the pose and velocity.
[in] | odom_pose | PoseSE2 object obtained from odometry |
[in] | odom_twist | geometry::Twist message obtained from odometry |
[in,out] | x | Custom state feedback in which related will be overriden [getStateDimension() x 1] |
Implements mpc_local_planner::RobotDynamicsInterface.
Definition at line 133 of file base_robot_se2.h.