Wiselib
Public Types | Public Member Functions
wiselib::RoombaMotion< Roomba_P, Math_P > Class Template Reference

#include <roomba_motion.h>

List of all members.

Public Types

enum  { DEFAULT_VELOCITY = 50, MAX_VELOCITY = 100 }
enum  { DEFAULT_ANGULAR_VELOCITY = 20, MAX_ANGULAR_VELOCITY = 100 }
enum  State { STATE_STOPPED, STATE_MOVING }
typedef Roomba_P Roomba
typedef Math_P Math
typedef Roomba::distance_t distance_t
typedef Roomba::angle_t angle_t
typedef Pose< angle_t, distance_tpose_t
typedef Roomba::velocity_t velocity_t
typedef Roomba::angular_velocity_t angular_velocity_t
typedef RoombaMotion< Roomba_P,
Math_P > 
self_t

Public Member Functions

void init (Roomba &roomba)
void init ()
void destruct ()
void move (velocity_t v=DEFAULT_VELOCITY)
 Drive straight with given velocity.
void move_distance (distance_t d)
 Like move(), but stop after given distance.
void move_to_wall ()
 Like move(), but stop when hitting a wall.
void turn (angular_velocity_t v=DEFAULT_ANGULAR_VELOCITY)
 Turn counter-clockwise with given angular velocity.
void turn_about (angle_t a)
 Like turn() but turn about given angle.
void turn_to (angle_t a)
 Like turn() but turn until facing a certain angle (as reported by internal pose estimation)
State state ()
 Get current state.
void stop ()
 Stop current motion.
distance_t distance ()
 Return moved distance since last call to this function.
pose_t pose ()
 Estimate current pose.

template<typename Roomba_P, typename Math_P>
class wiselib::RoombaMotion< Roomba_P, Math_P >


Member Typedef Documentation

template<typename Roomba_P, typename Math_P>
typedef Roomba::angle_t wiselib::RoombaMotion< Roomba_P, Math_P >::angle_t
template<typename Roomba_P, typename Math_P>
typedef Roomba::angular_velocity_t wiselib::RoombaMotion< Roomba_P, Math_P >::angular_velocity_t
template<typename Roomba_P, typename Math_P>
typedef Roomba::distance_t wiselib::RoombaMotion< Roomba_P, Math_P >::distance_t
template<typename Roomba_P, typename Math_P>
typedef Math_P wiselib::RoombaMotion< Roomba_P, Math_P >::Math
template<typename Roomba_P, typename Math_P>
typedef Pose<angle_t, distance_t> wiselib::RoombaMotion< Roomba_P, Math_P >::pose_t
template<typename Roomba_P, typename Math_P>
typedef Roomba_P wiselib::RoombaMotion< Roomba_P, Math_P >::Roomba
template<typename Roomba_P, typename Math_P>
typedef RoombaMotion<Roomba_P, Math_P> wiselib::RoombaMotion< Roomba_P, Math_P >::self_t
template<typename Roomba_P, typename Math_P>
typedef Roomba::velocity_t wiselib::RoombaMotion< Roomba_P, Math_P >::velocity_t

Member Enumeration Documentation

template<typename Roomba_P, typename Math_P>
anonymous enum
Enumerator:
DEFAULT_VELOCITY 
MAX_VELOCITY 
template<typename Roomba_P, typename Math_P>
anonymous enum
Enumerator:
DEFAULT_ANGULAR_VELOCITY 
MAX_ANGULAR_VELOCITY 
template<typename Roomba_P, typename Math_P>
enum wiselib::RoombaMotion::State
Enumerator:
STATE_STOPPED 
STATE_MOVING 

Member Function Documentation

template<typename Roomba_P , typename Math_P >
void wiselib::RoombaMotion< Roomba_P, Math_P >::destruct ( void  )
template<typename Roomba_P, typename Math_P>
distance_t wiselib::RoombaMotion< Roomba_P, Math_P >::distance ( void  ) [inline]

Return moved distance since last call to this function.

template<typename Roomba_P , typename Math_P >
void wiselib::RoombaMotion< Roomba_P, Math_P >::init ( void  )
template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::init ( Roomba roomba)
template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::move ( velocity_t  v = DEFAULT_VELOCITY) [inline]

Drive straight with given velocity.

template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::move_distance ( distance_t  d) [inline]

Like move(), but stop after given distance.

template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::move_to_wall ( ) [inline]

Like move(), but stop when hitting a wall.

template<typename Roomba_P, typename Math_P>
pose_t wiselib::RoombaMotion< Roomba_P, Math_P >::pose ( ) [inline]

Estimate current pose.

template<typename Roomba_P, typename Math_P>
State wiselib::RoombaMotion< Roomba_P, Math_P >::state ( )

Get current state.

template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::stop ( ) [inline]

Stop current motion.

template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::turn ( angular_velocity_t  v = DEFAULT_ANGULAR_VELOCITY) [inline]

Turn counter-clockwise with given angular velocity.

template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::turn_about ( angle_t  a) [inline]

Like turn() but turn about given angle.

template<typename Roomba_P, typename Math_P>
void wiselib::RoombaMotion< Roomba_P, Math_P >::turn_to ( angle_t  a) [inline]

Like turn() but turn until facing a certain angle (as reported by internal pose estimation)


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines