Implement a logic to prevent the robot from walking when the temperature is greater then a threshold for a given ammount of time#194
Implement a logic to prevent the robot from walking when the temperature is greater then a threshold for a given ammount of time#194GiulioRomualdi wants to merge 14 commits intomasterfrom
Conversation
|
@S-Dafarra we have to decide how to give the user the information of warning. I would avoid sending a message to the face expression since it is a RPC call. I would go for a classical port streaming. Do you think it is doable to have something on the joypad? |
Yes, it is doable. I think we just need to make it "clean" enough. We can do something similar to the label mechanism of the OpenXR device, where we simply print whatever we receive in the port as a string. In this sense, it might be useful to not just stream a number, but rather a message like: "IDLE", "PREPARED", "RUNNING" (with a number of some kind to understand it is not stuck) and "OVERHEATING" in case of errors. What do you think? |
| if (m_motorTemperatureChecker->isThereAMotorOverLimit()) | ||
| { | ||
| yWarning() << "[WalkingModule::setPlannerInput] The motor temperature is over the limit."; | ||
| std::vector<unsigned int> indeces = m_motorTemperatureChecker->getMotorsOverLimit(); | ||
| std::string msg = "The following motors temperature are over the limits: "; | ||
| for (auto index : indeces) | ||
| { | ||
| msg += m_robotControlHelper->getAxesList()[index] | ||
| + ": Max temperature: " | ||
| + std::to_string(m_motorTemperatureChecker->getMaxTemperature()[index]) + " celsius."; | ||
| } | ||
| msg += "The trajectory will be set to zero."; | ||
| yWarning() << msg; | ||
|
|
||
| m_plannerInput.zero(); | ||
| } | ||
| else | ||
| { | ||
| m_plannerInput = plannerInput; | ||
| } |
There was a problem hiding this comment.
I think we can exploit the "soft stop" logic also for other cases, similar to what @G-Cervettini did as well. Maybe this logic here is a bit too hidden?
…obot to walk when the temperature is greather then a value
…given ammount of time
fadf906 to
26770d7
Compare
cc @S-Dafarra
TODO