Fawkes API  Fawkes Development Version
fawkes::ForwardDriveModule Class Reference

This is the Forward drive-module, for forward only movements. More...

#include <>>

Inheritance diagram for fawkes::ForwardDriveModule:

Public Member Functions

 ForwardDriveModule (Logger *logger, Configuration *config)
 Constructor. More...
 
 ~ForwardDriveModule ()
 Destructor. More...
 
virtual void update ()
 Calculate here your desired settings. More...
 
- Public Member Functions inherited from fawkes::AbstractDriveMode
 AbstractDriveMode (Logger *logger, Configuration *config)
 Constructor. More...
 
virtual ~AbstractDriveMode ()
 Desctructor. More...
 
void set_current_target (float x, float y, float ori)
 Sets the current target. More...
 
void set_current_robo_pos (float x, float y, float ori)
 Sets the current robo position. More...
 
void set_current_robo_speed (float x, float y, float rot)
 Sets the current robo speed. More...
 
void set_current_colli_mode (NavigatorInterface::OrientationMode orient, bool stop)
 Set the colli mode values for each drive mode. More...
 
void set_local_target (float x, float y)
 Set the local targetpoint found by the search. More...
 
void set_local_trajec (float x, float y)
 Set the local trajectory point found by the search. More...
 
NavigatorInterface::DriveMode get_drive_mode_name ()
 Returns the drive modes name. More...
 
float get_proposed_trans_x ()
 Returns the proposed x translation. More...
 
float get_proposed_trans_y ()
 Returns the proposed y translation. More...
 
float get_proposed_rot ()
 Returns the proposed rotatio. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::AbstractDriveMode
float lin_interpol (float x, float left, float right, float bot, float top)
 Perform linear interpolation. More...
 
float guarantee_trans_stop (float distance, float current_trans, float desired_trans)
 Get velocity that guarantees a stop for a given distance. More...
 
- Protected Attributes inherited from fawkes::AbstractDriveMode
field_pos_t target_
 current target More...
 
field_pos_t robot_
 current robot pos More...
 
colli_trans_rot_t robot_vel_
 current robot velocity More...
 
float robot_speed_
 current robo translation velocity More...
 
cart_coord_2d_t local_target_
 local target More...
 
cart_coord_2d_t local_trajec_
 local trajectory More...
 
NavigatorInterface::OrientationMode orient_mode_
 orient mode of nav if More...
 
bool stop_at_target_
 flag if stopping on or after target More...
 
colli_trans_rot_t proposed_
 proposed translation and rotation for next timestep More...
 
NavigatorInterface::DriveMode drive_mode_
 the drive mode name More...
 
Loggerlogger_
 The fawkes logger. More...
 
Configurationconfig_
 The fawkes configuration. More...
 
float max_trans_
 The maximum translation speed. More...
 
float max_rot_
 The maximum rotation speed. More...
 

Detailed Description

This is the Forward drive-module, for forward only movements.

Definition at line 34 of file forward_drive_mode.h.

Constructor & Destructor Documentation

◆ ForwardDriveModule()

fawkes::ForwardDriveModule::ForwardDriveModule ( Logger logger,
Configuration config 
)

◆ ~ForwardDriveModule()

Member Function Documentation

◆ update()

void fawkes::ForwardDriveModule::update ( )
virtual

Calculate here your desired settings.

What you desire is checked afterwards to the current settings of the physical boundaries, but take care also.

How you do this is up to you, but be careful, our hardware is expensive!!!!

Available are:

target_ –> current target coordinates to drive to robot_ –> current robot coordinates robot_vel_ –> current Motor velocities

local_target_ –> our local target found by the search component we want to reach local_trajec_ –> The point we would collide with, if we would drive WITHOUT Rotation

orient_at_target_ –> Do we have to orient ourself at the target? stop_at_target_ –> Do we have to stop really ON the target?

Afterwards filled should be:

proposed_ –> Desired translation and rotation speed

Those values are questioned after an update() was called.

Implements fawkes::AbstractDriveMode.

Definition at line 180 of file forward_drive_mode.cpp.

References fawkes::AbstractDriveMode::local_target_, fawkes::AbstractDriveMode::local_trajec_, fawkes::AbstractDriveMode::max_rot_, fawkes::AbstractDriveMode::max_trans_, fawkes::AbstractDriveMode::proposed_, fawkes::AbstractDriveMode::robot_speed_, fawkes::AbstractDriveMode::robot_vel_, fawkes::colli_trans_rot_t::rot, fawkes::sqr(), fawkes::cart_coord_2d_struct::x, fawkes::colli_trans_rot_t::x, fawkes::cart_coord_2d_struct::y, and fawkes::colli_trans_rot_t::y.


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