latest pushes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bellande_step"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
authors = ["Bellande Robotics Sensors Research Innovation Center"]
|
||||
description = "A tool for running Bellande Step calculations via API or local executable"
|
||||
@@ -12,12 +12,8 @@ categories = ["science", "algorithms"]
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.11", features = ["json"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
structopt = "0.3"
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
thiserror = "1.0"
|
||||
anyhow = "1.0"
|
||||
|
||||
[lib]
|
||||
name = "bellande_step"
|
||||
|
187
Package/rust/README.md
Normal file
187
Package/rust/README.md
Normal file
@@ -0,0 +1,187 @@
|
||||
# 📦 Bellande Step (Infinite Dimensions)
|
||||
|
||||

|
||||
|
||||
## Preprint
|
||||
- [](https://dapp.orvium.io/deposits/6650ccb8afb407dc8beb0ff2/view)
|
||||
|
||||
# Preprint Citation
|
||||
```
|
||||
Bellande, R. (2024). Efficient Step Function for Infinite Multi-Dimensional Node Calculation within Model-Integrated Dimensional Space [version 1] [preprint]. Mathematics.
|
||||
```
|
||||
|
||||
|
||||
## 🧙 Organization Website
|
||||
- [](https://robotics-sensors.github.io)
|
||||
|
||||
## 🧙 Organization Github
|
||||
- [](https://github.com/Robotics-Sensors)
|
||||
|
||||
# Author, Creator and Maintainer
|
||||
- **Ronaldson Bellande**
|
||||
|
||||
## Bellande Step Executables & Models
|
||||
- [](https://github.com/Artificial-Intelligence-Computer-Vision/bellande_step_models_executables)
|
||||
|
||||
# API HTTP Usability (BELLANDE FORMAT)
|
||||
```
|
||||
# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0 or later
|
||||
|
||||
url: https://bellande-robotics-sensors-research-innovation-center.org
|
||||
|
||||
endpoint_path:
|
||||
bellande_step: /api/Bellande_Step/bellande_step_nd
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
||||
```
|
||||
|
||||
# API HTTP Usability (JSON FORMAT)
|
||||
```
|
||||
{
|
||||
"license": [
|
||||
"Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation, either version 3 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <https://www.gnu.org/licenses/>.",
|
||||
"GNU General Public License v3.0 or later"
|
||||
],
|
||||
"url": "https://bellande-robotics-sensors-research-innovation-center.org",
|
||||
"endpoint_path": {
|
||||
"bellande_step": "/api/Bellande_Step/bellande_step_nd"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_web_api_opensource"
|
||||
}
|
||||
```
|
||||
|
||||
# API Payload Example
|
||||
```
|
||||
{
|
||||
"node0": [0, 0, 0],
|
||||
"node1": [100, 100, 100],
|
||||
"limit": 75,
|
||||
"dimensions": 3,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# 🧙 Website Bellande API Testing
|
||||
- [](https://bellanderoboticssensorsresearchinnovationcenterwebsite-kot42qxp.b4a.run/api/bellande_step_experiment)
|
||||
|
||||
# Quick Bellande API Testing
|
||||
```
|
||||
curl -X 'POST' \
|
||||
'https://bellande-robotics-sensors-research-innovation-center.org/api/Bellande_Step/bellande_step_nd' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"node0": [0, 0, 0],
|
||||
"node1": [100, 100, 100],
|
||||
"limit": 75,
|
||||
"dimensions": 3,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
# BS(Bellande Step) Algorithm API
|
||||
## Experiment 1 -- Limit = 1
|
||||
|
||||
|  *Figure 2D* |  *Figure 3D* |  *Figure 4D* |
|
||||
|:------------------------------------------------------------:|:------------------------------------------------------------:|:------------------------------------------------------------:|
|
||||
|  *Figure 5D* |  *Figure 6D* |  *Figure 7D* |
|
||||
|  *Figure 8D* |  *Figure 9D* |  *Figure 10D* |
|
||||
|
||||
|
||||
## Experiment 2 -- Limit = 25
|
||||
|
||||
|  *Figure 2D* |  *Figure 3D* |  *Figure 4D* |
|
||||
|:-------------------------------------------------------------:|:-------------------------------------------------------------:|:-------------------------------------------------------------:|
|
||||
|  *Figure 5D* |  *Figure 6D* |  *Figure 7D* |
|
||||
|  *Figure 8D* |  *Figure 9D* |  *Figure 10D* |
|
||||
|
||||
|
||||
## Experiment 3 -- Limit = 50
|
||||
|
||||
|  *Figure 2D* |  *Figure 3D* |  *Figure 4D* |
|
||||
|:-------------------------------------------------------------:|:-------------------------------------------------------------:|:-------------------------------------------------------------:|
|
||||
|  *Figure 5D* |  *Figure 6D* |  *Figure 7D* |
|
||||
|  *Figure 8D* |  *Figure 9D* |  *Figure 10D* |
|
||||
|
||||
|
||||
## Experiment 4 -- Limit = 75
|
||||
|
||||
|  *Figure 2D* |  *Figure 3D* |  *Figure 4D* |
|
||||
|:-------------------------------------------------------------:|:-------------------------------------------------------------:|:-------------------------------------------------------------:|
|
||||
|  *Figure 5D* |  *Figure 6D* |  *Figure 7D* |
|
||||
|  *Figure 8D* |  *Figure 9D* |  *Figure 10D* |
|
||||
|
||||
|
||||
## Experiment 5 -- Limit = 100
|
||||
|
||||
|  *Figure 2D* |  *Figure 3D* |  *Figure 4D* |
|
||||
|:--------------------------------------------------------------:|:--------------------------------------------------------------:|:--------------------------------------------------------------:|
|
||||
|  *Figure 5D* |  *Figure 6D* |  *Figure 7D* |
|
||||
|  *Figure 8D* |  *Figure 9D* |  *Figure 10D* |
|
||||
|
||||
# Bellande Step Usage
|
||||
|
||||
## Website Crates
|
||||
- https://crates.io/crates/bellande_step
|
||||
|
||||
### Installation
|
||||
- `cargo add bellande_step`
|
||||
|
||||
## Website PYPI
|
||||
- https://pypi.org/project/bellande_robot_step
|
||||
|
||||
### Installation
|
||||
- `$ pip install bellande_robot_step`
|
||||
|
||||
### Upgrade (if not upgraded)
|
||||
- `$ pip install --upgrade bellande_robot_step`
|
||||
|
||||
```
|
||||
Name: bellande_robot_step
|
||||
Summary: Computes the next step towards a target node
|
||||
Home-page: github.com/Robotics-Sensors/bellande_robot_step
|
||||
Author: Ronaldson Bellande
|
||||
Author-email: ronaldsonbellande@gmail.com
|
||||
License: GNU General Public License v3.0
|
||||
```
|
||||
|
||||
## Published Paper
|
||||
```
|
||||
Coming Soon
|
||||
```
|
||||
|
||||
## Preprint
|
||||
- [](https://dapp.orvium.io/deposits/6650ccb8afb407dc8beb0ff2/view)
|
||||
|
||||
|
||||
## License
|
||||
This Algorithm or Models is distributed under the [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/), see [LICENSE](https://github.com/RonaldsonBellande/bellande_step/blob/main/LICENSE) and [NOTICE](https://github.com/RonaldsonBellande/bellande_step/blob/main/LICENSE) for more information.
|
@@ -17,7 +17,7 @@ use reqwest;
|
||||
use serde_json::{json, Value};
|
||||
use std::error::Error;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{self, Command};
|
||||
use std::process::Command;
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
@@ -39,7 +39,7 @@ struct Opt {
|
||||
use_executable: bool,
|
||||
}
|
||||
|
||||
async fn make_bellande_step_request(
|
||||
pub async fn make_bellande_step_request(
|
||||
node0: Value,
|
||||
node1: Value,
|
||||
limit: i32,
|
||||
@@ -71,17 +71,15 @@ async fn make_bellande_step_request(
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
fn get_executable_path() -> PathBuf {
|
||||
pub fn get_executable_path() -> PathBuf {
|
||||
if cfg!(target_os = "windows") {
|
||||
Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("Bellande_Step.exe")
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("Bellande_Step.exe")
|
||||
} else {
|
||||
Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("Bellande_Step")
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("Bellande_Step")
|
||||
}
|
||||
}
|
||||
|
||||
fn run_bellande_step_executable(
|
||||
pub fn run_bellande_step_executable(
|
||||
node0: &str,
|
||||
node1: &str,
|
||||
limit: i32,
|
||||
@@ -119,43 +117,7 @@ fn run_bellande_step_executable(
|
||||
Err(format!(
|
||||
"Process failed: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
).into())
|
||||
)
|
||||
.into())
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn Error>> {
|
||||
let opt = Opt::from_args();
|
||||
|
||||
// Parse JSON strings to Values for validation
|
||||
let node0: Value = serde_json::from_str(&opt.node0)
|
||||
.map_err(|e| format!("Error parsing node0: {}", e))?;
|
||||
let node1: Value = serde_json::from_str(&opt.node1)
|
||||
.map_err(|e| format!("Error parsing node1: {}", e))?;
|
||||
|
||||
if opt.use_executable {
|
||||
// Run using local executable
|
||||
if let Err(e) = run_bellande_step_executable(
|
||||
&opt.node0,
|
||||
&opt.node1,
|
||||
opt.limit,
|
||||
opt.dimensions,
|
||||
) {
|
||||
eprintln!("Error: {}", e);
|
||||
process::exit(1);
|
||||
}
|
||||
} else {
|
||||
// Run using API
|
||||
match make_bellande_step_request(node0, node1, opt.limit, opt.dimensions).await {
|
||||
Ok(result) => {
|
||||
println!("{}", serde_json::to_string_pretty(&result)?);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Error: {}", e);
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@@ -167,13 +167,11 @@ curl -X 'POST' \
|
||||
|
||||
```
|
||||
Name: bellande_robot_step
|
||||
Version: 0.3.0
|
||||
Summary: Computes the next step towards a target node
|
||||
Home-page: github.com/RonaldsonBellande/bellande_robot_step
|
||||
Home-page: github.com/Robotics-Sensors/bellande_robot_step
|
||||
Author: Ronaldson Bellande
|
||||
Author-email: ronaldsonbellande@gmail.com
|
||||
License: GNU General Public License v3.0
|
||||
Required-by:
|
||||
```
|
||||
|
||||
## Published Paper
|
||||
|
@@ -1,21 +0,0 @@
|
||||
# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0 or later
|
||||
|
||||
url: https://bellande-robotics-sensors-research-innovation-center.org
|
||||
|
||||
endpoint_path:
|
||||
bellande_step: /api/Bellande_Step/bellande_step
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
@@ -1,21 +0,0 @@
|
||||
# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0 or later
|
||||
|
||||
url: tcp://bellande-robotics-sensors-research-innovation-center.org
|
||||
|
||||
endpoint_path:
|
||||
bellande_step: /api/Bellande_Step/bellande_step
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
@@ -1,21 +0,0 @@
|
||||
# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0 or later
|
||||
|
||||
url: tls://bellande-robotics-sensors-research-innovation-center.org
|
||||
|
||||
endpoint_path:
|
||||
bellande_step: /api/Bellande_Step/bellande_step
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"license": [
|
||||
"Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation, either version 3 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <https://www.gnu.org/licenses/>.",
|
||||
"GNU General Public License v3.0 or later"
|
||||
],
|
||||
"url": "https://bellande-robotics-sensors-research-innovation-center.org",
|
||||
"endpoint_path": {
|
||||
"bellande_step": "/api/Bellande_Step/bellande_step_nd"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_web_api_opensource"
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"license": [
|
||||
"Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation, either version 3 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <https://www.gnu.org/licenses/>.",
|
||||
"GNU General Public License v3.0 or later"
|
||||
],
|
||||
"url": "tcp://bellande-robotics-sensors-research-innovation-center.org",
|
||||
"endpoint_path": {
|
||||
"bellande_step": "/tcp/Bellande_Step/bellande_step_nd"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_tcp_api_opensource"
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"license": [
|
||||
"Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation, either version 3 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <https://www.gnu.org/licenses/>.",
|
||||
"GNU General Public License v3.0 or later"
|
||||
],
|
||||
"url": "tls://bellande-robotics-sensors-research-innovation-center.org",
|
||||
"endpoint_path": {
|
||||
"bellande_step": "/tls/Bellande_Step/bellande_step_nd"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_tls_api_opensource"
|
||||
}
|
Reference in New Issue
Block a user