Cassie_Model icon indicating copy to clipboard operation
Cassie_Model copied to clipboard

Duplicated base links: left_pelvis_abduction and right_pelvis_abduction.

Open KentoyaRekino opened this issue 3 years ago • 7 comments

Hi, I'm trying to get Cassie's dynamics Model. I followed the steps, but I get the following error message ¿What could I be doing wrong?

Error using RobotLinks/findBaseLink (line 30) Duplicated base links: left_pelvis_abduction and right_pelvis_abduction.

Error in RobotLinks/configure (line 106) base_dofs(end).Child = findBaseLink(obj,joints);

Error in RobotLinks (line 97) configure(obj, config, base, load_path, varargin{:});

Error in Cassie (line 55) obj = obj@RobotLinks(config, base, [], 'removeFixedJoints', true);

Error in model_gen (line 19) cassie = Cassie(fullfile('urdf','cassie.urdf'));

KentoyaRekino avatar Jan 19 '22 18:01 KentoyaRekino

I also meet this problem, I use matlab(2018a) and mathematics(12.0)

yonchien avatar Jul 01 '22 08:07 yonchien

Same here, fixed it by removing the fixed joints between pelvis and hip. I don't know why but for me FROST somehow did connect the floating base to hip not pelvis. Hence the two base links.

Maybe this is helpful

ma-weiss avatar Jul 23 '22 10:07 ma-weiss

I have the same problem with matlab2021b and mathematica13.1 (windows)

lequn-F avatar Sep 25 '22 08:09 lequn-F

For me FROST does not work with Mathematica 13. Try Mathematica 12 and a previous commit of FROST works fine for me this way

ma-weiss avatar Sep 25 '22 10:09 ma-weiss

For me FROST does not work with Mathematica 13. Try Mathematica 12 and a previous commit of FROST works fine for me this way

I still have the same error with Mathematica 12.1.0(Matlab 2017b or 2021b). I don't find a previous commit of FROST, can you give me a link?

lequn-F avatar Sep 30 '22 01:09 lequn-F

For those who have the same problem, I think the core problem is that the update e5dc06 on 30 Dec 2021 introduces new features incompatible with the CassieModel example. Specifically, the 80-102 lines in frost-dev\matlab\robotics\@RobotLinks\configure.m ignores links with zero mass and inertia, which causes unexpected errors. Therefore, the solution is very straightforward, you can just reset to a former version of frost-dev, i.e. cd frost-dev && git reset 5e17cf8d9d2f --hard or comment those lines.

      % remove links with zero mass and inertia
%     link_indices_to_remove = [];
%     for i=1:numel(links)
%         link = links(i);
%         if link.Mass == 0 && all(all(link.Inertia == zeros(3)))
%             link_indices_to_remove = [link_indices_to_remove,i];
%         end
%     end
%     if ~isempty(link_indices_to_remove)
%         links(link_indices_to_remove) = [];
%     end
%     
%     % remove joints with no child links (except base coordinates)
%     joint_indices_to_remove = [];
%     for i=1:numel(joints)
%         joint = joints(i);
%         child_index = str_index(joint.Child,{links.Name});
%         if isempty(child_index)
%             joint_indices_to_remove = [joint_indices_to_remove,i];
%         end
%     end
%     if ~isempty(joint_indices_to_remove)
%         joints(joint_indices_to_remove) = [];
%     end
    
    if ~isempty(base_dofs) 
        % non-fixed base coordiantes
        base_dofs(end).Child = findBaseLink(obj,joints);

xu-yang16 avatar Oct 11 '22 03:10 xu-yang16

For those who have the same problem, I think the core problem is that the update e5dc06 on 30 Dec 2021 introduces new features incompatible with the CassieModel example. Specifically, the 89-102 lines in frost-dev\matlab\robotics\@RobotLinks\configure.m ignores links with zero mass and inertia, which causes unexpected errors. Therefore, the solution is very straightforward, you can just reset to a former version of frost-dev, i.e. cd frost-dev && git reset 5e17cf8d9d2f --hard or comment those lines.

      % remove links with zero mass and inertia
%     link_indices_to_remove = [];
%     for i=1:numel(links)
%         link = links(i);
%         if link.Mass == 0 && all(all(link.Inertia == zeros(3)))
%             link_indices_to_remove = [link_indices_to_remove,i];
%         end
%     end
%     if ~isempty(link_indices_to_remove)
%         links(link_indices_to_remove) = [];
%     end
%     
%     % remove joints with no child links (except base coordinates)
%     joint_indices_to_remove = [];
%     for i=1:numel(joints)
%         joint = joints(i);
%         child_index = str_index(joint.Child,{links.Name});
%         if isempty(child_index)
%             joint_indices_to_remove = [joint_indices_to_remove,i];
%         end
%     end
%     if ~isempty(joint_indices_to_remove)
%         joints(joint_indices_to_remove) = [];
%     end
    
    if ~isempty(base_dofs) 
        % non-fixed base coordiantes
        base_dofs(end).Child = findBaseLink(obj,joints);

Thanks, I solved this problem with this method.

lequn-F avatar Oct 11 '22 07:10 lequn-F