ARGoS 3
A parallel, multi-engine simulator for swarm robotics
ci_footbot_encoder_sensor.h
Go to the documentation of this file.
1
16#ifndef CCI_FOOTBOT_ENCODER_SENSOR_H
17#define CCI_FOOTBOT_ENCODER_SENSOR_H
18
19/* To avoid dependency problems when including */
20namespace argos {
21 class CCI_FootBotEncoderSensor;
22}
23
24#include <argos3/core/control_interface/ci_sensor.h>
25
26namespace argos {
27
29
30 public:
31
39 struct SReading {
43
48
49 SReading(Real f_covered_distance_left_wheel,
50 Real f_covered_distance_right_wheel,
51 Real f_wheel_axis_length) :
52 CoveredDistanceLeftWheel(f_covered_distance_left_wheel),
53 CoveredDistanceRightWheel(f_covered_distance_right_wheel),
54 WheelAxisLength(f_wheel_axis_length) {
55 }
56
57 };
58
63
68 const SReading& GetReading() const;
69
70#ifdef ARGOS_WITH_LUA
71 virtual void CreateLuaState(lua_State* pt_lua_state);
72
73 virtual void ReadingsToLuaState(lua_State* pt_lua_state);
74#endif
75
76 protected:
77
79 };
80
81}
82
83#endif
float Real
Collects all ARGoS code.
Definition datatypes.h:39
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
The basic interface for all sensors.
Definition ci_sensor.h:34
const SReading & GetReading() const
Returns the reading of the encoder sensor Returns the reading of the encoder sensor.
The DTO of the encoder It returns the distance covered by the wheels in the last timestep In addition...
SReading(Real f_covered_distance_left_wheel, Real f_covered_distance_right_wheel, Real f_wheel_axis_length)