PID.cpp
Go to the documentation of this file.
1 
10 #include <ctrl/PID.hpp>
11 
12 
13 // Cf Controller::chooseVelocities(...)
14 void PIDCtrl::chooseVelocities(double& trans_vel, double& rot_vel,
15  std::ostream& log_str) {
16  // updates the goal to be one time step after the robot's date
18  const iSeeML::rob::OrPtConfig& robot_cfg = state.configuration(),
19  goal_cfg = (*goal)->configuration();
20  const State new_goal( (*goal)->date(),
21  robot_cfg.projection(goal_cfg),
22  (*goal)->translationVelocity(),
23  (*goal)->rotationVelocity() );
24  // sets the goal of the local controller, in the robot's frame
25  reachCtrl.changeGoal(new_goal);
26  // uses the local controller
27  reachCtrl.chooseVelocities(trans_vel, rot_vel, log_str);
28 } // end of void PIDCtrl::chooseVelocities(double&, double&, ...) ----
void searchGoal(const double &forwardTime=0)
Moves the goal forward until it gets after the robot&#39;s date plus a given amount of time...
Definition: track.hpp:38
State state
The current state of the robot.
Definition: track.hpp:32
virtual void chooseVelocities(double &trans_vel, double &rot_vel, std::ostream &log_str)
Computes new velocities for ROS node.
Definition: PID.cpp:14
const double time_step
The time step of the controller.
Definition: controller.hpp:39
PIDreachCtrl reachCtrl
The local PID reaching controller.
Definition: PID.hpp:25
const iSeeML::rob::OrPtConfig & configuration() const
Gives the configuration of the state.
Definition: state.hpp:67
virtual void changeGoal(const State &goal)
Change the oriented point which is aimed.
Definition: reach.hpp:66
Path following controller class, using a PID.
This class defines a state, i.e. a configuration and its (translation and rotation) velocities...
Definition: state.hpp:22
void chooseVelocities(double &trans_vel, double &rot_vel, std::ostream &)
Computes new velocities for ROS node.
Definition: goPID.cpp:14


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