{"id":16680948,"url":"https://github.com/marcbone/cartesian_trajectories","last_synced_at":"2025-06-16T15:03:37.938Z","repository":{"id":57541447,"uuid":"364907321","full_name":"marcbone/cartesian_trajectories","owner":"marcbone","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-06T12:53:09.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T09:17:21.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcbone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-06T12:45:05.000Z","updated_at":"2023-11-20T14:13:37.000Z","dependencies_parsed_at":"2022-09-26T18:30:48.409Z","dependency_job_id":null,"html_url":"https://github.com/marcbone/cartesian_trajectories","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Fcartesian_trajectories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Fcartesian_trajectories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Fcartesian_trajectories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Fcartesian_trajectories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcbone","download_url":"https://codeload.github.com/marcbone/cartesian_trajectories/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238689974,"owners_count":19514133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T13:44:29.293Z","updated_at":"2025-02-13T16:33:33.805Z","avatar_url":"https://github.com/marcbone.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/cartesian_trajectories.svg)](https://crates.io/crates/cartesian_trajectories)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/marcbone/cartesian_trajectories/Rust)\n[![crates.io](https://img.shields.io/crates/l/cartesian_trajectories.svg)](https://crates.io/crates/cartesian_trajectories)\n[![crates.io](https://img.shields.io/crates/d/cartesian_trajectories.svg)](https://crates.io/crates/cartesian_trajectories)\n[![docs.rs](https://docs.rs/cartesian_trajectories/badge.svg)](https://docs.rs/cartesian_trajectories)\n# cartesian_trajectories\n\ncartesian_trajectories allows creating arbitrary cartesian trajectories and adding a velocity profile on top of it.\n\n\n\n## Example\n```rust\nuse cartesian_trajectories::generate_absolute_motion;\nuse cartesian_trajectories::s_curve::SCurveConstraints;\nuse cartesian_trajectories::CartesianTrajectory;\nuse cartesian_trajectories::VelocityProfile::SCurve;\nuse nalgebra::Isometry3;\nuse std::time::Duration;\n\nfn main() {\n    let start_pose = Isometry3::translation(2., 2., 0.);\n    let pose_generator = generate_absolute_motion(Isometry3::translation(1., 1., 0.));\n    let mut trajectory = CartesianTrajectory::new(\n        pose_generator,\n        SCurve {\n            start_pose,\n            constraints: SCurveConstraints {\n                max_jerk: 5.,\n                max_acceleration: 5.,\n                max_velocity: 5.,\n            },\n        },\n    );\n    for \u0026i in [0., 0.5, 1.0].iter() {\n        let time = trajectory.get_total_duration().mul_f64(i);\n        let output = trajectory.get_pose(\u0026start_pose, time);\n        println!(\"{:?}\", output);\n        assert!(f64::abs(output.pose.translation.x + i - 2.) \u003c 1e-7);\n        assert!(f64::abs(output.pose.translation.y + i - 2.) \u003c 1e-7);\n        if i \u003c 1. {\n            assert!(!output.finished);\n        } else {\n            assert!(output.finished);\n        }\n    }\n}\n```\n\nThis example will generate a trajectory that moves from (2,2,0) to (1,1,0) with an [SCurve](https://github.com/marcbone/s_curve#what-asfdis-an-s-curve) motion.\nThe trajectory can then be queried with `trajectory.get_pose()`, which takes the start pose and the current\ntime. The start pose is needed as the trajectory is not precalculated.\n\n\n## Features\nPredefined PoseGenerators for:\n* Relative motions\n* Absolute motions\n* Circle motions\n\nFurther, it is possible to define custom position and orientation generators\nand combine them to a pose generator. PoseGenerators can be combined by\nmultiplication, for example, to create a spiral movement from a circle and a relative motion.\nIt is also possible to concatenate multiple PoseGenerators.\n\n\nA cartesian trajectory can then be created either by applying a custom velocity profile or using one of the following\npredefined velocity profiles:\n* Linear\n* Cosine\n* SCurve\n\n## Licence\nThis library is copyrighted © 2021 Marco Boneberger\n\n\nLicensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission - subsequent versions of the EUPL (the \"Licence\");\n\nYou may not use this work except in compliance with the Licence.\nYou may obtain a copy of the Licence at:\n\n[https://joinup.ec.europa.eu/software/page/eupl](https://joinup.ec.europa.eu/software/page/eupl)\n\nUnless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an \"AS IS\" basis\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\nSee the Licence for the specific language governing permissions and limitations under the Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbone%2Fcartesian_trajectories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcbone%2Fcartesian_trajectories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbone%2Fcartesian_trajectories/lists"}