File footbot_diffusion.h#

Definition (client/controllers/footbot_diffusion/footbot_diffusion.h)#

Includes#

  • argos3/core/control_interface/ci_controller.h

  • argos3/plugins/robots/foot-bot/control_interface/ci_footbot_encoder_sensor.h

  • argos3/plugins/robots/foot-bot/control_interface/ci_footbot_light_sensor.h

  • argos3/plugins/robots/foot-bot/control_interface/ci_footbot_motor_ground_sensor.h

  • argos3/plugins/robots/foot-bot/control_interface/ci_footbot_proximity_sensor.h

  • argos3/plugins/robots/foot-bot/control_interface/ci_footbot_turret_actuator.h

  • argos3/plugins/robots/foot-bot/control_interface/ci_footbot_turret_encoder_sensor.h

  • argos3/plugins/robots/generic/control_interface/ci_differential_steering_actuator.h

  • argos3/plugins/robots/generic/control_interface/ci_positioning_sensor.h

  • utils/common.h

Included By#

Namespaces#

Classes#

Defines#

Typedefs#

Full File Listing#

Defines

EPS
DELIVER_T
PICKER_T
MOVE_DIS

Typedefs

typedef vector<tuple<string, int, double, string, pair<double, double>, pair<double, double>, int>> SIM_PLAN#
struct Action#

Public Types

enum Type#

Values:

enumerator MOVE#
enumerator TURN#
enumerator STOP#
enumerator STATION#

Public Functions

inline Action()#
inline Action(Real x, Real y, Real angle, deque<int> node_ids, Type act_type, int time_dura = -1, int task_id = -1)#

Public Members

Real x#
Real y#
Real angle#
deque<int> nodeIDS#
int timer = -1#
int task_id = -1#
enum Action::Type type#
struct Pos#

Public Functions

inline bool operator<(const Pos &other) const#

Public Members

Real x#
Real y#
class PIDController

Public Functions

inline PIDController(Real kp, Real ki, Real kd)#
inline Real calculate(Real error)#

Private Members

Real kp_#
Real ki_#
Real kd_#
Real prevError_#
Real integral_#
Real dt = 0.1#
class CFootBotDiffusion : public CCI_Controller

Public Functions

CFootBotDiffusion()#
inline virtual ~CFootBotDiffusion()#
virtual void Init(TConfigurationNode &t_node)#
virtual void ControlStep()#
inline virtual void Reset()#
inline virtual void Destroy()#
inline CVector3 getCurrStation()#

Public Members

map<int, pair<bool, bool>> picker_task#

Private Functions

Real pidLinear(Real error)#
pair<Real, Real> Move(const CVector3 &targetPos, const CVector3 &currPos, Real currAngle, Real tolerance)#
inline pair<Real, Real> pidAngular(Real error)#
pair<Real, Real> Turn(Real targetAngle, Real currAngle, Real tolerance)#
void TurnLeft(Real angle, Real currAngle, Real tolerance) const#
void insertActions(const SIM_PLAN &actions)#
double getReferenceSpeed(double dist) const#
void updateQueue()#

Private Members

CCI_DifferentialSteeringActuator *m_pcWheels#
CCI_FootBotProximitySensor *m_pcProximity#
CCI_PositioningSensor *m_pcPosSens#
string robot_id#
CDegrees m_cAlpha#
int port_number#
Real m_linearVelocity#
Real m_angularVelocity#
Real m_linearAcceleration#
Real m_currVelocity#
Real m_fWheelVelocity#
CRange<CRadians> m_cGoStraightAngleRange#
string m_outputDir#
deque<Action> q#
queue<Real> velocityQueue#
int moveForwardFlag#
int count = 0#
Real offset = 15.0#
shared_ptr<rpc::client> client#
shared_ptr<PIDController> angular_pid_ptr#
shared_ptr<PIDController> linear_pid_ptr#
Real dt = 0.1#
Real prev_turn_error = 0.0#
Real integral_turn_error = 0.0#
Real kp_turn_ = 0.8#
Real ki_turn_ = 0.0#
Real kd_turn_ = 0.1#
Real prevLeftVelocity_ = 0.0#
Real prevRightVelocity_ = 0.0#
Real prevVelocity_ = 0.0#
Real prev_move_error = 0.0#
Real integral_move_error = 0.0#
Real kp_move_ = 0.6#
Real ki_move_ = 0.0#
Real kd_move_ = 0.0#
string debug_id = "-1"#
int lineExistFlag = 0#
bool terminateFlag = false#
long long int step_count_ = 0#
bool is_initialized = false#
CVector3 curr_station = {-1, -1, -100}#
int total_sim_duration = 0#
int screen = 0#
CVector3 init_pos#

Private Static Functions

static Real ChangeCoordinateFromMapToArgos(Real x)#
static Real ChangeCoordinateFromArgosToMap(Real x)#
namespace argos#