Project

General

Profile

Revision cc558a8d

IDcc558a8d1299b6a5034be4ea7035b58fe09581b8

Added by Alex Zirbel over 12 years ago

Modified the Behaviors to take a scoutname.

Scoutname now specifies which scout the behavior will affect. Scoutname must be passed to the constructors of each control module (some of which are now in need of modification), so that they can publish to the correct topic.

I also modified the constants file so that it is no longer exported. We should consider making this a full class with static exported functions (or a namespace).

View differences:

scout/libscout/src/HeadlightControl.cpp
37 37

  
38 38
#include "HeadlightControl.h"
39 39

  
40
using namespace std;
41

  
40 42
/** ROS publisher and client declaration */
41 43

  
42 44
/**
......
44 46
 *
45 47
 * Initialize the libscout node as a publisher of set_headlights.
46 48
 */
47
HeadlightControl::HeadlightControl(const ros::NodeHandle& libscout_node)
49
HeadlightControl::HeadlightControl(const ros::NodeHandle& libscout_node,
50
                                   string scoutname)
48 51
    : node(libscout_node)
49 52
{
50 53
    set_headlights_pub = node.advertise<headlights::set_headlights>
51
        ("set_headlights", QUEUE_SIZE);
54
        (scoutname + "/set_headlights", QUEUE_SIZE);
52 55
}
53 56

  
54 57
/**

Also available in: Unified diff