15 std::ostream& log_str) {
16 static double remain_dur = 0, duration, moving_acc, turning_acc;
21 *
input >> duration >> moving_acc >> turning_acc;
23 { moving_acc = turning_acc = 0; duration = 10; }
24 remain_dur += duration;
bool inputEnded() const
Is the input stream at its end?
File controller (teleoperation) class.
const double time_step
The time step of the controller.
void chooseVelocities(double &trans_vel, double &rot_vel, std::ostream &log_str)
Computes new velocities for ROS node.
double moving_velocity
Translation velocity desired for the robot.
bool inputOK() const
Is the input stream OK for reading?
void updateVelocities(double &trans_vel, double &rot_vel)
Update the velocities from the fields and send the update signal.
const MotionModel & motion_model
The model of the motion.
void applyAccelerations(double &trans_vel, double &rot_vel, const double &trans_acc, const double &rot_acc, const double &time_step) const
Modify translation and rotation given velocities, applying the given accelerations during the given t...
const double & timeStep() const
Stops the robot (i.e. sets both velocities to zero).
double turning_velocity
Rotation velocity desired for the robot.
std::ifstream * input
The input stream, if any.