Fawkes API
Fawkes Development Version
|
23 #include "biward_drive_mode.h"
25 #include "backward_drive_mode.h"
26 #include "forward_drive_mode.h"
43 BackwardDriveModule *backward,
45 Configuration * config)
46 : AbstractDriveMode(logger, config)
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_;
float max_rot_
The maximum rotation speed.
void update()
Calculate here your desired settings.
void set_current_robo_speed(float x, float y, float rot)
Sets the current robo speed.
@ AllowBackward
Moving allow backward constant.
void set_local_trajec(float x, float y)
Set the local trajectory point found by the search.
NavigatorInterface::DriveMode drive_mode_
the drive mode name
float max_trans_
The maximum translation speed.
field_pos_t robot_
current robot pos
colli_trans_rot_t proposed_
proposed translation and rotation for next timestep
float rot
Rotation around z-axis.
bool stop_at_target_
flag if stopping on or after target
BiwardDriveModule(ForwardDriveModule *forward, BackwardDriveModule *backward, Logger *logger, Configuration *config)
Constructor.
float get_proposed_rot()
Returns the proposed rotatio.
float y
Translation in y-direction.
void set_local_target(float x, float y)
Set the local targetpoint found by the search.
void set_current_colli_mode(NavigatorInterface::OrientationMode orient, bool stop)
Set the colli mode values for each drive mode.
float x
Translation in x-direction.
cart_coord_2d_t local_target_
local target
float y
y coordinate in meters
NavigatorInterface::OrientationMode orient_mode_
orient mode of nav if
Configuration * config_
The fawkes configuration.
float x
x coordinate in meters
void set_current_robo_pos(float x, float y, float ori)
Sets the current robo position.
~BiwardDriveModule()
Destruct your local values here.
Logger * logger_
The fawkes logger.
float get_proposed_trans_x()
Returns the proposed x translation.
cart_coord_2d_t local_trajec_
local trajectory
virtual float get_float(const char *path)=0
void set_current_target(float x, float y, float ori)
Sets the current target.
colli_trans_rot_t robot_vel_
current robot velocity
field_pos_t target_
current target
virtual void log_debug(const char *component, const char *format,...)=0
virtual void update()=0
Calculate the proposed settings which are asked for afterwards.