{"id":16680964,"url":"https://github.com/marcbone/libfranka-rs","last_synced_at":"2025-03-21T18:32:38.960Z","repository":{"id":42522822,"uuid":"364197247","full_name":"marcbone/libfranka-rs","owner":"marcbone","description":"Rust port of libfranka for controlling Franka Emika robots","archived":false,"fork":false,"pushed_at":"2023-10-30T10:32:12.000Z","size":542,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T03:51:21.033Z","etag":null,"topics":["franka-emika","franka-panda","robotics","robotics-control","robotics-programming","rust"],"latest_commit_sha":null,"homepage":"","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-04T08:59:39.000Z","updated_at":"2024-11-05T15:00:21.000Z","dependencies_parsed_at":"2024-10-28T11:29:11.834Z","dependency_job_id":"a2c22c60-62b9-4f9b-8f05-9b5c1b43b9d8","html_url":"https://github.com/marcbone/libfranka-rs","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":0.5882352941176471,"last_synced_commit":"e7841fbd7a17fcbcc52c9e1d59837360dd0a99b2"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Flibfranka-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Flibfranka-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Flibfranka-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbone%2Flibfranka-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcbone","download_url":"https://codeload.github.com/marcbone/libfranka-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244849009,"owners_count":20520625,"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":["franka-emika","franka-panda","robotics","robotics-control","robotics-programming","rust"],"created_at":"2024-10-12T13:44:32.316Z","updated_at":"2025-03-21T18:32:38.624Z","avatar_url":"https://github.com/marcbone.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/libfranka-rs.svg)](https://crates.io/crates/libfranka-rs)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/marcbone/libfranka-rs/Rust)\n[![crates.io](https://img.shields.io/crates/l/libfranka-rs.svg)](https://crates.io/crates/libfranka-rs)\n[![crates.io](https://img.shields.io/crates/d/libfranka-rs.svg)](https://crates.io/crates/libfranka-rs)\n[![docs.rs](https://docs.rs/libfranka-rs/badge.svg)](https://docs.rs/libfranka-rs)\n# libfranka-rs\nlibfranka-rs is an **unofficial** port of [libfranka](https://github.com/frankaemika/libfranka) written in Rust.\nThis library can interact with research versions of Franka Emika Robots.\nThe library aims to provide researchers the possibility to experiment with Rust within a real-time robotics\napplication.\n \n **ALWAYS HAVE THE USER STOP BUTTON AT HAND WHILE CONTROLLING\nTHE ROBOT!**\n\n## Features\n * Real-time control of the robot\n * A libfranka-like API\n * Usage with Preempt_RT or stock Linux kernel\n * Usage of the gripper\n * Usage of the robot model\n * Download the robot model for offline usage\n * Ports of the libfranka examples to help you to get started\n * The functionality of the [example_commons](https://github.com/frankaemika/libfranka/blob/master/examples/examples_common.cpp) is directly part of the library, so you do not have to copy these files to your project\n * Direct Conversions from [nalgebra](https://nalgebra.org/) (Eigen3 equivalent) types into libfranka control types (JointPositions, CartesianPose, ...)\n * Proper error handling with Result types\n \nTODO:\n * Usage of the Model for anything else but Linux x86_64\n \nNot supported:\n * Windows (macOS could maybe work, but I have not tested it)\n * Vacuum Grippers (we do not have those, so I cannot test them)\n\n## Example\nA small example for controlling joint positions. You can find more in the examples folder.\n  ```rust\nuse franka::{FrankaResult, JointPositions, MotionFinished, Robot, RobotState};\nuse std::f64::consts::PI;\nuse std::time::Duration;\nfn main() -\u003e FrankaResult\u003c()\u003e {\n    let mut robot = Robot::new(\"robotik-bs.de\", None, None)?;\n    robot.set_default_behavior()?;\n    println!(\"WARNING: This example will move the robot! Please make sure to have the user stop button at hand!\");\n    println!(\"Press Enter to continue...\");\n    std::io::stdin().read_line(\u0026mut String::new()).unwrap();\n\n    // Set additional parameters always before the control loop, NEVER in the control loop!\n    // Set collision behavior.\n    robot.set_collision_behavior(\n        [20.0, 20.0, 18.0, 18.0, 16.0, 14.0, 12.0],\n        [20.0, 20.0, 18.0, 18.0, 16.0, 14.0, 12.0],\n        [20.0, 20.0, 18.0, 18.0, 16.0, 14.0, 12.0],\n        [20.0, 20.0, 18.0, 18.0, 16.0, 14.0, 12.0],\n        [20.0, 20.0, 20.0, 25.0, 25.0, 25.0],\n        [20.0, 20.0, 20.0, 25.0, 25.0, 25.0],\n        [20.0, 20.0, 20.0, 25.0, 25.0, 25.0],\n        [20.0, 20.0, 20.0, 25.0, 25.0, 25.0],\n    )?;\n\n    let q_goal = [0., -PI / 4., 0., -3. * PI / 4., 0., PI / 2., PI / 4.];\n    robot.joint_motion(0.5, \u0026q_goal)?;\n    println!(\"Finished moving to initial joint configuration.\");\n    let mut initial_position = JointPositions::new([0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0]);\n    let mut time = 0.;\n    let callback = |state: \u0026RobotState, time_step: \u0026Duration| -\u003e JointPositions {\n        time += time_step.as_secs_f64();\n        if time == 0. {\n            initial_position.q = state.q_d;\n        }\n        let mut out = JointPositions::new(initial_position.q);\n        let delta_angle = PI / 8. * (1. - f64::cos(PI / 2.5 * time));\n        out.q[3] += delta_angle;\n        out.q[4] += delta_angle;\n        out.q[6] += delta_angle;\n        if time \u003e= 5.0 {\n            println!(\"Finished motion, shutting down example\");\n            return out.motion_finished();\n        }\n        out\n    };\n    robot.control_joint_positions(callback, None, None, None)\n}\n  ```\n\n## How to get started\nAs it is a straight port, you may find the\n[Franka Control Interface Documentation](https://frankaemika.github.io/docs/index.html) helpful.\n\n### With zero Rust knowledge\nIf this is your first time using Rust, I recommend reading the [Rust Book](https://doc.rust-lang.org/stable/book/).\n\nIf you have Rust installed and just want to play with the examples, you can also run:\n```bash\ncargo install libfranka-rs --examples --version 0.9.0\ngenerate_joint_position_motion \u003cip_of_your_robot\u003e\n```\n\nIf you are already familiar with the original libfranka examples. I suggest you take a look at the examples folder.\nThe examples that are named like an original libfranka example are ports that stay as close to the original as possible,\nhoping that it makes your introduction into the Rust world as smooth as possible.\n\n\n\n### With zero libfranka knowledge\nThe [Franka Control Interface Documentation](https://frankaemika.github.io/docs/index.html) also includes a setup guide.\nYou can skip the installation of libfranka as you will be using libfranka-rs.\nTake a look at the [Documentation](https://docs.rs/libfranka-rs) and the examples folder. You should run the\ncommunication_test example to verify that your setup is correct.\n\n### How to use libfranka-rs\nIf you want to use libfranka-rs in your project, you have to add\n```text\nlibfranka-rs = \"0.9.0\"\n```\nto your Cargo.toml file.\nlibfranka-rs version numbers are structured as MAJOR.MINOR.PATCH. The Major and Minor versions match the original libfranka\nversion numbers. That means for 0.8, your robot has to be at least on Firmware 4.0.0. Older firmware versions are not supported by\nlibfranka-rs. You can find more information about system updates [here](https://frankaemika.github.io).\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%2Flibfranka-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcbone%2Flibfranka-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbone%2Flibfranka-rs/lists"}