smoothPath.hpp
Go to the documentation of this file.
1 
11 #ifndef QTCTRL_SMOOTH_PATH_CTRL
12 #define QTCTRL_SMOOTH_PATH_CTRL
13 
14 #include <ctrl/reach.hpp>
15 #include <iSeeML/rob/FscPath.hpp>
16 
26 class SmoothPathCtrl : public ReachingCtrl {
27  Q_OBJECT // This macro is needed to handle signals
28 
29  iSeeML::rob::FscPath path;
30  double total_distance;
31  double distance;
32 
33  // Cf ReachingCtrl::setGoal(const State&)
34  void setGoal(const State& goal);
35 
36 public:
47  SmoothPathCtrl(const MotionModel& model, const double& ts,
48  const State& goal_aimed)
49  // the path will be correctly set at first odometry data
50  : ReachingCtrl(model, ts, goal_aimed) {}
51 
53  virtual ~SmoothPathCtrl() {}
54 
57  const iSeeML::rob::Path& getPath() const;
58 
61  const std::list<State*>& getAimedTrajectory() const;
62 
63  // Cf Controller::choose_velocities(double&, double&, ...)
64  void chooseVelocities(double& trans_vel, double& rot_vel,
65  std::ostream&);
66 
67 Q_SIGNALS: // new signal
68 
70  void pathChanged();
71 
72 }; // end of class SmoothPathCtrl
73 
74 #endif // QTCTRL_SMOOTH_PATH_CTRL
const iSeeML::rob::Path & getPath() const
Get the path to the aimed oriented point.
Definition: smoothPath.cpp:39
void setGoal(const State &goal)
Set the state which is aimed.
Definition: smoothPath.cpp:14
const std::list< State * > & getAimedTrajectory() const
Transform the planned path into an aimed trajectory.
Definition: smoothPath.cpp:64
virtual ~SmoothPathCtrl()
The destructor needs to be explicitely redefined.
Definition: smoothPath.hpp:53
double distance
The distance already covered.
Definition: smoothPath.hpp:31
ReachingCtrl aims at reaching a given state with the robot.
Definition: reach.hpp:25
State goal
The state which is aimed.
Definition: reach.hpp:28
iSeeML::rob::FscPath path
The computed smooth path.
Definition: smoothPath.hpp:29
void pathChanged()
Update the display of the path.
This class defines a state, i.e. a configuration and its (translation and rotation) velocities...
Definition: state.hpp:22
SmoothPathCtrl aims at reaching an oriented point with the robot, using a smooth path generator...
Definition: smoothPath.hpp:26
Oriented point reaching controller abstract class.
This class defines a motion model, with the motion limits.
Definition: motion.hpp:28
SmoothPathCtrl(const MotionModel &model, const double &ts, const State &goal_aimed)
The constructor needs a motion model, a time step and a goal state.
Definition: smoothPath.hpp:47
void chooseVelocities(double &trans_vel, double &rot_vel, std::ostream &)
Computes new velocities for ROS node.
Definition: smoothPath.cpp:123
double total_distance
The distance to cover.
Definition: smoothPath.hpp:30


qt_ctrl
Author(s): Alexis Scheuer
autogenerated on Wed Dec 16 2020 15:51:32