xy_theta_iterator.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2017, Locus Robotics
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 #ifndef DWB_PLUGINS_XY_THETA_ITERATOR_H
36 #define DWB_PLUGINS_XY_THETA_ITERATOR_H
37 
40 #include <memory>
41 
42 namespace dwb_plugins
43 {
45 {
46 public:
47  XYThetaIterator() : kinematics_(nullptr), x_it_(nullptr), y_it_(nullptr), th_it_(nullptr) {}
48  void initialize(ros::NodeHandle& nh, KinematicParameters::Ptr kinematics) override;
49  void startNewIteration(const nav_2d_msgs::Twist2D& current_velocity, double dt) override;
50  bool hasMoreTwists() override;
51  nav_2d_msgs::Twist2D nextTwist() override;
52 protected:
53  virtual bool isValidVelocity();
57 
58  std::shared_ptr<OneDVelocityIterator> x_it_, y_it_, th_it_;
59 };
60 } // namespace dwb_plugins
61 
62 #endif // DWB_PLUGINS_XY_THETA_ITERATOR_H
dwb_plugins::XYThetaIterator::isValidVelocity
virtual bool isValidVelocity()
Definition: xy_theta_iterator.cpp:65
dwb_plugins::XYThetaIterator::th_it_
std::shared_ptr< OneDVelocityIterator > th_it_
Definition: xy_theta_iterator.h:58
dwb_plugins::XYThetaIterator::startNewIteration
void startNewIteration(const nav_2d_msgs::Twist2D &current_velocity, double dt) override
Definition: xy_theta_iterator.cpp:49
dwb_plugins::XYThetaIterator::vy_samples_
int vy_samples_
Definition: xy_theta_iterator.h:55
dwb_plugins::XYThetaIterator::XYThetaIterator
XYThetaIterator()
Definition: xy_theta_iterator.h:47
velocity_iterator.h
dwb_plugins::XYThetaIterator::iterateToValidVelocity
void iterateToValidVelocity()
Definition: xy_theta_iterator.cpp:88
dwb_plugins
Definition: kinematic_parameters.h:43
dwb_plugins::XYThetaIterator::nextTwist
nav_2d_msgs::Twist2D nextTwist() override
Definition: xy_theta_iterator.cpp:76
dwb_plugins::XYThetaIterator::vx_samples_
int vx_samples_
Definition: xy_theta_iterator.h:55
dwb_plugins::XYThetaIterator
Definition: xy_theta_iterator.h:44
one_d_velocity_iterator.h
dwb_plugins::XYThetaIterator::hasMoreTwists
bool hasMoreTwists() override
Definition: xy_theta_iterator.cpp:70
dwb_plugins::XYThetaIterator::y_it_
std::shared_ptr< OneDVelocityIterator > y_it_
Definition: xy_theta_iterator.h:58
dwb_plugins::XYThetaIterator::initialize
void initialize(ros::NodeHandle &nh, KinematicParameters::Ptr kinematics) override
Definition: xy_theta_iterator.cpp:41
dwb_plugins::XYThetaIterator::kinematics_
KinematicParameters::Ptr kinematics_
Definition: xy_theta_iterator.h:56
dwb_plugins::KinematicParameters::Ptr
std::shared_ptr< KinematicParameters > Ptr
Definition: kinematic_parameters.h:92
dwb_plugins::XYThetaIterator::x_it_
std::shared_ptr< OneDVelocityIterator > x_it_
Definition: xy_theta_iterator.h:58
dwb_plugins::VelocityIterator
Definition: velocity_iterator.h:44
ros::NodeHandle
dwb_plugins::XYThetaIterator::vtheta_samples_
int vtheta_samples_
Definition: xy_theta_iterator.h:55


dwb_plugins
Author(s):
autogenerated on Sun May 18 2025 02:47:27