koala_demo.c File Reference

Demo program to remote control the koala robot from a wireless ethernet link, using a koremotor to control 2 pantilt cameras, and a koresound to play sound effects. More...

Include dependency graph for koala_demo.c:

Go to the source code of this file.

Data Structures

struct  koasound_s

Defines

#define RCVBUFSIZE   32
#define soundbufsize   2048

Typedefs

typedef struct koasound_s koasound_t

Functions

void * koa_init_task (void *arg)
int koa_net_init (int argc, char *argv[])
int koa_net_camera (int argc, char *argv[])
int koa_net_camera2 (int argc, char *argv[])
int koa_net_bothcam (int argc, char *argv[])
int koa_net_stop (int argc, char *argv[])
int koa_net_setspeed (int argc, char *argv[])
int net_exit (int argc, char *argv[])
int koa_net_playsound (int argc, char *argv[])
void * koa_sound_task (void *arg)
void * koa_sensor_task (void *arg)
void InitMotor (knet_dev_t *mot)
int main (int argc, char *argv[])

Variables

knet_dev_tkoala
int right = 0
int left = 0
int left_limit_p = 100
int left_limit_n = -100
int right_limit_p = 100
int right_limit_n = -100
knet_dev_tmotor0
knet_dev_tmotor1
knet_dev_tmotor2
knet_dev_tmotor3
int32_t minpos0
int32_t maxpos0
int32_t minpos1
int32_t maxpos1
int32_t minpos2
int32_t maxpos2
int32_t minpos3
int32_t maxpos3
const char * soundlist []
const unsigned int soundlist_size = sizeof(soundlist)/sizeof(char*)
koasound_tlastsound = NULL
koasound_tcurrentsound = NULL
pthread_mutex_t soundlock


Detailed Description

Demo program to remote control the koala robot from a wireless ethernet link, using a koremotor to control 2 pantilt cameras, and a koresound to play sound effects.

koala demo program (server side)

Author:
Pierre Bureau (K-Team SA)
Note:
Copyright (C) 2004 K-TEAM SA

Definition in file koala_demo.c.


Define Documentation

#define RCVBUFSIZE   32

Definition at line 27 of file koala_demo.c.

#define soundbufsize   2048

Koala Sound playing task

Definition at line 277 of file koala_demo.c.

Referenced by koa_sound_task().


Typedef Documentation

typedef struct koasound_s koasound_t


Function Documentation

void InitMotor ( knet_dev_t mot  ) 

void* koa_init_task ( void *  arg  ) 

Koala Camera init task

Definition at line 65 of file koala_demo.c.

References kmot_ResetError(), kmot_SearchLimits(), kmot_SetBlockedTime(), maxpos0, maxpos1, maxpos2, maxpos3, minpos0, minpos1, minpos2, and minpos3.

Referenced by koa_net_init().

Here is the call graph for this function:

int koa_net_bothcam ( int  argc,
char *  argv[] 
)

Definition at line 157 of file koala_demo.c.

References kmot_SetPoint(), kMotRegPos, minpos0, minpos1, minpos2, and minpos3.

Referenced by main().

Here is the call graph for this function:

int koa_net_camera ( int  argc,
char *  argv[] 
)

Definition at line 100 of file koala_demo.c.

References kmot_SetPoint(), kMotRegPos, kMotRegPosProfile, minpos0, and minpos1.

Referenced by main().

Here is the call graph for this function:

int koa_net_camera2 ( int  argc,
char *  argv[] 
)

Definition at line 131 of file koala_demo.c.

References kmot_SetPoint(), kMotRegPos, minpos2, and minpos3.

Referenced by main().

Here is the call graph for this function:

int koa_net_init ( int  argc,
char *  argv[] 
)

Koala Network command callbacks

Definition at line 89 of file koala_demo.c.

References KB_ERROR_PTHREAD, KB_FATAL, and koa_init_task().

Referenced by main().

Here is the call graph for this function:

int koa_net_playsound ( int  argc,
char *  argv[] 
)

Playing sound using the KoreMedia - generate a sound event

Definition at line 248 of file koala_demo.c.

References kb_alloc(), koasound_s::next, koasound_s::sound, and soundlist_size.

Referenced by main().

Here is the call graph for this function:

int koa_net_setspeed ( int  argc,
char *  argv[] 
)

Definition at line 190 of file koala_demo.c.

References koa_setSpeed(), left, left_limit_n, left_limit_p, right, right_limit_n, and right_limit_p.

Referenced by main().

Here is the call graph for this function:

int koa_net_stop ( int  argc,
char *  argv[] 
)

Definition at line 183 of file koala_demo.c.

References koa_setSpeed().

Referenced by main().

Here is the call graph for this function:

void* koa_sensor_task ( void *  arg  ) 

Koala Sensors reading and speed limiting task

Definition at line 360 of file koala_demo.c.

References koa_readProximity(), koa_setSpeed(), left, left_limit_n, left_limit_p, right, right_limit_n, and right_limit_p.

Referenced by main().

Here is the call graph for this function:

void* koa_sound_task ( void *  arg  ) 

int main ( int  argc,
char *  argv[] 
)

int net_exit ( int  argc,
char *  argv[] 
)

Definition at line 240 of file koala_demo.c.


Variable Documentation

Definition at line 58 of file koala_demo.c.

Definition at line 29 of file koala_demo.c.

Referenced by main().

Definition at line 57 of file koala_demo.c.

int left = 0

Definition at line 31 of file koala_demo.c.

Referenced by handle_joyaxis(), koa_lrf_task(), koa_net_setspeed(), koa_sensor_task(), and thread().

int left_limit_n = -100

Definition at line 33 of file koala_demo.c.

Referenced by koa_net_setspeed(), and koa_sensor_task().

int left_limit_p = 100

Definition at line 32 of file koala_demo.c.

Referenced by koa_net_setspeed(), and koa_sensor_task().

int32_t maxpos0

Definition at line 38 of file koala_demo.c.

Referenced by koa_init_task(), and main().

int32_t maxpos1

Definition at line 38 of file koala_demo.c.

Referenced by koa_init_task(), and main().

int32_t maxpos2

Definition at line 39 of file koala_demo.c.

Referenced by koa_init_task(), and main().

int32_t maxpos3

Definition at line 39 of file koala_demo.c.

Referenced by koa_init_task(), and main().

int32_t minpos0

Definition at line 38 of file koala_demo.c.

Referenced by koa_init_task(), koa_net_bothcam(), koa_net_camera(), and main().

int32_t minpos1

Definition at line 38 of file koala_demo.c.

Referenced by koa_init_task(), koa_net_bothcam(), koa_net_camera(), and main().

int32_t minpos2

Definition at line 39 of file koala_demo.c.

Referenced by koa_init_task(), koa_net_bothcam(), koa_net_camera2(), and main().

int32_t minpos3

Definition at line 39 of file koala_demo.c.

Referenced by koa_init_task(), koa_net_bothcam(), koa_net_camera2(), and main().

Definition at line 37 of file koala_demo.c.

Referenced by main().

Definition at line 37 of file koala_demo.c.

Referenced by main().

Definition at line 37 of file koala_demo.c.

Definition at line 37 of file koala_demo.c.

int right = 0

Definition at line 30 of file koala_demo.c.

Referenced by handle_joyaxis(), koa_lrf_task(), koa_net_setspeed(), koa_sensor_task(), and thread().

int right_limit_n = -100

Definition at line 35 of file koala_demo.c.

Referenced by koa_net_setspeed(), and koa_sensor_task().

int right_limit_p = 100

Definition at line 34 of file koala_demo.c.

Referenced by koa_net_setspeed(), and koa_sensor_task().

const char* soundlist[]

Initial value:

 {
  "sound1.wav",
  "sound2.wav",
  "sound3.wav",
  "sound4.wav",
  "sound5.wav"
}

Definition at line 42 of file koala_demo.c.

Referenced by koa_sound_task().

const unsigned int soundlist_size = sizeof(soundlist)/sizeof(char*)

Definition at line 49 of file koala_demo.c.

Referenced by koa_net_playsound().

pthread_mutex_t soundlock

Definition at line 59 of file koala_demo.c.


Generated on Wed Dec 15 11:49:29 2010 for KoreBot Library by  doxygen 1.5.5