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

Duplicated base links: left_pelvis_abduction and right_pelvis_abduction. #5

Open
KentoyaRekino opened this issue Jan 19, 2022 · 7 comments

Comments

@KentoyaRekino
Copy link

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'));

@yonchien
Copy link

yonchien commented Jul 1, 2022

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

@ma-weiss
Copy link

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

@lequn-F
Copy link

lequn-F commented Sep 25, 2022

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

@ma-weiss
Copy link

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

@lequn-F
Copy link

lequn-F commented Sep 30, 2022

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?

@xu-yang16
Copy link

xu-yang16 commented Oct 11, 2022

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);

@lequn-F
Copy link

lequn-F commented Oct 11, 2022

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.

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

No branches or pull requests

5 participants