Project

General

Profile

Revision cc558a8d

IDcc558a8d1299b6a5034be4ea7035b58fe09581b8

Added by Alex Zirbel over 7 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/MotorControl.cpp
186 186
 *
187 187
 * @param which A bitmask that will specify which motor speed should be
188 188
 *  returned
189
 * @return The speed of the selected motor, or LIB_ERR if no motor selected
189
 * @return The speed of the selected motor
190 190
 */
191 191
float MotorControl::query(int which)
192 192
{
......
204 204
            case MOTOR_BR:
205 205
                return srv.response.br_speed;
206 206
            default:
207
                ROS_WARN("Bad WHICH in motors_query.");
208
                return LIB_ERROR;
207
                /// @todo: I hate this. Let's fix it soon.
208
                ROS_FATAL("Bad WHICH in motors_query.");
209 209
        }
210 210
    }
211 211
    else
212 212
    {
213
        ROS_ERROR("Failed to call service query_motors");
214
        return LIB_ERROR;
213
        ROS_FATAL("Failed to call service query_motors");
215 214
    }
216 215

  
217 216
    return 0;

Also available in: Unified diff