marxbotmotors.cpp
36 m_marxbotResource = actualResourceNameForMultirobot(ConfigurationHelper::getString(params, prefix + "marxbot", m_marxbotResource));
37 m_neuronsIteratorResource = actualResourceNameForMultirobot(ConfigurationHelper::getString(params, prefix + "neuronsIterator", m_neuronsIteratorResource));
66 d.describeString("marxbot").def("robot").help("The name of the resource associated with the MarXbot robot to use (default is \"robot\")");
67 d.describeString("neuronsIterator").def("neuronsIterator").help("The name of the resource associated with the neural network iterator (default is \"neuronsIterator\")");
83 MarXbotWheelVelocityMotor::MarXbotWheelVelocityMotor(ConfigurationParameters& params, QString prefix) :
110 Descriptor d = addTypeDescription(type, "The motor controlling the velocity of the wheels of the MarXbot robot");
142 void MarXbotWheelVelocityMotor::resourceChanged(QString resourceName, ResourceChangeType changeType)
168 m_onColor(ConfigurationHelper::getString(params, prefix + "onColor", "+00FF00").replace("+", "#")), // We have to do this because # is for comments in .ini files
169 m_offColor(ConfigurationHelper::getString(params, prefix + "offColor", "+0000FF").replace("+", "#")), // We have to do this because # is for comments in .ini files
174 ConfigurationHelper::throwUserConfigError(prefix + "offThreshold", params.getValue(prefix + "offThreshold"), "The offThreshold must be less than the onThreshold");
177 ConfigurationHelper::throwUserConfigError(prefix + "onColor", params.getValue(prefix + "onColor"), "The onColor value is not a valid color");
180 ConfigurationHelper::throwUserConfigError(prefix + "offColor", params.getValue(prefix + "offColor"), "The offColor value is not a valid color");
208 d.describeString("onColor").def("+00FF00").help("The \"on\" color of the robot.", "This is a string. Its format can be: +RGB, +RRGGBB, +RRRGGGBBB, +RRRRGGGGBBBB (each of R, G, and B is a single hex digit) or a name from the list of colors defined in the list of SVG color keyword names provided by the World Wide Web Consortium (see http://www.w3.org/TR/SVG/types.html#ColorKeywords). The default value is \"+00FF00\"");
209 d.describeString("offColor").def("+0000FF").help("The \"off\" color of the robot.", "This is a string. Its format can be: +RGB, +RRGGBB, +RRRGGGBBB, +RRRRGGGGBBBB (each of R, G, and B is a single hex digit) or a name from the list of colors defined in the list of SVG color keyword names provided by the World Wide Web Consortium (see http://www.w3.org/TR/SVG/types.html#ColorKeywords). The default value is \"+0000FF\"");
210 d.describeReal("onThreshold").def(0.8f).limits(0.0f, 1.0f).help("The value above which the color is switched to the \"on\" color", "This is the threshold above which the color of the robot is set to the one defined by the onColor parameter. The default value is 0.8");
211 d.describeReal("offThreshold").def(0.2f).limits(0.0f, 1.0f).help("The value below which the color is switched to the \"off\" color", "This is the threshold below which the color of the robot is set to the one defined by the offColor parameter. The default value is 0.2");
262 MarXbotAttachmentDeviceMotor::MarXbotAttachmentDeviceMotor(ConfigurationParameters& params, QString prefix) :
266 m_typeOfClosure(typeOfClosureFromString(ConfigurationHelper::getString(params, prefix + "typeOfClosure", "onlyClose"))),
272 ConfigurationHelper::throwUserConfigError(prefix + "typeOfClosure", params.getValue(prefix + "typeOfClosure"), "The typeOfClosure value is not valid");
275 ConfigurationHelper::throwUserConfigError(prefix + "noMotionRange", params.getValue(prefix + "noMotionRange"), "The noMotionRange value must be between 0.0 and 1.0");
300 Descriptor d = addTypeDescription(type, "The motor controlling the attachment device of the MarXbot");
301 d.describeEnum("typeOfClosure").def("onlyClose").values(QStringList() << "onlyClose" << "onlyHalfClose" << "both").help("How the attachment device is closed", "this parameter controls how the attachement device is closed. Possible values are: \"onlyClose\", \"onlyHalfClose\" and \"both\" (default is \"onlyClose\")");
302 d.describeReal("noMotionRange").def(0.3f).limits(0.0f, 1.0f).help("The dimension of the range corresponding to no movement", "This parameter defines how big is the range of activation which corresponds to no movement of the attachement device. If, for example, the value is 0.4, it means that activations from 0.3 to 0.7 cause no movement of the attachment device (default is 0.3)");
334 MarXbotAttachmentDeviceMotorController::Status status = MarXbotAttachmentDeviceMotorController::Open;
362 void MarXbotAttachmentDeviceMotor::resourceChanged(QString resourceName, ResourceChangeType changeType)
389 MarXbotAttachmentDeviceMotor::TypeOfClosure MarXbotAttachmentDeviceMotor::typeOfClosureFromString(QString value)