Coder Social home page Coder Social logo

danfoa / morphosymm Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 3.0 827.9 MB

Tools for exploiting Morphological Symmetries in robotics

Home Page: https://danfoa.github.io/MorphoSymm/

License: MIT License

Python 95.01% Jupyter Notebook 4.99%
legged-robotics robotics symmetries equivariant-control symmetric-robots dynamical-systems representation-learning equivariant-neural-networks group-theory invariant-learning

morphosymm's People

Contributors

danfoa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

morphosymm's Issues

PinBulletWrapper Attribute Missing

Hi,

When running the following example:

from morpho_symm.utils.robot_utils import load_symmetric_system

robot, G = load_symmetric_system(robot_name='mini_cheetah')
_, v_js = robot.get_joint_space_state()

rep_TqQ_js = G.representations["TqQ_js"]
for g in G.elements:
  g_v_js = rep_TqQ_js(g) @ v_js

I get this error:

image

[Bug] Unable to load robot symmetric representation.

Issue

With the provided permutation and reflection matrice in cfg yaml file, I try to build the representations of Q_js and TqQ_js by using load_symmetric_system,
but it always causes an error from the builtin function group_rep_from_gens as follows:


TypeError Traceback (most recent call last)
Cell In[27], line 1
----> 1 G, value_in_type, policy_in_type, value_out_type, policy_out_type = load_cartpole_G()

Cell In[26], line 31, in load_cartpole_G()
28 rep_po[g_gen] = gen_permutation_matrix(oneline_notation=perm, reflections=refx)
30 # Generate the entire group
---> 31 rep_Q_js = group_rep_from_gens(G, rep_Q_js)
32 rep_po = group_rep_from_gens(G, rep_po)
33 rep_Q_js.name = 'Q_js'

File ~/autodl-tmp/MorphoSymm/morpho_symm/utils/group_utils.py:96, in group_rep_from_gens(G, rep_H)
93 raise NotImplementedError(f"Group {G} not implemented yet.")
95 # Convert Dict[GroupElement, np.ndarray] to escnn Representation
---> 96 rep_escnn = escnn_representation_form_mapping(G, rep_H)
98 return rep_escnn

File ~/autodl-tmp/MorphoSymm/morpho_symm/groups/isotypic_decomposition.py:278, in escnn_representation_form_mapping(G, representation)
276 rep(G.sample()).shape[0] # Size of the representation
277 # Find Q such that iso_cplx(g) = Q @ rep(g) @ Q^-1 is block diagonal with blocks being complex irreps.
--> 278 cplx_irreps, Q = cplx_isotypic_decomposition(G, rep)
279 # Get the size and location of each cplx irrep in iso_cplx(g)
280 cplx_irreps_size = [irrep(G.sample()).shape[0] for irrep in cplx_irreps]

File ~/autodl-tmp/MorphoSymm/morpho_symm/groups/isotypic_decomposition.py:181, in cplx_isotypic_decomposition(G, representation)
179 # Check if each subrepresentation can be further decomposed.
180 for subrep in subreps:
--> 181 n_sub = subrep(G.sample()).shape[0] # Dimension of sub representation
182 is_irred, _ = is_complex_irreducible(G, subrep)
183 if is_irred:

TypeError: 'dict' object is not callable

Environment

Ubuntu 20.04
Python 3.8.10
Latest morpho_symm version

Typo in the README?

Hi,

In the installation section there is the command:

python morpho_symm.robot_symmetry_visualization.py robot=<robot> gui=True

I guess it should be:

python morpho_symm/robot_symmetry_visualization.py robot=<robot> gui=True

Loading Aliengo/Solo/Atlas robot not working

Hi,

When I try lo load the symmetries for the robot aliengo as follows:

robot, G = load_symmetric_system(robot_name='aliengo')

I get the following error (which does not happen only for mini_cheetah but it does for the others robots as well like atlas, solo and others):

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.