Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ReachingCtrl Class Reference

ReachingCtrl aims at reaching a given state with the robot. More...

#include <reach.hpp>

Inheritance diagram for ReachingCtrl:
Inheritance graph
[legend]

Public Member Functions

virtual void changeGoal (const State &goal)
 Change the oriented point which is aimed. More...
 
const StategetGoal () const
 Get the state which is aimed. More...
 
 ReachingCtrl (const MotionModel &model, const double &ts, const State &goal_aimed)
 The constructor needs a motion model, a time step and a goal state (in the robot's frame). More...
 
- Public Member Functions inherited from Controller
virtual void chooseVelocities (double &trans_vel, double &rot_vel, std::ostream &log_str)=0
 Computes new velocities for ROS node. More...
 
void stopMotion ()
 Stops the robot (i.e. sets both velocities to zero). More...
 
const double & timeStep () const
 Stops the robot (i.e. sets both velocities to zero). More...
 
virtual ~Controller ()
 The destructor needs to be defined as virtual. More...
 

Protected Member Functions

void newState (const State &state)
 Handles new state of the robot. More...
 
virtual void setGoal (const State &new_goal)
 Set the state which is aimed. More...
 
- Protected Member Functions inherited from Controller
void changeFirstOdometry ()
 Change the odometry data status (first or not). More...
 
 Controller (const MotionModel &model, const double &ts)
 This constructor (for the inheriting controllers) sets the motion model to the given one. More...
 
bool firstOdometry ()
 Are the odometry data the first? More...
 
void updateVelocities (double &trans_vel, double &rot_vel)
 Update the velocities from the fields and send the update signal. More...
 

Protected Attributes

State state
 The state of the robot. More...
 
- Protected Attributes inherited from Controller
double initial_date
 The first date of the odometry. More...
 
const MotionModelmotion_model
 The model of the motion. More...
 
double moving_velocity
 Translation velocity desired for the robot. More...
 
const double time_step
 The time step of the controller. More...
 
double turning_velocity
 Rotation velocity desired for the robot. More...
 

Private Attributes

State goal
 The state which is aimed. More...
 

Additional Inherited Members

- Signals inherited from Controller
void commandsUpdated (const double &trans_vel, const double &rot_vel)
 Update the display of the controller's commands. More...
 
void stateUpdated (const State &state)
 Update the display of the state. More...
 

Detailed Description

ReachingCtrl aims at reaching a given state with the robot.

The aimed state will be considered to be given in the robot's original frame (defined by the original oriented point, as given by the first odometry data).

Since
0.3.2

Definition at line 25 of file reach.hpp.

Constructor & Destructor Documentation

ReachingCtrl::ReachingCtrl ( const MotionModel model,
const double &  ts,
const State goal_aimed 
)
inline

The constructor needs a motion model, a time step and a goal state (in the robot's frame).

Parameters
modelthe motion model,
tsthe time step of the controller,
goal_aimedthe goal configuration.
See also
Controller(const MotionModel&, const double&)

Definition at line 56 of file reach.hpp.

Member Function Documentation

virtual void ReachingCtrl::changeGoal ( const State goal)
inlinevirtual

Change the oriented point which is aimed.

Parameters
goalthe new aimed state, in the robot's frame.

Definition at line 66 of file reach.hpp.

const State& ReachingCtrl::getGoal ( ) const
inline

Get the state which is aimed.

Returns
The state which is aimed.

Definition at line 62 of file reach.hpp.

void ReachingCtrl::newState ( const State state)
inlineprotectedvirtual

Handles new state of the robot.

Parameters
statethe new state of the robot, from odometry.

This method can be overwritten by inheritors.

Reimplemented from Controller.

Definition at line 34 of file reach.hpp.

virtual void ReachingCtrl::setGoal ( const State new_goal)
inlineprotectedvirtual

Set the state which is aimed.

Parameters
new_goalthe new aimed state.

Reimplemented in SmoothPathCtrl.

Definition at line 44 of file reach.hpp.

Member Data Documentation

State ReachingCtrl::goal
private

The state which is aimed.

Definition at line 28 of file reach.hpp.

State ReachingCtrl::state
protected

The state of the robot.

Definition at line 31 of file reach.hpp.


The documentation for this class was generated from the following file:


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