Class XYThetaIterator

Inheritance Relationships

Base Type

Class Documentation

class XYThetaIterator : public dwb_plugins::VelocityIterator

Public Functions

inline XYThetaIterator()
virtual void initialize(const nav2_util::LifecycleNode::SharedPtr &nh, KinematicsHandler::Ptr kinematics, const std::string &plugin_name) override
virtual void startNewIteration(const nav_2d_msgs::msg::Twist2D &current_velocity, double dt) override
virtual bool hasMoreTwists() override
virtual nav_2d_msgs::msg::Twist2D nextTwist() override

Protected Functions

bool isValidSpeed(double x, double y, double theta)

Check to see whether the combined x/y/theta velocities are valid.

This is based on three parameters: min_speed_xy, max_speed_xy and min_speed_theta. The speed is valid if 1) The combined magnitude hypot(x,y) is less than max_speed_xy (or max_speed_xy is negative) AND 2) min_speed_xy is negative or min_speed_theta is negative or hypot(x,y) is greater than min_speed_xy or fabs(theta) is greater than min_speed_theta.

Returns:

True if the magnitude hypot(x,y) and theta are within the robot’s absolute limits

virtual bool isValidVelocity()
void iterateToValidVelocity()

Protected Attributes

int vx_samples_
int vy_samples_
int vtheta_samples_
KinematicsHandler::Ptr kinematics_handler_
std::shared_ptr<OneDVelocityIterator> x_it_
std::shared_ptr<OneDVelocityIterator> y_it_
std::shared_ptr<OneDVelocityIterator> th_it_