Fawkes API Fawkes Development Version
stop_drive_mode.cpp
1
2/***************************************************************************
3 * stop_drive_mode.cpp - Implementation of drive-mode "stop"
4 *
5 * Created: Fri Oct 18 15:16:23 2013
6 * Copyright 2002 Stefan Jacobs
7 * 2013-2014 Bahram Maleki-Fard
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#include "stop_drive_mode.h"
24
25namespace fawkes {
26
27/** @class StopDriveModule <plugins/colli/drive_modes/stop_drive_mode.h>
28 * Stop-Drive-Module. This module is called, if something goes wrong, or is not recognized.
29 * It is a fairly easy one, because it sets all to zero.
30 */
31
32/** Constructor.
33 * @param logger The fawkes logger
34 * @param config The fawkes configuration
35 */
37: AbstractDriveMode(logger, config)
38{
39 logger_->log_debug("StopDriveModule", "(Constructor): Entering...");
41 logger_->log_debug("StopDriveModule", "(Constructor): Exiting...");
42}
43
44/** Destruct your local values here. */
46{
47 logger_->log_debug("StopDriveModule", "(Destructor): Entering...");
48 logger_->log_debug("StopDriveModule", "(Destructor): Exiting...");
49}
50
51/* ************************************************************************** */
52/* *********************** U P D A T E ************************* */
53/* ************************************************************************** */
54
55/** Calculate here your desired settings. What you desire is checked afterwards to the current
56 * settings of the physical boundaries, but take care also.
57 *
58 * How you do this is up to you, but be careful, our hardware is expensive!!!!
59 *
60 * Available are:
61 *
62 * target_ --> current target coordinates to drive to
63 * robot_ --> current robot coordinates
64 * robot_vel_ --> current Motor velocities
65 *
66 * local_target_ --> our local target found by the search component we want to reach
67 * local_trajec_ --> The point we would collide with, if we would drive WITHOUT Rotation
68 *
69 * orient_at_target_ --> Do we have to orient ourself at the target?
70 * stop_at_target_ --> Do we have to stop really ON the target?
71 *
72 * Afterwards filled should be:
73 *
74 * proposed_ --> Desired translation and rotation speed
75 *
76 * Those values are questioned after an update() was called.
77 */
78void
80{
82}
83
84} // namespace fawkes
This is the base class which calculates drive modes.
NavigatorInterface::DriveMode drive_mode_
the drive mode name
colli_trans_rot_t proposed_
proposed translation and rotation for next timestep
Logger * logger_
The fawkes logger.
Interface for configuration handling.
Definition: config.h:68
Interface for logging.
Definition: logger.h:42
virtual void log_debug(const char *component, const char *format,...)=0
Log debug message.
@ MovingNotAllowed
Moving not allowed constant.
virtual void update()
Calculate here your desired settings.
StopDriveModule(Logger *logger, Configuration *config)
Constructor.
~StopDriveModule()
Destruct your local values here.
Fawkes library namespace.
float x
Translation in x-direction.
Definition: types.h:61
float y
Translation in y-direction.
Definition: types.h:62
float rot
Rotation around z-axis.
Definition: types.h:63