Revision dbbad8ed scout/libscout/src/EncodersControl.cpp

View differences:

scout/libscout/src/EncodersControl.cpp
42 42
                                 string scoutname)
43 43
    : node(libscout_node)
44 44
{
45
    query_client =
46
        node.serviceClient< ::messages::query_encoders>(scoutname+"/query_encoders");
45
    query_client = node.serviceClient< ::messages::query_encoders>(
46
            scoutname+"/query_encoders");
47
    reset_client = node.serviceClient< ::messages::reset_encoders>(
48
            scoutname+"/reset_encoders");
47 49
}
48 50

  
49 51
/**
......
69 71
    return cur_readings;
70 72
}
71 73

  
74
/**
75
 * @brief Resets the encoder tick count to 0.
76
 */
77
void EncodersControl::reset()
78
{
79
    ::messages::reset_encoders srv;
80
    if (!reset_client.call(srv))
81
    {
82
        ROS_ERROR("EncodersControl reset failed.");
83
    }
84
}

Also available in: Unified diff