代码拉取完成,页面将自动刷新
# Copyright (c) Facebook, Inc. and its affiliates.
######################################################################
# \file setup.py
# \author Franziska Meier
#######################################################################
"""Installation for the differentiable-robot-model project."""
import pathlib
import os
import subprocess
from setuptools import setup
REQUIRES_PYTHON = ">=3.6.0"
# current directory
HERE = pathlib.Path(__file__).parent
# description
README = (HERE / "README.md").read_text()
DESC = (
"A pytorch library that implements differentiable and learnable robot models, "
"which allows users to learn parameters of analytical robot models, "
"and/or propagate gradients through analytical robot computations such as forward kinematics."
)
# resolve version
VERSION = 'vmap V0.1'
# 查看最近的标签
# latest_tag = (
# subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"])
# .decode("utf-8")
# .strip("\n")
# )
# version_num = latest_tag.strip("v")
# # 查看当前分支
# branch_name = (
# subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"])
# .decode("utf-8")
# .strip("\n")
# )
# branch_hash = abs(hash(branch_name)) % (10**4)
# # 查看在最近的版本后,经过了几次commit,如果有commit,则命名版本为dev版本
# rev_num = (
# subprocess.check_output(["git", "rev-list", f"{latest_tag}..HEAD", "--count"])
# .decode("utf-8")
# .strip("\n")
# )
# VERSION = version_num
# if int(rev_num) > 0:
# VERSION = f"{version_num}a{rev_num}.dev{branch_hash}"
# resource files
data_files = []
datadir = "diff_robot_data"
hh = str(HERE) + "/" + datadir
print("folder with datafiles: %s", hh)
for root, dirs, files in os.walk(hh):
for fn in files:
ext = os.path.splitext(fn)[1][1:]
if (
ext
and ext
in "yaml png gif jpg urdf sdf obj txt mtl dae off stl STL xml ".split()
):
fn = root + "/" + fn
data_files.append(fn[1 + len(hh) :])
print("found resource files: %i" % len(data_files))
for n in data_files:
print("-- %s" % n)
# dependencies
install_requires = [
"torch >= 1.6",
"pyquaternion >= 0.9.9",
"hydra-core >= 1.0.3",
"urdf_parser_py >= 0.0.3",
"Sphinx >= 3.5.4",
"recommonmark >= 0.7.1",
]
# run setup
setup(
name="differentiable-robot-model",
version=VERSION,
description=DESC,
long_description=README,
long_description_content_type="text/markdown",
author="Franziska Meier",
author_email="fmeier@fb.com",
python_requires=REQUIRES_PYTHON,
url="https://github.com/facebookresearch/differentiable-robot-model",
keywords="robotics, differentiable, optimization",
packages=["differentiable_robot_model", "diff_robot_data"],
install_requires=install_requires,
license="MIT",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
],
package_data={"diff_robot_data": data_files},
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。