spatialmath-python package
This commit is contained in:
parent
45d58611d1
commit
a5ba3dc77c
3 changed files with 117 additions and 5 deletions
18
flake.nix
18
flake.nix
|
@ -38,7 +38,9 @@
|
|||
unified-planning = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/unified-planning { };
|
||||
blenderproc = pkgs.python3Packages.callPackage ./blenderproc.nix { };
|
||||
webdataset = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/webdataset { };
|
||||
ansitable = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/ansitable { };
|
||||
megapose6d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/megapose6d { webdataset = webdataset; };
|
||||
spatialmath = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/spatialmath { ansitable = ansitable; };
|
||||
slic3r = pkgs.callPackage ./pkgs/misc/slic3r { };
|
||||
in
|
||||
{
|
||||
|
@ -90,18 +92,24 @@
|
|||
image-transport
|
||||
cv-bridge
|
||||
example-interfaces
|
||||
]) ++ (with pkgs; [ nlohmann_json glog lua5_3_compat ]) ++ [ megapose6d ];
|
||||
]) ++ (with pkgs; [ nlohmann_json glog lua5_3_compat ]);
|
||||
RMW_IMPLEMENTATION = "rmw_fastrtps_dynamic_cpp";
|
||||
};
|
||||
|
||||
devShells.all = pkgs.mkShell {
|
||||
packages = [ mayo blender bpy pysdf fstl darknet slic3r ];
|
||||
};
|
||||
devShells.bpy = pkgs.mkShell { packages = [ bpy pysdf pkgs.freecad blender ]; };
|
||||
devShells.up =
|
||||
devShells.rbs-framework =
|
||||
let
|
||||
my-python-packages = p: with p; [ unified-planning ];
|
||||
in
|
||||
my-python-packages = p: with p; [
|
||||
bpy
|
||||
pysdf
|
||||
unified-planning
|
||||
pybullet
|
||||
scipy
|
||||
spatialmath
|
||||
];
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = [ (pkgs.python3.withPackages my-python-packages) ];
|
||||
};
|
||||
|
|
33
pkgs/development/python-modules/ansitable/default.nix
Normal file
33
pkgs/development/python-modules/ansitable/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, colored
|
||||
, numpy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ansitable";
|
||||
version = "0.9.7";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "petercorke";
|
||||
repo = "ansitable";
|
||||
rev = version;
|
||||
hash = "sha256-LRSdnHLcmQfwSpxnd3JjaLzpECWWnzi8aWLanu9qRUI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
colored
|
||||
numpy
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "ansitable" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Quick, easy and pretty display of tabular data or matrices, with optional ANSI color and borders";
|
||||
homepage = "https://github.com/petercorke/ansitable";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
71
pkgs/development/python-modules/spatialmath/default.nix
Normal file
71
pkgs/development/python-modules/spatialmath/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, ansitable
|
||||
, matplotlib
|
||||
, numpy
|
||||
, scipy
|
||||
, typing-extensions
|
||||
, coverage
|
||||
, flake8
|
||||
, pytest
|
||||
, pytest-timeout
|
||||
, pytest-xvfb
|
||||
, sympy
|
||||
, sphinx
|
||||
, sphinx-autodoc-typehints
|
||||
, sphinx-rtd-theme
|
||||
, sphinxcontrib-jsmath
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "spatialmath";
|
||||
version = "unstable-2023-06-07";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "petercorke";
|
||||
repo = "spatialmath-python";
|
||||
rev = "0a7761dcd563e91eb55e75d8f0b2a93198762315";
|
||||
hash = "sha256-kawe9yHX7T+Bvy7BfuKbotEjlnpynQAooBsynGJSfjo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ansitable
|
||||
matplotlib
|
||||
numpy
|
||||
scipy
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
dev = [
|
||||
coverage
|
||||
flake8
|
||||
pytest
|
||||
pytest-timeout
|
||||
pytest-xvfb
|
||||
sympy
|
||||
];
|
||||
docs = [
|
||||
sphinx
|
||||
sphinx-autodoc-typehints
|
||||
sphinx-rtd-theme
|
||||
sphinxcontrib-jsmath
|
||||
];
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "spatialmath" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Create, manipulate and convert representations of position and orientation in 2D or 3D using Python";
|
||||
homepage = "https://github.com/petercorke/spatialmath-python";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue