update
This commit is contained in:
parent
277c361af9
commit
d62ee2bbd6
1
Package/python/.gitignore
vendored
Normal file
1
Package/python/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
dist
|
4
Package/python/publish.sh
Executable file
4
Package/python/publish.sh
Executable file
@ -0,0 +1,4 @@
|
||||
cp ../../README.md ./
|
||||
python setup.py sdist
|
||||
twine upload dist/*
|
||||
rm -r ./README.md
|
40
Package/python/setup.py
Normal file
40
Package/python/setup.py
Normal file
@ -0,0 +1,40 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
with open("./README.md", "r", encoding="utf-8") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setup(
|
||||
name="bellande_motion_probability",
|
||||
version="0.1.0",
|
||||
description="The Bellande Motion Probability algorithm calculates particle movement probabilities using Bellande distributions for enhanced motion estimation",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
author="RonaldsonBellande",
|
||||
author_email="ronaldsonbellande@gmail.com",
|
||||
packages=find_packages(where="src"),
|
||||
package_dir={"": "src"},
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
"numpy",
|
||||
],
|
||||
classifiers=[
|
||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||
"Programming Language :: Python",
|
||||
],
|
||||
keywords=["package", "setuptools"],
|
||||
python_requires=">=3.0",
|
||||
extras_require={
|
||||
"dev": ["pytest", "pytest-cov[all]", "mypy", "black"],
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'bellande_motion_probability_api = bellande_motion_probability.bellande_motion_probability_api:main'
|
||||
],
|
||||
},
|
||||
project_urls={
|
||||
"Home": "https://github.com/Robotics-Sensors/bellande_motion_probability",
|
||||
"Homepage": "https://github.com/Robotics-Sensors/bellande_motion_probability",
|
||||
"documentation": "https://github.com/Robotics-Sensors/bellande_motion_probability",
|
||||
"repository": "https://github.com/Robotics-Sensors/bellande_motion_probability",
|
||||
},
|
||||
)
|
1
Package/python/src/.gitignore
vendored
Normal file
1
Package/python/src/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bellande_motion_probability.egg-info
|
0
Package/python/src/__init__.py
Normal file
0
Package/python/src/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
"""
|
||||
ros_extension
|
||||
"""
|
@ -0,0 +1,99 @@
|
||||
# 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/>.
|
||||
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
||||
def make_bellande_motion_probability_request(particle_state, previous_pose, current_pose,
|
||||
noise_params=None, search_radius=50, sample_points=20):
|
||||
url = "https://bellande-robotics-sensors-research-innovation-center.org/api/Bellande_Motion_Probability/bellande_motion_probability"
|
||||
|
||||
# Convert string inputs to lists if they're strings
|
||||
if isinstance(particle_state, str):
|
||||
particle_state = json.loads(particle_state)
|
||||
if isinstance(previous_pose, str):
|
||||
previous_pose = json.loads(previous_pose)
|
||||
if isinstance(current_pose, str):
|
||||
current_pose = json.loads(current_pose)
|
||||
if isinstance(noise_params, str):
|
||||
noise_params = json.loads(noise_params)
|
||||
|
||||
payload = {
|
||||
"particle_state": particle_state,
|
||||
"previous_pose": previous_pose,
|
||||
"current_pose": current_pose,
|
||||
"noise_params": noise_params or {
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
},
|
||||
"search_radius": search_radius,
|
||||
"sample_points": sample_points,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
}
|
||||
|
||||
headers = {
|
||||
'accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
try:
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
response.raise_for_status()
|
||||
return response.json()
|
||||
except requests.RequestException as e:
|
||||
print(f"Error making request: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Run Bellande Motion Probability API")
|
||||
parser.add_argument("--particle-state", required=True,
|
||||
help="Current particle state as JSON-formatted list [x, y, heading, weight]")
|
||||
parser.add_argument("--previous-pose", required=True,
|
||||
help="Previous pose as JSON-formatted list [x, y, heading]")
|
||||
parser.add_argument("--current-pose", required=True,
|
||||
help="Current pose as JSON-formatted list [x, y, heading]")
|
||||
parser.add_argument("--noise-params",
|
||||
help="Noise parameters as JSON object with trans_sigma, rot_sigma, and head_sigma")
|
||||
parser.add_argument("--search-radius", type=float, default=50.0,
|
||||
help="Search radius for motion probability calculation")
|
||||
parser.add_argument("--sample-points", type=int, default=20,
|
||||
help="Number of sample points for motion probability calculation")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
result = make_bellande_motion_probability_request(
|
||||
args.particle_state,
|
||||
args.previous_pose,
|
||||
args.current_pose,
|
||||
args.noise_params,
|
||||
args.search_radius,
|
||||
args.sample_points
|
||||
)
|
||||
|
||||
print(json.dumps(result, indent=2))
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"Error: Invalid JSON format in input parameters - {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
2
Package/rust/.gitignore
vendored
Normal file
2
Package/rust/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
target
|
||||
Cargo.lock
|
29
Package/rust/Cargo.toml
Normal file
29
Package/rust/Cargo.toml
Normal file
@ -0,0 +1,29 @@
|
||||
[package]
|
||||
name = "bellande_motion_probability"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Bellande Robotics Sensors Research Innovation Center"]
|
||||
description = "The Bellande Motion Probability algorithm calculates particle movement probabilities using Bellande distributions for enhanced robot motion estimation"
|
||||
license = "GPL-3.0-or-later"
|
||||
repository = "https://github.com/Robotics-Sensors/bellande_motion_probability"
|
||||
documentation = "https://bellande-robotics-sensors-research-innovation-center.org/api/bellande_motion_probability"
|
||||
homepage = "https://bellande-robotics-sensors-research-innovation-center.org"
|
||||
readme = "README.md"
|
||||
keywords = ["robotics", "motion-planning", "probability", "particle-filter", "state-estimation"]
|
||||
categories = ["science::robotics", "algorithms", "mathematics", "simulation"]
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.11", features = ["json", "rustls-tls"] }
|
||||
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"
|
||||
rand = "0.8"
|
||||
nalgebra = "0.32"
|
||||
num-traits = "0.2"
|
||||
|
||||
[lib]
|
||||
name = "bellande_motion_probability"
|
||||
path = "src/bellande_motion_probability.rs"
|
4
Package/rust/publish.sh
Executable file
4
Package/rust/publish.sh
Executable file
@ -0,0 +1,4 @@
|
||||
cp ../../README.md .
|
||||
bash ../../git_scripts/push.sh
|
||||
cargo publish
|
||||
rm -f README.md
|
236
Package/rust/src/bellande_motion_probability.rs
Normal file
236
Package/rust/src/bellande_motion_probability.rs
Normal file
@ -0,0 +1,236 @@
|
||||
// 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/>.
|
||||
|
||||
use reqwest;
|
||||
use serde_json::{json, Value};
|
||||
use std::error::Error;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{self, Command};
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
#[structopt(
|
||||
name = "bellande_motion_probability",
|
||||
about = "Bellande Motion Probability Tool"
|
||||
)]
|
||||
struct Opt {
|
||||
#[structopt(
|
||||
long,
|
||||
help = "Current particle state as JSON-formatted list [x, y, heading, weight]"
|
||||
)]
|
||||
particle_state: String,
|
||||
|
||||
#[structopt(long, help = "Previous pose as JSON-formatted list [x, y, heading]")]
|
||||
previous_pose: String,
|
||||
|
||||
#[structopt(long, help = "Current pose as JSON-formatted list [x, y, heading]")]
|
||||
current_pose: String,
|
||||
|
||||
#[structopt(
|
||||
long,
|
||||
help = "Noise parameters as JSON object with trans_sigma, rot_sigma, and head_sigma"
|
||||
)]
|
||||
noise_params: Option<String>,
|
||||
|
||||
#[structopt(
|
||||
long,
|
||||
default_value = "50.0",
|
||||
help = "Search radius for motion probability calculation"
|
||||
)]
|
||||
search_radius: f64,
|
||||
|
||||
#[structopt(
|
||||
long,
|
||||
default_value = "20",
|
||||
help = "Number of sample points for motion probability calculation"
|
||||
)]
|
||||
sample_points: i32,
|
||||
|
||||
#[structopt(long, help = "Use local executable instead of API")]
|
||||
use_executable: bool,
|
||||
}
|
||||
|
||||
async fn make_bellande_motion_probability_request(
|
||||
particle_state: Value,
|
||||
previous_pose: Value,
|
||||
current_pose: Value,
|
||||
noise_params: Option<Value>,
|
||||
search_radius: f64,
|
||||
sample_points: i32,
|
||||
) -> Result<Value, Box<dyn Error>> {
|
||||
let client = reqwest::Client::new();
|
||||
let url = "https://bellande-robotics-sensors-research-innovation-center.org/api/Bellande_Motion_Probability/bellande_motion_probability";
|
||||
|
||||
let payload = json!({
|
||||
"particle_state": particle_state,
|
||||
"previous_pose": previous_pose,
|
||||
"current_pose": current_pose,
|
||||
"noise_params": noise_params.unwrap_or(json!({
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
})),
|
||||
"search_radius": search_radius,
|
||||
"sample_points": sample_points,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
});
|
||||
|
||||
let response = client
|
||||
.post(url)
|
||||
.header("accept", "application/json")
|
||||
.header("Content-Type", "application/json")
|
||||
.json(&payload)
|
||||
.send()
|
||||
.await?
|
||||
.json::<Value>()
|
||||
.await?;
|
||||
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
fn get_executable_path() -> PathBuf {
|
||||
if cfg!(target_os = "windows") {
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("Bellande_Motion_Probability.exe")
|
||||
} else {
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("Bellande_Motion_Probability")
|
||||
}
|
||||
}
|
||||
|
||||
fn run_bellande_motion_probability_executable(
|
||||
particle_state: &str,
|
||||
previous_pose: &str,
|
||||
current_pose: &str,
|
||||
noise_params: Option<&str>,
|
||||
search_radius: f64,
|
||||
sample_points: i32,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
let executable_path = get_executable_path();
|
||||
let passcode = "bellande_motion_probability_executable_access_key";
|
||||
|
||||
// Parse and validate inputs
|
||||
let particle_state_val: Value = serde_json::from_str(particle_state)?;
|
||||
let previous_pose_val: Value = serde_json::from_str(previous_pose)?;
|
||||
let current_pose_val: Value = serde_json::from_str(current_pose)?;
|
||||
let noise_params_val: Value = noise_params
|
||||
.map(|n| serde_json::from_str(n))
|
||||
.transpose()?
|
||||
.unwrap_or(json!({
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
}));
|
||||
|
||||
// Validate particle state dimensions
|
||||
let particle_state_arr = particle_state_val
|
||||
.as_array()
|
||||
.ok_or("Invalid particle state format")?;
|
||||
if particle_state_arr.len() != 4 {
|
||||
return Err("Particle state must have 4 components [x, y, heading, weight]".into());
|
||||
}
|
||||
|
||||
// Validate pose dimensions
|
||||
for (name, pose) in [
|
||||
("Previous pose", &previous_pose_val),
|
||||
("Current pose", ¤t_pose_val),
|
||||
] {
|
||||
if let Some(arr) = pose.as_array() {
|
||||
if arr.len() != 3 {
|
||||
return Err(format!("{} must have 3 components [x, y, heading]", name).into());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare and run command
|
||||
let mut command = Command::new(executable_path);
|
||||
command.args(&[
|
||||
passcode,
|
||||
particle_state,
|
||||
previous_pose,
|
||||
current_pose,
|
||||
&serde_json::to_string(&noise_params_val)?,
|
||||
&search_radius.to_string(),
|
||||
&sample_points.to_string(),
|
||||
]);
|
||||
|
||||
let output = command.output()?;
|
||||
|
||||
if output.status.success() {
|
||||
println!("{}", String::from_utf8_lossy(&output.stdout));
|
||||
Ok(())
|
||||
} else {
|
||||
Err(format!(
|
||||
"Process failed: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
)
|
||||
.into())
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn Error>> {
|
||||
let opt = Opt::from_args();
|
||||
|
||||
// Parse JSON strings to Values for validation
|
||||
let particle_state: Value = serde_json::from_str(&opt.particle_state)
|
||||
.map_err(|e| format!("Error parsing particle state: {}", e))?;
|
||||
let previous_pose: Value = serde_json::from_str(&opt.previous_pose)
|
||||
.map_err(|e| format!("Error parsing previous pose: {}", e))?;
|
||||
let current_pose: Value = serde_json::from_str(&opt.current_pose)
|
||||
.map_err(|e| format!("Error parsing current pose: {}", e))?;
|
||||
let noise_params_ref = opt.noise_params.as_ref();
|
||||
let noise_params: Option<Value> = noise_params_ref
|
||||
.map(|n| serde_json::from_str(n))
|
||||
.transpose()
|
||||
.map_err(|e| format!("Error parsing noise parameters: {}", e))?;
|
||||
|
||||
if opt.use_executable {
|
||||
// Run using local executable
|
||||
if let Err(e) = run_bellande_motion_probability_executable(
|
||||
&opt.particle_state,
|
||||
&opt.previous_pose,
|
||||
&opt.current_pose,
|
||||
noise_params_ref.map(String::as_str),
|
||||
opt.search_radius,
|
||||
opt.sample_points,
|
||||
) {
|
||||
eprintln!("Error: {}", e);
|
||||
process::exit(1);
|
||||
}
|
||||
} else {
|
||||
// Run using API
|
||||
match make_bellande_motion_probability_request(
|
||||
particle_state,
|
||||
previous_pose,
|
||||
current_pose,
|
||||
noise_params,
|
||||
opt.search_radius,
|
||||
opt.sample_points,
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(result) => {
|
||||
println!("{}", serde_json::to_string_pretty(&result)?);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Error: {}", e);
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
166
README.md
166
README.md
@ -1,31 +1,145 @@
|
||||
# 📦 Bellande Motion Probabilistic
|
||||
## Multi-Dimensional/Infinity-Dimensional Motion Probabilistic
|
||||
## BMP(Bellande Motion Probabilistic) Algorithm API
|
||||
# 📦 Bellande Motion Probability
|
||||
|
||||
# Check Out Research Organization for open-source/semi-open-source API
|
||||
- https://robotics-sensors.github.io
|
||||
- Check out website for more information avaliable open-source API
|
||||
## 🧙 Organization Website
|
||||
- [![Organization Website](https://img.shields.io/badge/Explore%20Our-Website-0099cc?style=for-the-badge)](https://robotics-sensors.github.io)
|
||||
|
||||
# API in api_docs
|
||||
- Temporarily Enabled
|
||||
- 2D Space
|
||||
- 3D Space
|
||||
- 4D Space
|
||||
- 5D Space
|
||||
- 6D Space
|
||||
- 7D Space
|
||||
- 8D Space
|
||||
- 9D Space
|
||||
- 10D Space
|
||||
- 11D Space
|
||||
- 12D Space
|
||||
- 13D Space
|
||||
- 14D Space
|
||||
- 15D Space
|
||||
- .....
|
||||
- Infinity-Dimention Space
|
||||
## 🧙 Organization Github
|
||||
- [![Organization Github ](https://img.shields.io/badge/Explore%20Our-Github-0099cc?style=for-the-badge)](https://github.com/Robotics-Sensors)
|
||||
|
||||
# Author, Creator and Maintainer
|
||||
- **Ronaldson Bellande**
|
||||
|
||||
# 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_motion_probability: /api/Bellande_Motion_Probability/bellande_motion_probability
|
||||
|
||||
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_motion_probability": "/api/Bellande_Motion_Probability/bellande_motion_probability"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_web_api_opensource"
|
||||
}
|
||||
```
|
||||
|
||||
# API Payload Example
|
||||
```
|
||||
{
|
||||
"particle_state": [0, 0, 0, 1.0],
|
||||
"previous_pose": [0, 0, 0],
|
||||
"current_pose": [100, 100, 90],
|
||||
"noise_params": {
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
},
|
||||
"search_radius": 50,
|
||||
"sample_points": 20,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
```
|
||||
|
||||
# 🧙 Website Bellande API Testing
|
||||
- [![Website API Testing](https://img.shields.io/badge/Bellande%20API-Testing-0099cc?style=for-the-badge)](https://bellande-robotics-sensors-research-innovation-center.org/api/bellande_motion_probability_experiment)
|
||||
|
||||
# Quick Bellande API Testing
|
||||
```
|
||||
curl -X 'POST' \
|
||||
'https://bellande-robotics-sensors-research-innovation-center.org/api/Bellande_Motion_Probability/bellande_motion_probability' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"particle_state": [0, 0, 0, 1.0],
|
||||
"previous_pose": [0, 0, 0],
|
||||
"current_pose": [100, 100, 90],
|
||||
"noise_params": {
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
},
|
||||
"search_radius": 50,
|
||||
"sample_points": 20,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
# Bellande Motion_Probability Usage
|
||||
|
||||
## Website Crates
|
||||
- https://crates.io/crates/bellande_motion_probability
|
||||
|
||||
### Installation
|
||||
- `cargo add bellande_motion_probability`
|
||||
|
||||
## Website PYPI
|
||||
- https://pypi.org/project/bellande_motion_probability
|
||||
|
||||
### Installation
|
||||
- `$ pip install bellande_motion_probability`
|
||||
|
||||
### Usage
|
||||
```
|
||||
bellande_motion_probability \
|
||||
--particle-state "[1.0, 2.0, 0.5, 1.0]" \
|
||||
--previous-pose "[0.0, 0.0, 0.0]" \
|
||||
--current-pose "[1.0, 1.0, 0.5]" \
|
||||
--noise-params '{"trans_sigma": 0.1, "rot_sigma": 0.1, "head_sigma": 0.1}'
|
||||
```
|
||||
|
||||
### Upgrade (if not upgraded)
|
||||
- `$ pip install --upgrade bellande_motion_probability`
|
||||
|
||||
```
|
||||
Name: bellande_motion_probability
|
||||
Summary: The Bellande Motion Probability algorithm calculates particle movement probabilities using Bellande distributions for enhanced robot motion estimation
|
||||
Home-page: github.com/Robotics-Sensors/bellande_motion_probability
|
||||
Author: Ronaldson Bellande
|
||||
Author-email: ronaldsonbellande@gmail.com
|
||||
License: GNU General Public License v3.0
|
||||
```
|
||||
|
||||
# Can also checkout portion of the docs at [Portion API DOCS](https://github.com/Robotics-Sensors/bellande_motion_probabilistic/blob/main/api_docs.md)
|
||||
|
||||
## 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_motion_probabilistic/blob/main/LICENSE) and [NOTICE](https://github.com/RonaldsonBellande/bellande_motion_probabilistic/blob/main/LICENSE) for more information.
|
||||
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.
|
||||
|
21
configs/bellande/http_configs.bellande
Normal file
21
configs/bellande/http_configs.bellande
Normal file
@ -0,0 +1,21 @@
|
||||
# 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_motion_probability: /api/Bellande_Motion_Probability/bellande_motion_probability
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
21
configs/bellande/tcp_configs.bellande
Normal file
21
configs/bellande/tcp_configs.bellande
Normal file
@ -0,0 +1,21 @@
|
||||
# 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_motion_probability: /api/Bellande_Motion_Probability/bellande_motion_probability
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
21
configs/bellande/tls_configs.bellande
Normal file
21
configs/bellande/tls_configs.bellande
Normal file
@ -0,0 +1,21 @@
|
||||
# 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_motion_probability: /api/Bellande_Motion_Probability/bellande_motion_probability
|
||||
|
||||
Bellande_Framework_Access_Key: bellande_web_api_opensource
|
23
configs/json/http_configs.json
Normal file
23
configs/json/http_configs.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"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_motion_probability": "/api/Bellande_Motion_Probability/bellande_motion_probability"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_web_api_opensource"
|
||||
}
|
23
configs/json/tcp_configs.json
Normal file
23
configs/json/tcp_configs.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"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_motion_probability": "/tcp/Bellande_Motion_Probability/bellande_motion_probability"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_tcp_api_opensource"
|
||||
}
|
23
configs/json/tls_configs.json
Normal file
23
configs/json/tls_configs.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"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_motion_probability": "/tls/Bellande_Motion_Probability/bellande_motion_probability"
|
||||
},
|
||||
"Bellande_Framework_Access_Key": "bellande_tls_api_opensource"
|
||||
}
|
3
git_scripts/.gitignore
vendored
Normal file
3
git_scripts/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
fix_errors.sh
|
||||
push.sh
|
||||
repository_recal.sh
|
20
run_api.bellos
Executable file
20
run_api.bellos
Executable file
@ -0,0 +1,20 @@
|
||||
curl -X 'POST' \
|
||||
'https://bellande-robotics-sensors-research-innovation-center.org/api/Bellande_Motion_Probability/bellande_motion_probability' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"particle_state": [0, 0, 0, 1.0],
|
||||
"previous_pose": [0, 0, 0],
|
||||
"current_pose": [100, 100, 90],
|
||||
"noise_params": {
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
},
|
||||
"search_radius": 50,
|
||||
"sample_points": 20,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
}'
|
||||
echo ""
|
20
run_api.sh
Executable file
20
run_api.sh
Executable file
@ -0,0 +1,20 @@
|
||||
curl -X 'POST' \
|
||||
'https://bellande-robotics-sensors-research-innovation-center.org/api/Bellande_Motion_Probability/bellande_motion_probability' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"particle_state": [0, 0, 0, 1.0],
|
||||
"previous_pose": [0, 0, 0],
|
||||
"current_pose": [100, 100, 90],
|
||||
"noise_params": {
|
||||
"trans_sigma": 0.1,
|
||||
"rot_sigma": 0.1,
|
||||
"head_sigma": 0.1
|
||||
},
|
||||
"search_radius": 50,
|
||||
"sample_points": 20,
|
||||
"auth": {
|
||||
"authorization_key": "bellande_web_api_opensource"
|
||||
}
|
||||
}'
|
||||
echo ""
|
Loading…
Reference in New Issue
Block a user