Wiselib
|
Represents a roomba robot. More...
#include <roomba.h>
Public Types | |
enum | DataTypes { WALL = 0x01, POSITION = 0x02, BATTERY_AND_TEMPERATURE = 0x04, LIGHT_BUMPS = 0x08, ALL = 0x0f, WALL = 0x01, POSITION = 0x02, BATTERY_AND_TEMPERATURE = 0x04, LIGHT_BUMPS = 0x08, ALL = 0x0f } |
enum | { READY = 0, NO_VALUE = 1, INACTIVE = 2 } |
enum | MotionParameters { PRECISE_ANGULAR_VELOCITY = 20, DEFAULT_ANGULAR_VELOCITY = 60, FAST_ANGULAR_VELOCITY = 200, PRECISE_VELOCITY = 50, DEFAULT_VELOCITY = 200, FAST_VELOCITY = 300 } |
enum | DataTypes { WALL = 0x01, POSITION = 0x02, BATTERY_AND_TEMPERATURE = 0x04, LIGHT_BUMPS = 0x08, ALL = 0x0f, WALL = 0x01, POSITION = 0x02, BATTERY_AND_TEMPERATURE = 0x04, LIGHT_BUMPS = 0x08, ALL = 0x0f } |
enum | State { READY = 0, NO_VALUE = 1, INACTIVE = 2, DATA_AVAILABLE = 3 } |
enum | ErrorCodes { SUCCESS = OsModel::SUCCESS, ERR_UNSPEC = OsModel::ERR_UNSPEC } |
typedef RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS > | self_type |
typedef self_type * | self_pointer_t |
typedef Math_P | Math |
typedef ComUartModel_P | ComUartModel |
typedef OsModel_P | OsModel |
typedef delegate0< void > | new_data_delegate_t |
typedef vector_static< OsModel, new_data_delegate_t, MAX_RECEIVERS > | new_data_delegates_t |
typedef RoombaAngle< Math > | angle_t |
typedef RoombaData | value_t |
typedef int16_t | angular_velocity_t |
typedef int16_t | distance_t |
typedef int16_t | velocity_t |
typedef OsModel::size_t | size_t |
typedef uint8_t | block_data_t |
typedef RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS > | self_type |
typedef self_type * | self_pointer_t |
typedef OsModel_P | OsModel |
typedef Math_P | Math |
typedef ComUartModel_P | ComUartModel |
typedef Timer_P | Timer |
typedef Debug_P | Debug |
typedef delegate1< void, int > | state_delegate_t |
typedef vector_static< OsModel, state_delegate_t, MAX_RECEIVERS > | state_delegates_t |
typedef double | angle_t |
typedef RoombaData | value_t |
typedef int16_t | angular_velocity_t |
typedef double | distance_t |
typedef int16_t | velocity_t |
typedef OsModel::size_t | size_t |
typedef uint8_t | block_data_t |
Public Member Functions | |
RoombaModel (PCOs &os) | |
void | init (ComUartModel_P &uart, int data_types) |
void | init () |
void | destruct () |
void | data_types () |
void | move (velocity_t speed) |
void | turn (angular_velocity_t speed) |
void | stop () |
value_t & | operator() () |
Raw roomba data block. | |
int | state () |
angle_t | angle () |
distance_t | distance () |
bool | wall () |
template<typename T , void(T::*)(void) TMethod> | |
int | reg_new_data_callback (T *obj) |
int | unreg_new_data_callback (typename OsModel::size_t) |
void | notify_new_data_receivers () |
OsModel::size_t | packets () |
OsModel::size_t | errors () |
RoombaModel () | |
RoombaModel (typename OsModel::Os &os) | |
int | init (ComUartModel_P &uart, Timer_P &timer, int data_types) |
int | init (ComUartModel_P &uart, Timer_P &timer, Debug_P &debug, int data_types) |
int | init () |
int | destruct () |
int | data_types () |
int | turn (angular_velocity_t v=DEFAULT_ANGULAR_VELOCITY) |
int | move (velocity_t v=DEFAULT_VELOCITY) |
int | stop () |
int | wait_for_stop () |
int | enable_stable_motion (bool enable) |
int | reset_angle () |
angle_t | angle () |
int | reset_distance () |
distance_t | distance () |
int | state () |
template<typename T , void(T::*)(int) TMethod> | |
int | register_state_callback (T *obj) |
int | unregister_state_callback (typename OsModel::size_t) |
value_t & | operator() () |
int | bump () |
int | notify_state_receivers (int) |
OsModel::size_t | packets () |
OsModel::size_t | errors () |
int | set_ticks_per_mm (double t) |
int | set_ticks_per_radian (double t) |
Public Attributes | |
enum wiselib::RoombaModel::DataTypes | __attribute__ |
enum wiselib::RoombaModel::MotionParameters | __attribute__ |
Represents a roomba robot.
Not intended for direct use, rather use as parameter to RoombaMotion, RoombaIRDistanceSensors etc... in order to access sensor data and motion routines of the roomba in a standarized way.
Implements the TurnWalkMotion_concept and Odometer_concept concepts.
ComUartModel_P | Has to implement SerialCommunicationFacet_concept |
Timer_P | Has to implement the TimerFacet_concept and also provide a sleep(ms) method |
typedef RoombaAngle<Math> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::angle_t |
typedef double wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::angle_t |
typedef int16_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::angular_velocity_t |
typedef int16_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::angular_velocity_t |
typedef uint8_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::block_data_t |
typedef uint8_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::block_data_t |
typedef ComUartModel_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::ComUartModel |
typedef ComUartModel_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::ComUartModel |
typedef Debug_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::Debug |
typedef int16_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::distance_t |
typedef double wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::distance_t |
typedef Math_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::Math |
typedef Math_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::Math |
typedef delegate0<void> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::new_data_delegate_t |
typedef vector_static<OsModel, new_data_delegate_t, MAX_RECEIVERS> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::new_data_delegates_t |
typedef OsModel_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::OsModel |
typedef OsModel_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::OsModel |
typedef self_type* wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::self_pointer_t |
typedef self_type* wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::self_pointer_t |
typedef RoombaModel<OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::self_type |
typedef RoombaModel<OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::self_type |
typedef OsModel::size_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::size_t |
typedef OsModel::size_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::size_t |
typedef delegate1<void, int> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::state_delegate_t |
typedef vector_static<OsModel, state_delegate_t, MAX_RECEIVERS> wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::state_delegates_t |
typedef Timer_P wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::Timer |
typedef RoombaData wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::value_t |
typedef RoombaData wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::value_t |
typedef int16_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::velocity_t |
typedef int16_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::velocity_t |
anonymous enum |
enum wiselib::RoombaModel::DataTypes |
enum wiselib::RoombaModel::DataTypes |
enum wiselib::RoombaModel::ErrorCodes |
enum wiselib::RoombaModel::MotionParameters |
enum wiselib::RoombaModel::State |
wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::RoombaModel | ( | PCOs & | os | ) | [inline] |
wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::RoombaModel | ( | ) | [inline] |
wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::RoombaModel | ( | typename OsModel::Os & | os | ) | [inline] |
RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::angle_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::angle | ( | ) | [inline] |
angle_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::angle | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::bump | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::data_types | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::data_types | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::destruct | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::destruct | ( | void | ) |
RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::distance_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::distance | ( | void | ) | [inline] |
distance_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::distance | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::enable_stable_motion | ( | bool | enable | ) | [inline] |
OsModel_P::size_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::errors | ( | ) |
OsModel::size_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::errors | ( | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::init | ( | void | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::init | ( | ComUartModel_P & | uart, |
Timer_P & | timer, | ||
int | data_types | ||
) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::init | ( | ComUartModel_P & | uart, |
Timer_P & | timer, | ||
Debug_P & | debug, | ||
int | data_types | ||
) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::init | ( | ) | [inline] |
void wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::init | ( | ComUartModel_P & | uart, |
int | data_types | ||
) |
void wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::move | ( | velocity_t | speed | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::move | ( | velocity_t | v = DEFAULT_VELOCITY | ) | [inline] |
void wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::notify_new_data_receivers | ( | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::notify_state_receivers | ( | int | state | ) |
RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::value_t & wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::operator() | ( | ) | [inline] |
Raw roomba data block.
value_t& wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::operator() | ( | ) | [inline] |
OsModel_P::size_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::packets | ( | ) |
OsModel::size_t wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::packets | ( | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::reg_new_data_callback | ( | T * | obj | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::register_state_callback | ( | T * | obj | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::reset_angle | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::reset_distance | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::set_ticks_per_mm | ( | double | t | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::set_ticks_per_radian | ( | double | t | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::state | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::state | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::stop | ( | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::stop | ( | ) | [inline] |
void wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::turn | ( | angular_velocity_t | speed | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::turn | ( | angular_velocity_t | v = DEFAULT_ANGULAR_VELOCITY | ) | [inline] |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::unreg_new_data_callback | ( | typename OsModel::size_t | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::unregister_state_callback | ( | typename OsModel::size_t | ) |
int wiselib::RoombaModel< OsModel_P, ComUartModel_P, Timer_P, Debug_P, Math_P, MAX_RECEIVERS >::wait_for_stop | ( | ) |
bool wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::wall | ( | ) | [inline] |
enum wiselib::RoombaModel::DataTypes wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::__attribute__ |
enum wiselib::RoombaModel::MotionParameters wiselib::RoombaModel< OsModel_P, ComUartModel_P, Math_P, MAX_RECEIVERS >::__attribute__ |