23#include "biward_drive_mode.h"
25#include "backward_drive_mode.h"
26#include "forward_drive_mode.h"
50 mod_forward_ = forward;
51 mod_backward_ = backward;
108 if (count_forward_ == 1 && fabs(angle_to_target) > M_PI_2 + 0.1)
111 else if (count_forward_ == 1)
114 else if (count_forward_ == -1 && fabs(angle_to_target) < M_PI_2 - 0.1)
117 else if (count_forward_ == -1)
125 if (count_forward_ == 1)
126 drive_mode = mod_forward_;
128 drive_mode = mod_backward_;
This is the base class which calculates drive modes.
bool stop_at_target_
flag if stopping on or after target
void set_current_target(float x, float y, float ori)
Sets the current target.
void set_current_colli_mode(NavigatorInterface::OrientationMode orient, bool stop)
Set the colli mode values for each drive mode.
float max_trans_
The maximum translation speed.
float get_proposed_trans_x()
Returns the proposed x translation.
float get_proposed_rot()
Returns the proposed rotatio.
NavigatorInterface::OrientationMode orient_mode_
orient mode of nav if
cart_coord_2d_t local_trajec_
local trajectory
field_pos_t target_
current target
field_pos_t robot_
current robot pos
colli_trans_rot_t robot_vel_
current robot velocity
float max_rot_
The maximum rotation speed.
Configuration * config_
The fawkes configuration.
void set_local_target(float x, float y)
Set the local targetpoint found by the search.
NavigatorInterface::DriveMode drive_mode_
the drive mode name
void set_current_robo_speed(float x, float y, float rot)
Sets the current robo speed.
void set_local_trajec(float x, float y)
Set the local trajectory point found by the search.
colli_trans_rot_t proposed_
proposed translation and rotation for next timestep
Logger * logger_
The fawkes logger.
void set_current_robo_pos(float x, float y, float ori)
Sets the current robo position.
cart_coord_2d_t local_target_
local target
virtual void update()=0
Calculate the proposed settings which are asked for afterwards.
This is the SlowBackward drive-module, for slow backward only movements.
BiwardDriveModule(ForwardDriveModule *forward, BackwardDriveModule *backward, Logger *logger, Configuration *config)
Constructor.
void update()
Calculate here your desired settings.
~BiwardDriveModule()
Destruct your local values here.
Interface for configuration handling.
virtual float get_float(const char *path)=0
Get value from configuration which is of type float.
This is the Forward drive-module, for forward only movements.
virtual void log_debug(const char *component, const char *format,...)=0
Log debug message.
@ AllowBackward
Moving allow backward constant.
Fawkes library namespace.
float x
Translation in x-direction.
float y
Translation in y-direction.
float rot
Rotation around z-axis.
float y
y coordinate in meters
float x
x coordinate in meters