Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a logic to prevent the robot from walking when the temperature is greater then a threshold for a given ammount of time #194

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

GiulioRomualdi
Copy link
Member

@GiulioRomualdi GiulioRomualdi commented Oct 7, 2024

cc @S-Dafarra

TODO

  • to be tested on the robot
  • Add also the logic to send 0 command when no data arrive from the joystick done in 7ca4e40

@GiulioRomualdi
Copy link
Member Author

@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?

@GiulioRomualdi GiulioRomualdi self-assigned this Oct 7, 2024
@S-Dafarra
Copy link
Collaborator

S-Dafarra commented Oct 8, 2024

@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?

Comment on lines 1534 to 1591
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;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants