replaced printf -> robot::console
This commit is contained in:
@@ -174,15 +174,15 @@ bool makeFootprintFromString(const std::string& footprint_string, std::vector<ro
|
||||
|
||||
if (error != "")
|
||||
{
|
||||
printf("Error parsing footprint parameter: '%s'\n", error.c_str());
|
||||
printf(" Footprint string was '%s'.\n", footprint_string.c_str());
|
||||
robot::log_error("Error parsing footprint parameter: '%s'\n", error.c_str());
|
||||
robot::log_error(" Footprint string was '%s'.\n", footprint_string.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// convert vvf into points.
|
||||
if (vvf.size() < 3)
|
||||
{
|
||||
printf("You must specify at least three points for the robot footprint, reverting to previous footprint.\n");
|
||||
robot::log_error("You must specify at least three points for the robot footprint, reverting to previous footprint.\n");
|
||||
return false;
|
||||
}
|
||||
footprint.reserve(vvf.size());
|
||||
@@ -198,7 +198,7 @@ bool makeFootprintFromString(const std::string& footprint_string, std::vector<ro
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Points in the footprint specification must be pairs of numbers. Found a point with %d numbers.\n",
|
||||
robot::log_error("Points in the footprint specification must be pairs of numbers. Found a point with %d numbers.\n",
|
||||
int(vvf[ i ].size()));
|
||||
return false;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ double getNumberFromXMLRPC(robot_xmlrpcpp::XmlRpcValue& value, const std::string
|
||||
value.getType() != robot_xmlrpcpp::XmlRpcValue::TypeDouble)
|
||||
{
|
||||
std::string& value_string = value;
|
||||
printf("Values in the footprint specification (param %s) must be numbers. Found value %s.\n",
|
||||
robot::log_error("Values in the footprint specification (param %s) must be numbers. Found value %s.\n",
|
||||
full_param_name.c_str(), value_string.c_str());
|
||||
throw std::runtime_error("Values in the footprint specification must be numbers");
|
||||
}
|
||||
@@ -270,7 +270,7 @@ std::vector<robot_geometry_msgs::Point> makeFootprintFromXMLRPC(robot_xmlrpcpp::
|
||||
if (footprint_xmlrpc.getType() != robot_xmlrpcpp::XmlRpcValue::TypeArray ||
|
||||
footprint_xmlrpc.size() < 3)
|
||||
{
|
||||
printf("The footprint must be specified as list of lists on the parameter server, %s was specified as %s\n",
|
||||
robot::log_error("The footprint must be specified as list of lists on the parameter server, %s was specified as %s\n",
|
||||
full_param_name.c_str(), std::string(footprint_xmlrpc).c_str());
|
||||
throw std::runtime_error("The footprint must be specified as list of lists on the parameter server with at least "
|
||||
"3 points eg: [[x1, y1], [x2, y2], ..., [xn, yn]]");
|
||||
@@ -286,7 +286,7 @@ std::vector<robot_geometry_msgs::Point> makeFootprintFromXMLRPC(robot_xmlrpcpp::
|
||||
if (point.getType() != robot_xmlrpcpp::XmlRpcValue::TypeArray ||
|
||||
point.size() != 2)
|
||||
{
|
||||
printf("The footprint (parameter %s) must be specified as list of lists on the parameter server eg: "
|
||||
robot::log_error("The footprint (parameter %s) must be specified as list of lists on the parameter server eg: "
|
||||
"[[x1, y1], [x2, y2], ..., [xn, yn]], but this spec is not of that form.\n",
|
||||
full_param_name.c_str());
|
||||
throw std::runtime_error("The footprint must be specified as list of lists on the parameter server eg: "
|
||||
|
||||
Reference in New Issue
Block a user