wb-toolbox icon indicating copy to clipboard operation
wb-toolbox copied to clipboard

How to use a model without joint

Open lrapetti opened this issue 4 years ago • 1 comments

Summary

I was planning to use the WB-toolbox in order to retrieve kinematics and dynamics of a single rigid body model (i.e. a model without joints) in order to exploit kindyncomputation.

I am experiencing however some problems, and I guess more problem will arise moving further.

The current limitation I found at this stage is the following:

  • If I initialize the Config as:

    WBTConfigBox           = WBToolbox.Configuration;
    WBTConfigBox.RobotName = 'box';
    WBTConfigBox.UrdfFile  = 'box_idyn.urdf';
    WBTConfigBox.LocalName = 'WBT';
    % Controlboards and joints list. Each joint is associated to the corresponding controlboard 
    WBTConfigBox.ControlBoardsNames     = {};
    WBTConfigBox.ControlledJoints       = {};
    

    When I run the model, simulink fails reporting the following error

    Error evaluating 'InitFcn' callback of SubSystem block (mask) 'CollaborativeErgonomyControl/Subsystem/Configuration'. 
    Callback string is 'source = get_param(gcb,'ConfigSource');
    
    if strcmp(source, 'Workspace')
        object = get_param(gcb,'ConfigObject');
        WBToolbox.ConfigurationToMask(gcb, object);
    end
    
    WBToolbox.MaskToConfiguration(gcb);
    
    clear object source'
    Caused by:
    [MaskToConfiguration] The provided config is NonValid.
    

    It seems then that teh fields ControlBoardsNames and ControlledJoints, that are left as empty cell, are seen as NonValid default string.

  • I have then tried to put some empty string in that two fields

    WBTConfigBox           = WBToolbox.Configuration;
    WBTConfigBox.RobotName = 'box';
    WBTConfigBox.UrdfFile  = 'box_idyn.urdf';
    WBTConfigBox.LocalName = 'WBT';
    % Controlboards and joints list. Each joint is associated to the corresponding controlboard 
    WBTConfigBox.ControlBoardsNames     = {''};
    WBTConfigBox.ControlledJoints       = {''};
    

    but then blockfactory fails because the joint can not be found

     Possible causes: file not found, or the joint list contains an entry not present in the urdf model.
    Failed to initialize the KinDynComputations object.
    Cannot retrieve handle to KinDynComputations.
    

lrapetti avatar Feb 08 '21 16:02 lrapetti

Moreover, I am wondering what should be given as input to the blocks where the joint configuration is required.

lrapetti avatar Feb 08 '21 16:02 lrapetti