Skip to content

Commit

Permalink
jsk_robot_startup/src/quadruped_joystick_teleop.cpp: say something wh…
Browse files Browse the repository at this point in the history
…en service call failed
  • Loading branch information
k-okada committed Dec 18, 2024
1 parent f655c9b commit 716473d
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_estop_hard_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_estop_hard_.getService() << " failed. (" << srv.response.message << ")");
this->say("estop hard failed" + srv.response.message);
}
pressed_[button_estop_hard_] = true;
}
Expand All @@ -116,6 +117,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_estop_gentle_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_estop_gentle_.getService() << " failed. (" << srv.response.message << ")");
this->say("estop gentle failed" + srv.response.message);
}
pressed_[button_estop_gentle_] = true;
}
Expand All @@ -139,6 +141,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_power_off_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_power_off_.getService() << " failed. (" << srv.response.message << ")");
this->say("power off failed" + srv.response.message);
}
pressed_[button_power_off_] = true;
}
Expand All @@ -162,6 +165,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_power_on_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_power_on_.getService() << " failed. (" << srv.response.message << ")");
this->say("power on failed" + srv.response.message);
}
pressed_[button_power_on_] = true;
}
Expand All @@ -185,6 +189,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_self_right_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_self_right_.getService() << " failed. (" << srv.response.message << ")");
this->say("self right failed" + srv.response.message);
}
pressed_[button_self_right_] = true;
}
Expand All @@ -208,6 +213,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_sit_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_sit_.getService() << " failed. (" << srv.response.message << ")");
this->say("sit failed" + srv.response.message);
}
pressed_[button_sit_] = true;
}
Expand All @@ -231,6 +237,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_stand_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_stand_.getService() << " failed. (" << srv.response.message << ")");
this->say("stand failed" + srv.response.message);
}
pressed_[button_stand_] = true;
}
Expand All @@ -254,6 +261,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_stop_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_stop_.getService() << " failed. (" << srv.response.message << ")");
this->say("stop failed" + srv.response.message);
}
pressed_[button_stop_] = true;
}
Expand All @@ -277,6 +285,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_release_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_release_.getService() << " failed. (" << srv.response.message << ")");
this->say("release failed" + srv.response.message);
}
pressed_[button_release_] = true;
}
Expand All @@ -300,6 +309,7 @@ class TeleopManager
ROS_INFO_STREAM("Service " << client_claim_.getService() << " succeeded.");
} else {
ROS_ERROR_STREAM("Service " << client_claim_.getService() << " failed. (" << srv.response.message << ")");
this->say("claim failed" + srv.response.message);
}
pressed_[button_claim_] = true;
}
Expand Down Expand Up @@ -329,6 +339,7 @@ class TeleopManager
req_next_stair_mode_.data = not req_next_stair_mode_.data;
} else {
ROS_ERROR_STREAM("Service " << client_stair_mode_.getService() << " failed. (" << srv.response.message << ")");
this->say("stair mode failed" + srv.response.message);
}
pressed_[button_stair_mode_] = true;
}
Expand All @@ -351,6 +362,7 @@ class TeleopManager
ROS_INFO_STREAM("Service '" << client_dock_.getService() << "' succeeded.");
} else {
ROS_ERROR_STREAM("Service '" << client_dock_.getService() << "' failed. (" << srv.response.message << ")");
this->say("dock failed" + srv.response.message);
}
pressed_axes_[axe_dock_] = true;
}
Expand All @@ -361,6 +373,7 @@ class TeleopManager
ROS_INFO_STREAM("Service '" << client_undock_.getService() << "' succeeded.");
} else {
ROS_ERROR_STREAM("Service '" << client_undock_.getService() << "' failed. (" << srv.response.message << ")");
this->say("undock failed" + srv.response.message);
}
pressed_axes_[axe_dock_] = true;
}
Expand All @@ -385,6 +398,7 @@ class TeleopManager
ROS_INFO_STREAM("Service '" << client_tuck_.getService() << "' succeeded.");
} else {
ROS_ERROR_STREAM("Service '" << client_tuck_.getService() << "' failed. (" << srv.response.message << ")");
this->say("tuck failed" + srv.response.message);
}
pressed_axes_[axe_tuck_] = true;
}
Expand All @@ -395,6 +409,7 @@ class TeleopManager
ROS_INFO_STREAM("Service '" << client_untuck_.getService() << "' succeeded.");
} else {
ROS_ERROR_STREAM("Service '" << client_untuck_.getService() << "' failed. (" << srv.response.message << ")");
this->say("untuck failed" + srv.response.message);
}
pressed_axes_[axe_tuck_] = true;
}
Expand Down

0 comments on commit 716473d

Please sign in to comment.