-
Notifications
You must be signed in to change notification settings - Fork 49
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
libgazebo_yarp_controlboard.so crashes when joints not found #66
Comments
Are you asking for a better error message before quitting or for a dynamic joint handler that will keep working even if a joint is not found? |
we should discuss about it. I personally think the implementation should be forgiving, print a big error message if it doesn't find a joint, and continue working. |
@arocchi +1 |
Let's imagine what should happen in the real robot. If a low level board of a joint is turned off, will our algorithms and our yarp wrapper work? What happens under the hood? The yarp wrapper just ignores the missing joint? |
Anyway the check if a joint exists or not should be done inside GazeboYarpControlBoardDriver::setJointNames(). if (_robot->getJoint(_robot->GetName()+"::"+joint_name)){
joint_names.push_back( _robot->GetName()+"::"+joint_name);
} |
@MirkoFerrati regarding the behavior of the wrappers, I am quite sure robotInterface prints a lot of errors but continues working, in both cases when a board turns off mid-operation or when the wrappers are configured for a bigger number of joints (i.e., wrappers for whole body used just for the lower body) |
Ok, i read the code again, my proposed fix was only capable of checking if a joint existed or not, but the plugin would have crashed as soon as the yarp interface used a setPosition on the missing joint. |
Ok, I did not read carefully this discussion before. I agree that the controlboard plugin should be robust and never crash Gazebo. My naive position was that we should make a initial check that the joints managed by the controlboard are available in gazebo model, and if the joints are not available the driver should not load (i.e. it open() method return false and an error message is printed). |
@traversaro it would be nice, but what about the initial configuration? Having a different initial conf for each world file is useful, and using control to set an initial configuration requires for some kind of virtual crane. Am I missing something? |
@arocchi the definition of a initial configuration in the world is definitely a well-defined feature. I'll post my thoughts on it in the afternoon. |
In 65e62f7 there is a fix for crash when not finding a joint name (disabling all the controlboard if a joint names is not found). I guess I can close this issue, if we want to have a more complex behaviour in case of joint name not found we can discuss it in a dedicated enhancement issue. |
ok! |
with
gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:424: T* boost::shared_ptr::operator->() const [with T = gazebo::physics::Joint]: Assertion `px != 0' failed.
The text was updated successfully, but these errors were encountered: