-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e06989
commit 24b5bff
Showing
8 changed files
with
548 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.idea | ||
|
||
/src/tests/data/tmp/ | ||
/amb/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rs-opw-kinematics" | ||
version = "1.3.2" | ||
version = "1.4.0" | ||
edition = "2021" | ||
authors = ["Bourumir Wyngs <[email protected]>"] | ||
description = "Inverse and forward kinematics for 6 axis robots with a parallel base and spherical wrist." | ||
|
@@ -16,20 +16,20 @@ readme = "README.md" | |
maintenance = { status = "actively-developed" } | ||
|
||
[dependencies] | ||
nalgebra = "0.32.5" | ||
nalgebra = "0.32.6" | ||
|
||
# Others are only needed to read YAML or convert from URDF | ||
yaml-rust2 = { version = "0.8.1", optional = true } | ||
sxd-document = { version = "0.3", optional = true } | ||
regex = { version = "1.10.4", optional = true } | ||
regex = { version = "1.10.5", optional = true } | ||
clap = { version = "4.5.4", features = ["derive"], optional = true } | ||
|
||
[features] | ||
default = ["allow_filesystem"] | ||
allow_filesystem = ["yaml-rust2", "sxd-document", "regex", "clap"] | ||
|
||
# To disable filesystem: | ||
#rs-opw-kinematics = { version = "1.3.2", default-features = false } | ||
#rs-opw-kinematics = { version = "1.4.0", default-features = false } | ||
|
||
[dev-dependencies] | ||
rand = "0.8.5" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use rs_opw_kinematics::utils::{dump_joints, dump_solutions}; | ||
use std::sync::Arc; | ||
use nalgebra::Point3; | ||
use rs_opw_kinematics::frame::Frame; | ||
use rs_opw_kinematics::kinematic_traits::Kinematics; | ||
use rs_opw_kinematics::kinematics_impl::OPWKinematics; | ||
use rs_opw_kinematics::parameters::opw_kinematics::Parameters; | ||
|
||
fn main() { | ||
let robot = OPWKinematics::new(Parameters::irb2400_10()); | ||
// Shift not too much to have values close to previous | ||
let frame_transform = Frame::translation( | ||
Point3::new(0.0, 0.0, 0.0), | ||
Point3::new(0.011, 0.022, 0.033)); | ||
|
||
let framed = Frame { | ||
robot: Arc::new(robot), | ||
frame: frame_transform, | ||
}; | ||
let joints_no_frame: [f64; 6] = [0.0, 0.11, 0.22, 0.3, 0.1, 0.5]; // without frame | ||
|
||
println!("No frame transform:"); | ||
dump_joints(&joints_no_frame); | ||
|
||
println!("Possible joint values after the frame transform:"); | ||
let (solutions, _transformed_pose) = framed.forward_transformed( | ||
&joints_no_frame, &joints_no_frame); | ||
dump_solutions(&solutions); | ||
|
||
let framed = robot.forward(&solutions[0]).translation; | ||
let unframed = robot.forward(&joints_no_frame).translation; | ||
|
||
println!("Distance between framed and not framed pose {:.3} {:.3} {:.3}", | ||
framed.x - unframed.x, framed.y - unframed.y, framed.z - unframed.z); | ||
} |
Oops, something went wrong.