Revision 0121ead7

Added the ROS stack with the libscout, motors, and sonar packages to the reposititory, and associated files. There are probably still things missing. Libscout won't run properly, but it and motors will compile. Sonar is probably broken, but nothing depends on it yet, so this shouldn't be an issue.

View differences:
inline side by side

scout/libscout/src/constants.h

45

45

/* Libscout Defines */

46

46

47

47

/* Init defines */

48

const int LIB_ALL = ~0;

49

const int LIB_MOTORS = 0x1;

50

const int LIB_SONAR = 0x2;

51

const int LIB_CLIFFSENSORS = 0x4;

52

const int LIB_HEADLIGHTS = 0x8;

48

#define LIB_ALL -1

49

#define LIB_MOTORS 0x1

50

#define LIB_SONAR 0x2

51

#define LIB_CLIFFSENSORS 0x4

52

#define LIB_HEADLIGHTS 0x8

53

53

54

54

/* Status defines */

55

const int LIB_ERROR = ~0;

56

const int LIB_OK = 0;

55

//TODO MAKE ENUMS

56

#define LIB_ERROR -1

57

#define LIB_OK 0

57

58

58

/* Global objects */

59

ros::NodeHandle libscout_node;

60

59

61

60

#endif

scout/libscout/src/libmotors.cpp

1

1

/**

2

* Copyright (c) 2007 Colony Project

2

* Copyright (c) 2011 Colony Project

3

3

*

4

4

* Permission is hereby granted, free of charge, to any person

5

5

* obtaining a copy of this software and associated documentation

...

...

39

39

40

40

#include "libmotors.h"

41

41

42

/* ROS node created in libscout.cpp */

43

extern ros::NodeHandle libscout_node;

44

45

/** ROS publisher and client declaration */

46

ros::Publisher set_motors_publisher;

47

ros::ServiceClient query_motors_client;

48

49

/*!

50

* \brief Initialize the motors module of libscout.

51

*

52

* Initialize the libscout node as a publisher of set_motors and a client of