repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
ChenQian0618/TFN
https://github.com/ChenQian0618/TFN/blob/bb8af32c380fa047631b960e6a08ed0b261f1874/Models/__init__.py
Models/__init__.py
from Models.BackboneCNN import CNN as Backbone_CNN from Models.TFN import TFN_STTF, TFN_Chirplet, TFN_Morlet, Random_CNN
python
MIT
bb8af32c380fa047631b960e6a08ed0b261f1874
2026-01-05T07:14:43.861108Z
false
kpdemetriou/fuuid
https://github.com/kpdemetriou/fuuid/blob/caa236449b45eb14fe1a1d3499d3dfedb307c2a3/fuuid/__init__.py
fuuid/__init__.py
import os import uuid from base64 import b64encode from time import time, time_ns from base58 import b58encode __all__ = ["raw_fuuid", "raw_fuuid_ns", "b58_fuuid", "b58_fuuid_ns", "b64_fuuid", "b64_fuuid_ns", "fuuid", "fuuid_ns"] def raw_fuuid(): ts = int(time() - 16 * 10 ** 8) return ts.to_bytes(4, "big") ...
python
BSD-3-Clause
caa236449b45eb14fe1a1d3499d3dfedb307c2a3
2026-01-05T07:14:45.385867Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/setup.py
setup.py
# # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/setup.py
third_party/unitree_legged_sdk/pybind11/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Setup script for PyPI; use CMakeFile.txt to build extension modules import contextlib import os import re import shutil import string import subprocess import sys import tempfile import setuptools.command.sdist DIR = os.path.abspath(os.path.dirname(__file__)) VERSION_...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tools/libsize.py
third_party/unitree_legged_sdk/pybind11/tools/libsize.py
# -*- coding: utf-8 -*- from __future__ import print_function, division import os import sys # Internal build script for generating debugging test .so size. # Usage: # python libsize.py file.so save.txt -- displays the size of file.so and, if save.txt exists, compares it to the # ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_smart_ptr.py
third_party/unitree_legged_sdk/pybind11/tests/test_smart_ptr.py
# -*- coding: utf-8 -*- import pytest m = pytest.importorskip("pybind11_tests.smart_ptr") from pybind11_tests import ConstructorStats # noqa: E402 def test_smart_ptr(capture): # Object1 for i, o in enumerate([m.make_object_1(), m.make_object_2(), m.MyObject1(3)], start=1): assert o.getRefCount() == ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_custom_type_casters.py
third_party/unitree_legged_sdk/pybind11/tests/test_custom_type_casters.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import custom_type_casters as m def test_noconvert_args(msg): a = m.ArgInspector() assert msg(a.f("hi")) == """ loading ArgInspector1 argument WITH conversion allowed. Argument value = hi """ assert msg(a.g("this is a", "this is b")) =...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_builtin_casters.py
third_party/unitree_legged_sdk/pybind11/tests/test_builtin_casters.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import builtin_casters as m from pybind11_tests import UserType, IncType def test_simple_string(): assert m.string_roundtrip("const char *") == "const char *" def test_unicode_conversion(): """Tests unicode conversion and e...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_local_bindings.py
third_party/unitree_legged_sdk/pybind11/tests/test_local_bindings.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import local_bindings as m def test_load_external(): """Load a `py::module_local` type that's only registered in an external module""" import pybind11_cross_module_tests as cm assert m.load_external1(cm.ExternalType1(11)...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_docstring_options.py
third_party/unitree_legged_sdk/pybind11/tests/test_docstring_options.py
# -*- coding: utf-8 -*- from pybind11_tests import docstring_options as m def test_docstring_options(): # options.disable_function_signatures() assert not m.test_function1.__doc__ assert m.test_function2.__doc__ == "A custom docstring" # docstring specified on just the first overload definition: ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_buffers.py
third_party/unitree_legged_sdk/pybind11/tests/test_buffers.py
# -*- coding: utf-8 -*- import io import struct import ctypes import pytest import env # noqa: F401 from pybind11_tests import buffers as m from pybind11_tests import ConstructorStats np = pytest.importorskip("numpy") def test_from_python(): with pytest.raises(RuntimeError) as excinfo: m.Matrix(np.ar...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_numpy_array.py
third_party/unitree_legged_sdk/pybind11/tests/test_numpy_array.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import numpy_array as m np = pytest.importorskip("numpy") def test_dtypes(): # See issue #1328. # - Platform-dependent sizes. for size_check in m.get_platform_dtype_size_checks(): print(size_check) assert...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_operator_overloading.py
third_party/unitree_legged_sdk/pybind11/tests/test_operator_overloading.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import operators as m from pybind11_tests import ConstructorStats def test_operator_overloading(): v1 = m.Vector2(1, 2) v2 = m.Vector(3, -1) v3 = m.Vector2(1, 2) # Same value as v1, but different instance. assert v1 is not v3 assert str(v...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_methods_and_attributes.py
third_party/unitree_legged_sdk/pybind11/tests/test_methods_and_attributes.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import methods_and_attributes as m from pybind11_tests import ConstructorStats def test_methods_and_attributes(): instance1 = m.ExampleMandA() instance2 = m.ExampleMandA(32) instance1.add1(instance2) instance1.add2(i...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_eigen.py
third_party/unitree_legged_sdk/pybind11/tests/test_eigen.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import ConstructorStats np = pytest.importorskip("numpy") m = pytest.importorskip("pybind11_tests.eigen") ref = np.array([[ 0., 3, 0, 0, 0, 11], [22, 0, 0, 0, 17, 11], [ 7, 5, 0, 1, 0, 11], [ 0, 0, ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_eval_call.py
third_party/unitree_legged_sdk/pybind11/tests/test_eval_call.py
# -*- coding: utf-8 -*- # This file is called from 'test_eval.py' if 'call_test2' in locals(): call_test2(y) # noqa: F821 undefined name
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_numpy_dtypes.py
third_party/unitree_legged_sdk/pybind11/tests/test_numpy_dtypes.py
# -*- coding: utf-8 -*- import re import pytest import env # noqa: F401 from pybind11_tests import numpy_dtypes as m np = pytest.importorskip("numpy") @pytest.fixture(scope='module') def simple_dtype(): ld = np.dtype('longdouble') return np.dtype({'names': ['bool_', 'uint_', 'float_', 'ldbl_'], ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_chrono.py
third_party/unitree_legged_sdk/pybind11/tests/test_chrono.py
# -*- coding: utf-8 -*- from pybind11_tests import chrono as m import datetime import pytest import env # noqa: F401 def test_chrono_system_clock(): # Get the time from both c++ and datetime date0 = datetime.datetime.today() date1 = m.test_chrono1() date2 = datetime.datetime.today() # The retu...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_tagbased_polymorphic.py
third_party/unitree_legged_sdk/pybind11/tests/test_tagbased_polymorphic.py
# -*- coding: utf-8 -*- from pybind11_tests import tagbased_polymorphic as m def test_downcast(): zoo = m.create_zoo() assert [type(animal) for animal in zoo] == [ m.Labrador, m.Dog, m.Chihuahua, m.Cat, m.Panther ] assert [animal.name for animal in zoo] == [ "Fido", "Ginger", "Hertzl",...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_copy_move.py
third_party/unitree_legged_sdk/pybind11/tests/test_copy_move.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import copy_move_policies as m def test_lacking_copy_ctor(): with pytest.raises(RuntimeError) as excinfo: m.lacking_copy_ctor.get_one() assert "is non-copyable!" in str(excinfo.value) def test_lacking_move_ctor(): with pytest.raises(Runti...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_opaque_types.py
third_party/unitree_legged_sdk/pybind11/tests/test_opaque_types.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import opaque_types as m from pybind11_tests import ConstructorStats, UserType def test_string_list(): lst = m.StringList() lst.push_back("Element 1") lst.push_back("Element 2") assert m.print_opaque_list(lst) == "Opaque list: [Element 1, Eleme...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_factory_constructors.py
third_party/unitree_legged_sdk/pybind11/tests/test_factory_constructors.py
# -*- coding: utf-8 -*- import pytest import re import env # noqa: F401 from pybind11_tests import factory_constructors as m from pybind11_tests.factory_constructors import tag from pybind11_tests import ConstructorStats def test_init_factory_basic(): """Tests py::init_factory() wrapper around various ways of ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_eval.py
third_party/unitree_legged_sdk/pybind11/tests/test_eval.py
# -*- coding: utf-8 -*- import os import pytest import env # noqa: F401 from pybind11_tests import eval_ as m def test_evals(capture): with capture: assert m.test_eval_statements() assert capture == "Hello World!" assert m.test_eval() assert m.test_eval_single_statement() assert m.te...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_class.py
third_party/unitree_legged_sdk/pybind11/tests/test_class.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import class_ as m from pybind11_tests import UserType, ConstructorStats def test_repr(): # In Python 3.3+, repr() accesses __qualname__ assert "pybind11_type" in repr(type(UserType)) assert "UserType" in repr(UserType) ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_pickling.py
third_party/unitree_legged_sdk/pybind11/tests/test_pickling.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import pickling as m try: import cPickle as pickle # Use cPickle on Python 2.7 except ImportError: import pickle @pytest.mark.parametrize("cls_name", ["Pickleable", "PickleableNew"]) def test_roundtrip(cls_name): cls = ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_kwargs_and_defaults.py
third_party/unitree_legged_sdk/pybind11/tests/test_kwargs_and_defaults.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import kwargs_and_defaults as m def test_function_signatures(doc): assert doc(m.kw_func0) == "kw_func0(arg0: int, arg1: int) -> str" assert doc(m.kw_func1) == "kw_func1(x: int, y: int) -> str" assert doc(m.kw_func2) == "k...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/conftest.py
third_party/unitree_legged_sdk/pybind11/tests/conftest.py
# -*- coding: utf-8 -*- """pytest configuration Extends output capture as needed by pybind11: ignore constructors, optional unordered lines. Adds docstring and exceptions message sanitizers: ignore Python 2 vs 3 differences. """ import contextlib import difflib import gc import re import textwrap import pytest impo...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_union.py
third_party/unitree_legged_sdk/pybind11/tests/test_union.py
# -*- coding: utf-8 -*- from pybind11_tests import union_ as m def test_union(): instance = m.TestUnion() instance.as_uint = 10 assert instance.as_int == 10
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_call_policies.py
third_party/unitree_legged_sdk/pybind11/tests/test_call_policies.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import call_policies as m from pybind11_tests import ConstructorStats @pytest.mark.xfail("env.PYPY", reason="sometimes comes out 1 off on PyPy", strict=False) def test_keep_alive_argument(capture): n_inst = ConstructorStats.detai...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_modules.py
third_party/unitree_legged_sdk/pybind11/tests/test_modules.py
# -*- coding: utf-8 -*- from pybind11_tests import modules as m from pybind11_tests.modules import subsubmodule as ms from pybind11_tests import ConstructorStats def test_nested_modules(): import pybind11_tests assert pybind11_tests.__name__ == "pybind11_tests" assert pybind11_tests.modules.__name__ == "p...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_callbacks.py
third_party/unitree_legged_sdk/pybind11/tests/test_callbacks.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import callbacks as m from threading import Thread def test_callbacks(): from functools import partial def func1(): return "func1" def func2(a, b, c, d): return "func2", a, b, c, d def func3(a): return "func3({})".for...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_stl.py
third_party/unitree_legged_sdk/pybind11/tests/test_stl.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import stl as m from pybind11_tests import UserType from pybind11_tests import ConstructorStats def test_vector(doc): """std::vector <-> list""" lst = m.cast_vector() assert lst == [1] lst.append(2) assert m.load_vector(lst) assert m.l...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_multiple_inheritance.py
third_party/unitree_legged_sdk/pybind11/tests/test_multiple_inheritance.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import multiple_inheritance as m def test_multiple_inheritance_cpp(): mt = m.MIType(3, 4) assert mt.foo() == 3 assert mt.bar() == 4 @pytest.mark.skipif("env.PYPY and env.PY2"...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_iostream.py
third_party/unitree_legged_sdk/pybind11/tests/test_iostream.py
# -*- coding: utf-8 -*- from pybind11_tests import iostream as m import sys from contextlib import contextmanager try: # Python 3 from io import StringIO except ImportError: # Python 2 try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: #...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_exceptions.py
third_party/unitree_legged_sdk/pybind11/tests/test_exceptions.py
# -*- coding: utf-8 -*- import sys import pytest from pybind11_tests import exceptions as m import pybind11_cross_module_tests as cm def test_std_exception(msg): with pytest.raises(RuntimeError) as excinfo: m.throw_std_exception() assert msg(excinfo.value) == "This exception was intentionally thrown...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_sequences_and_iterators.py
third_party/unitree_legged_sdk/pybind11/tests/test_sequences_and_iterators.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import sequences_and_iterators as m from pybind11_tests import ConstructorStats def isclose(a, b, rel_tol=1e-05, abs_tol=0.0): """Like math.isclose() from Python 3.5""" return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol) def allclose(a_l...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_pytypes.py
third_party/unitree_legged_sdk/pybind11/tests/test_pytypes.py
# -*- coding: utf-8 -*- from __future__ import division import pytest import sys import env # noqa: F401 from pybind11_tests import pytypes as m from pybind11_tests import debug_enabled def test_int(doc): assert doc(m.get_int) == "get_int() -> int" def test_iterator(doc): assert doc(m.get_iterator) == "g...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_enum.py
third_party/unitree_legged_sdk/pybind11/tests/test_enum.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import enums as m def test_unscoped_enum(): assert str(m.UnscopedEnum.EOne) == "UnscopedEnum.EOne" assert str(m.UnscopedEnum.ETwo) == "UnscopedEnum.ETwo" assert str(m.EOne) == "UnscopedEnum.EOne" assert repr(m.UnscopedEnum.EOne) == "<UnscopedEn...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_numpy_vectorize.py
third_party/unitree_legged_sdk/pybind11/tests/test_numpy_vectorize.py
# -*- coding: utf-8 -*- import pytest from pybind11_tests import numpy_vectorize as m np = pytest.importorskip("numpy") def test_vectorize(capture): assert np.isclose(m.vectorized_func3(np.array(3 + 7j)), [6 + 14j]) for f in [m.vectorized_func, m.vectorized_func2]: with capture: assert n...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_virtual_functions.py
third_party/unitree_legged_sdk/pybind11/tests/test_virtual_functions.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 m = pytest.importorskip("pybind11_tests.virtual_functions") from pybind11_tests import ConstructorStats # noqa: E402 def test_override(capture, msg): class ExtendedExampleVirt(m.ExampleVirt): def __init__(self, state): super(Ext...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_async.py
third_party/unitree_legged_sdk/pybind11/tests/test_async.py
# -*- coding: utf-8 -*- import pytest asyncio = pytest.importorskip("asyncio") m = pytest.importorskip("pybind11_tests.async_module") @pytest.fixture def event_loop(): loop = asyncio.new_event_loop() yield loop loop.close() async def get_await_result(x): return await x def test_await(event_loop):...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_gil_scoped.py
third_party/unitree_legged_sdk/pybind11/tests/test_gil_scoped.py
# -*- coding: utf-8 -*- import multiprocessing import threading from pybind11_tests import gil_scoped as m def _run_in_process(target, *args, **kwargs): """Runs target in process and returns its exitcode after 10s (None if still alive).""" process = multiprocessing.Process(target=target, args=args, kwargs=kw...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_constants_and_functions.py
third_party/unitree_legged_sdk/pybind11/tests/test_constants_and_functions.py
# -*- coding: utf-8 -*- import pytest m = pytest.importorskip("pybind11_tests.constants_and_functions") def test_constants(): assert m.some_constant == 14 def test_function_overloading(): assert m.test_function() == "test_function()" assert m.test_function(7) == "test_function(7)" assert m.test_fun...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_stl_binders.py
third_party/unitree_legged_sdk/pybind11/tests/test_stl_binders.py
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import stl_binders as m def test_vector_int(): v_int = m.VectorInt([0, 0]) assert len(v_int) == 2 assert bool(v_int) is True # test construction from a generator v_int1 = m.VectorInt(x for x in range(5)) asse...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/env.py
third_party/unitree_legged_sdk/pybind11/tests/env.py
# -*- coding: utf-8 -*- import platform import sys LINUX = sys.platform.startswith("linux") MACOS = sys.platform.startswith("darwin") WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin") CPYTHON = platform.python_implementation() == "CPython" PYPY = platform.python_implementation() == "PyPy" P...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/extra_setuptools/test_setuphelper.py
third_party/unitree_legged_sdk/pybind11/tests/extra_setuptools/test_setuphelper.py
# -*- coding: utf-8 -*- import os import sys import subprocess from textwrap import dedent import pytest DIR = os.path.abspath(os.path.dirname(__file__)) MAIN_DIR = os.path.dirname(os.path.dirname(DIR)) @pytest.mark.parametrize("parallel", [False, True]) @pytest.mark.parametrize("std", [11, 0]) def test_simple_setu...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_cmake_build/test.py
third_party/unitree_legged_sdk/pybind11/tests/test_cmake_build/test.py
# -*- coding: utf-8 -*- import sys import test_cmake_build assert test_cmake_build.add(1, 2) == 3 print("{} imports, runs, and adds: 1 + 2 = 3".format(sys.argv[1]))
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/extra_python_package/test_files.py
third_party/unitree_legged_sdk/pybind11/tests/extra_python_package/test_files.py
# -*- coding: utf-8 -*- import contextlib import os import string import subprocess import sys import tarfile import zipfile # These tests must be run explicitly # They require CMake 3.15+ (--install) DIR = os.path.abspath(os.path.dirname(__file__)) MAIN_DIR = os.path.dirname(os.path.dirname(DIR)) main_headers = { ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/tests/test_embed/test_interpreter.py
third_party/unitree_legged_sdk/pybind11/tests/test_embed/test_interpreter.py
# -*- coding: utf-8 -*- from widget_module import Widget class DerivedWidget(Widget): def __init__(self, message): super(DerivedWidget, self).__init__(message) def the_answer(self): return 42
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/pybind11/setup_helpers.py
third_party/unitree_legged_sdk/pybind11/pybind11/setup_helpers.py
# -*- coding: utf-8 -*- """ This module provides helpers for C++11+ projects using pybind11. LICENSE: Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/pybind11/commands.py
third_party/unitree_legged_sdk/pybind11/pybind11/commands.py
# -*- coding: utf-8 -*- import os DIR = os.path.abspath(os.path.dirname(__file__)) def get_include(user=False): installed_path = os.path.join(DIR, "include") source_path = os.path.join(os.path.dirname(DIR), "include") return installed_path if os.path.exists(installed_path) else source_path def get_cma...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/pybind11/_version.py
third_party/unitree_legged_sdk/pybind11/pybind11/_version.py
# -*- coding: utf-8 -*- def _to_int(s): try: return int(s) except ValueError: return s __version__ = "2.6.0rc1" version_info = tuple(_to_int(s) for s in __version__.split("."))
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/pybind11/__main__.py
third_party/unitree_legged_sdk/pybind11/pybind11/__main__.py
# -*- coding: utf-8 -*- from __future__ import print_function import argparse import sys import sysconfig from .commands import get_include, get_cmake_dir def print_includes(): dirs = [ sysconfig.get_path("include"), sysconfig.get_path("platinclude"), get_include(), ] # Make uni...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/pybind11/__init__.py
third_party/unitree_legged_sdk/pybind11/pybind11/__init__.py
# -*- coding: utf-8 -*- from ._version import version_info, __version__ from .commands import get_include, get_cmake_dir __all__ = ( "version_info", "__version__", "get_include", "get_cmake_dir", )
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/docs/benchmark.py
third_party/unitree_legged_sdk/pybind11/docs/benchmark.py
# -*- coding: utf-8 -*- import random import os import time import datetime as dt nfns = 4 # Functions per class nargs = 4 # Arguments per function def generate_dummy_code_pybind11(nclasses=10): decl = "" bindings = "" for cl in range(nclasses): decl += "class cl%03i;\n" % cl decl += '\n' ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/third_party/unitree_legged_sdk/pybind11/docs/conf.py
third_party/unitree_legged_sdk/pybind11/docs/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pybind11 documentation build configuration file, created by # sphinx-quickstart on Sun Oct 11 19:23:48 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/a1_sim.py
mpc_controller/a1_sim.py
import re import numpy as np URDF_NAME = "a1/a1.urdf" START_POS = [0, 0, 0.32] MPC_BODY_MASS = 108 / 9.8 MPC_BODY_INERTIA = np.array( (0.017, 0, 0, 0, 0.057, 0, 0, 0, 0.064)) * 0.1#* 2 MPC_BODY_HEIGHT = 0.24 MPC_VELOCITY_MULTIPLIER = 0.5 ACTION_REPEAT = 5 _IDENTITY_ORIENTATION=[0,0,0,1] HIP_NAME_PATTERN ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/laikago_sim.py
mpc_controller/laikago_sim.py
import re import numpy as np URDF_NAME = "laikago/laikago_toes_zup.urdf" START_POS = [0, 0, 0.48] MPC_BODY_MASS = 215/9.8 MPC_BODY_INERTIA = (0.07335, 0, 0, 0, 0.25068, 0, 0, 0, 0.25447) MPC_BODY_HEIGHT = 0.42 MPC_VELOCITY_MULTIPLIER = 1.0 ACTION_REPEAT = 10 _IDENTITY_ORIENTATION=[0,0,0,1] CHASSIS_NAME_PATTERN = ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/openloop_gait_generator.py
mpc_controller/openloop_gait_generator.py
"""Gait pattern planning module.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = o...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/torque_stance_leg_controller.py
mpc_controller/torque_stance_leg_controller.py
# Lint as: python3 """A torque based stance controller framework.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspec...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/raibert_swing_leg_controller.py
mpc_controller/raibert_swing_leg_controller.py
"""The swing leg controller class.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir =...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/locomotion_controller_example.py
mpc_controller/locomotion_controller_example.py
from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) os.sys.pa...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/spirit40_sim.py
mpc_controller/spirit40_sim.py
import re import numpy as np URDF_NAME = "quadruped/spirit40newer.urdf" START_POS = [0, 0, 0.43] MPC_BODY_MASS = 12 MPC_BODY_INERTIA = (0.07335, 0, 0, 0, 0.25068, 0, 0, 0, 0.25447) MPC_BODY_HEIGHT = 0.32 time_step = 0.001 ACTION_REPEAT = 10 MPC_VELOCITY_MULTIPLIER = 0.7 _IDENTITY_ORIENTATION=[0,0,0,1] HIP_NAME_PATTE...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/static_gait_controller.py
mpc_controller/static_gait_controller.py
# Lint as: python3 """A static gait controller for a quadruped robot. Experimental code.""" import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) os.sys.path.insert(0, parentdir) import numpy as np from mpc_controller i...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/locomotion_controller.py
mpc_controller/locomotion_controller.py
"""A model based controller framework.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentd...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/model_predictive_control.py
mpc_controller/model_predictive_control.py
# Lint as: python3 """Classic model predictive control methods.""" from __future__ import absolute_import from __future__ import division from __future__ import google_type_annotations from __future__ import print_function import math from typing import Sequence import numpy as np _MAX_ABS_RPY = 0.3 _MAX_ABS_ANGULAR...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/__init__.py
mpc_controller/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/torque_stance_leg_controller_quadprog.py
mpc_controller/torque_stance_leg_controller_quadprog.py
# Lint as: python3 """A torque based stance controller framework.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from typing import Any, Sequence, Tuple import numpy as np # import time from mpc_controller import gait_generator as gait_generator_lib f...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/foot_stepper.py
mpc_controller/foot_stepper.py
# Lint as: python3 """A state machine that steps each foot for a static gait. Experimental code.""" import copy import math import numpy as np class StepInput(object): def __init__(self): self.base_com_pos = np.array([0, 0, 0]) self.base_com_orn = np.array([0, 0, 0, 1]) self.toe_pos_world = np.array(...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/gait_generator.py
mpc_controller/gait_generator.py
"""Gait pattern planning module.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import abc import enum class LegState(enum.Enum): """The state of a leg during locomotion.""" SWING = 0 STANCE = 1 ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/leg_controller.py
mpc_controller/leg_controller.py
"""The leg controller class interface.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import abc from typing import Any class LegController(object): # pytype: disable=ignored-metaclass """Generates th...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/com_velocity_estimator.py
mpc_controller/com_velocity_estimator.py
"""State estimator.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import numpy as np from typing import Any, Sequence import collections _DEFAULT_WINDOW_SIZE = 20 class MovingWindowFilter(object): "...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/mpc_controller/qp_torque_optimizer.py
mpc_controller/qp_torque_optimizer.py
"""Set up the zeroth-order QP problem for stance leg control. For details, please refer to section XX of this paper: https://arxiv.org/abs/2009.10019 """ import numpy as np # import numba import quadprog # pytype:disable=import-error np.set_printoptions(precision=3, suppress=True) ACC_WEIGHT = np.array([1., 1., 1.,...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/retarget_motion/retarget_config_vision60.py
retarget_motion/retarget_config_vision60.py
import numpy as np from motion_imitation.utilities import pose3d from pybullet_utils import transformations URDF_FILENAME = "quadruped/vision60.urdf" REF_POS_SCALE = 1 INIT_POS = np.array([0, 0, 0]) INIT_ROT = np.array([0, 0, 0, 1.0]) SIM_TOE_JOINT_IDS = [ 3, # left hand 7, # left foot 11, # right hand ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/retarget_motion/retarget_config_a1.py
retarget_motion/retarget_config_a1.py
import numpy as np URDF_FILENAME = "a1/a1.urdf" REF_POS_SCALE = 0.825 INIT_POS = np.array([0, 0, 0.32]) INIT_ROT = np.array([0, 0, 0, 1.0]) SIM_TOE_JOINT_IDS = [ 5, # right hand 15, # right foot 10, # left hand 20, # left foot ] SIM_HIP_JOINT_IDS = [1, 11, 6, 16] SIM_ROOT_OFFSET = np.array([0, 0,...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/retarget_motion/retarget_config_laikago.py
retarget_motion/retarget_config_laikago.py
import numpy as np from motion_imitation.utilities import pose3d from pybullet_utils import transformations URDF_FILENAME = "laikago/laikago_toes.urdf" REF_POS_SCALE = 1 INIT_POS = np.array([0, 0, 0]) INIT_ROT = transformations.quaternion_from_euler(ai=np.pi / 2.0, aj=0, ak=np.pi / 2.0, axes="sxyz") SIM_TOE_JOINT_I...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/retarget_motion/retarget_motion.py
retarget_motion/retarget_motion.py
"""Run from motion_imitation/retarget_motion to find data correctly.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirn...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/safe_outdoor/resetters.py
safe_outdoor/resetters.py
"""For resetting the robot to a ready pose.""" import inspect import os currentdir = os.path.dirname( os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) os.sys.path.insert(0, parentdir) from motion_imitation.envs.env_wrappers import reset_task from motion_imitation....
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/safe_outdoor/learning/yielding_sac_agent.py
safe_outdoor/learning/yielding_sac_agent.py
"""SAC agent that yields after every environment episode.""" import collections import numpy as np import os import tensorflow as tf import time import sac_dev.learning.sac_agent as sac_agent import sac_dev.util.logger as logger import sac_dev.util.mpi_util as mpi_util import sac_dev.util.replay_buffer as replay_buff...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/run.py
motion_imitation/run.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/__init__.py
motion_imitation/__init__.py
"""Set up gym interface for locomotion environments.""" import gym from gym.envs.registration import registry, make, spec def register(env_id, *args, **kvargs): if env_id in registry.env_specs: return else: return gym.envs.registration.register(env_id, *args, **kvargs) register( env_id='A1GymEnv-v1',...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/run_sac.py
motion_imitation/run_sac.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_builder.py
motion_imitation/envs/env_builder.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/locomotion_gym_env.py
motion_imitation/envs/locomotion_gym_env.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/__init__.py
motion_imitation/envs/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/locomotion_gym_config.py
motion_imitation/envs/locomotion_gym_config.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/simple_forward_task.py
motion_imitation/envs/env_wrappers/simple_forward_task.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/survival_task.py
motion_imitation/envs/env_wrappers/survival_task.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/reset_task.py
motion_imitation/envs/env_wrappers/reset_task.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/observation_dictionary_to_array_wrapper.py
motion_imitation/envs/env_wrappers/observation_dictionary_to_array_wrapper.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/default_task.py
motion_imitation/envs/env_wrappers/default_task.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/boundary_terminal_conditions.py
motion_imitation/envs/env_wrappers/boundary_terminal_conditions.py
"""Ends episode if robot is outside workspace bounds.""" class BoundaryTerminalCondition(object): """Ends episode if robot is outside workspace bounds.""" def __init__(self, x_space_m=5, y_space_m=5): """Constructor. :param x_space_m: Length of workspace in meters. :param y_space_m: Width of workspa...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/imitation_task.py
motion_imitation/envs/env_wrappers/imitation_task.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
true
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/logging_wrapper.py
motion_imitation/envs/env_wrappers/logging_wrapper.py
"""Env wrapper that saves logs.""" import atexit import os import numpy as np from phasespace import phasespace_robot_tracker class LoggingWrapper(object): """Env wrapper that saves logs.""" def __init__(self, env, output_dir, mocap_grpc_server=None, ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/__init__.py
motion_imitation/envs/env_wrappers/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/trajectory_generator_wrapper_env.py
motion_imitation/envs/env_wrappers/trajectory_generator_wrapper_env.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/imitation_wrapper_env.py
motion_imitation/envs/env_wrappers/imitation_wrapper_env.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/simple_openloop.py
motion_imitation/envs/env_wrappers/simple_openloop.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/env_wrappers/imitation_terminal_conditions.py
motion_imitation/envs/env_wrappers/imitation_terminal_conditions.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/gym_envs/a1_gym_env.py
motion_imitation/envs/gym_envs/a1_gym_env.py
"""Wrapper to make the a1 environment suitable for OpenAI gym.""" import gym from motion_imitation.envs import env_builder from motion_imitation.robots import a1 from motion_imitation.robots import robot_config class A1GymEnv(gym.Env): """A1 environment that supports the gym interface.""" metadata = {'render.mod...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false