Project

General

Profile

Revision c492be62

IDc492be629f06e3cf71fdf832ce2cd5ac1ec779f8
Parent cc558a8d
Child b00761a0

Added by Alex Zirbel over 12 years ago

Updated the licensing information in many files.

This is a broken commit because I decided to do this at a bad time. Sorry! The build will be working after next commit, I promise (and I won't push till then). This commit reflects the licensing in the files after I used my auto-add/remove script.

View differences:

scout/libscout/src/Behavior.cpp
21 21
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 22
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 23
 * OTHER DEALINGS IN THE SOFTWARE.
24
 **/
24
 */
25 25

  
26 26
/**
27 27
 * @file Behavior.cpp
28
 * @brief Contains basic functions for the structure of all behaviours.
28
 * @brief Contains basic functions for the structure of all behaviors.
29 29
 * 
30 30
 * Contains function implementations needed for all behavior.
31 31
 *
......
38 38

  
39 39
using namespace std;
40 40

  
41
/**
42
 * Constructs a behavior and sets up all control classes.
43
 *
44
 * This constructor is used by all behaviors which inherit the Behavior
45
 * class, so that it is easy to create a behavior with access to ROS
46
 * functionality through the control classes.
47
 *
48
 * @param scoutname If nonempty, specifies which scout in the simulator
49
 *                  will be controlled by this behavior.
50
 */
41 51
Behavior::Behavior(string scoutname)
42 52
{
43 53
    motors = new MotorControl(node, scoutname);
54
    buttons = new ButtonControl(node, scoutname);
55
    sonar = new SonarControl(node, scoutname);
56

  
44 57
    loop_rate = new ros::Rate(10);
45
    //buttons(node);
46
    //sonar(node);
47 58
}
48 59

  
60
/**
61
 * Allows the behavior to check ros::ok(), without being aware of ROS.
62
 */
49 63
bool Behavior::ok()
50 64
{
51 65
    return ros::ok();
52 66
}
53 67

  
68
/**
69
 * Allows the behavior to call ros::spin(), without being aware of ROS.
70
 */
54 71
void Behavior::spin()
55 72
{
56 73
    ros::spin();
57 74
    return;
58 75
}
59 76

  
77
/**
78
 * Allows the behavior to call ros::spinOnce(), without being aware of ROS.
79
 */
60 80
void Behavior::spinOnce()
61 81
{
62 82
    ros::spinOnce();

Also available in: Unified diff