Revision 0121ead7
ID | 0121ead71d532ad27980027f0bda30ea591d8e27 |
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.
scout/motors/src/motors.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 |
... | ... | |
36 | 36 |
|
37 | 37 |
#include "ros/ros.h" |
38 | 38 |
#include "motors.h" |
39 |
//#include "libscout/src/constants.h" |
|
39 | 40 |
#include <cstdlib> |
40 | 41 |
|
41 | 42 |
/** |
42 | 43 |
* @defgroup motors Motors |
43 | 44 |
* @brief Functions for using the motors |
44 | 45 |
* |
45 |
* @{ |
|
46 | 46 |
**/ |
47 | 47 |
|
48 |
/* Motor state variables */ |
|
49 |
/** \todo Fix types: static */ |
|
50 |
int motor_fl_speed; /**< The current speed of the front left motor. */ |
|
51 |
int motor_fr_speed; /**< The current speed of the front right motor. */ |
|
52 |
int motor_bl_speed; /**< The current speed of the back left motor. */ |
|
53 |
int motor_br_speed; /**< The current speed of the back right motor. */ |
|
54 |
|
|
48 | 55 |
/*! |
49 | 56 |
* \brief Motors driver. This is a ROS node that controls motor speeds. |
50 | 57 |
* |
... | ... | |
108 | 115 |
res.bl_speed = motor_bl_speed; |
109 | 116 |
res.br_speed = motor_br_speed; |
110 | 117 |
|
111 |
ROS_INFO("Motor speeds queried");
|
|
118 |
ROS_DEBUG("Motor speeds queried");
|
|
112 | 119 |
return true; |
113 | 120 |
} |
114 | 121 |
|
115 |
|
|
116 |
/** |
|
117 |
* } |
|
118 |
**/ |
Also available in: Unified diff