piccole modifiche
This commit is contained in:
@@ -48,16 +48,15 @@ void commandCallback(const std_msgs::String::ConstPtr& msg, internalState* is, p
|
||||
} else if (!command.compare("RECORD") || !command.compare("PLAY") || !command.compare("OPEN")) {
|
||||
return;
|
||||
} else if (!command.compare("HOME")) {
|
||||
// Chiamata alla funzione di reset dei giunti nel modello
|
||||
std::vector<double> jPos;
|
||||
ROS_DEBUG("Autosetting joints to Home Position");
|
||||
rdata->kine_state->setVariablePositions(floatMap2doubleMap(rdata->joint_homes));
|
||||
rdata->kine_state->copyJointGroupPositions(rdata->joint_modelGroup, jPos); // verifica se ha avuto successo rileggendo le posizioni dal modello
|
||||
for (std::size_t i = 0; i < rdata->joint_names.size(); ++i) {
|
||||
ROS_DEBUG_COND(true,"Joint %s: %f", rdata->joint_names[i].c_str(), rad2deg(jPos[i]));
|
||||
}
|
||||
if (!params["execute"].get<bool>()){
|
||||
ROS_DEBUG("Autosetting joints to Home Position");
|
||||
ROS_WARN("Remote execution of homing not SAFE YET!!");
|
||||
std::vector<double> jPos;
|
||||
rdata->kine_state->copyJointGroupPositions(rdata->joint_modelGroup, jPos);
|
||||
for (std::size_t i = 0; i < rdata->joint_names.size(); ++i) {
|
||||
ROS_DEBUG_COND(true,"Joint %s: %f", rdata->joint_names[i].c_str(), rad2deg(jPos[i]));
|
||||
}
|
||||
ROS_WARN("Remote execution of homing NOT SAFE YET!!");
|
||||
pubs->at("trj_pub")->publish(composeTrjMessage(jPos, rdata->joint_names));
|
||||
} else {
|
||||
ROS_WARN("Joint model state set to Home, robot still in last position!!");
|
||||
|
||||
Reference in New Issue
Block a user