{"id":13599925,"url":"https://github.com/openrr/urdf-viz","last_synced_at":"2025-05-14T13:07:14.016Z","repository":{"id":38253610,"uuid":"100389791","full_name":"openrr/urdf-viz","owner":"openrr","description":"visualize URDF/XACRO file, URDF Viewer works on Windows/MacOS/Linux","archived":false,"fork":false,"pushed_at":"2025-04-23T10:03:30.000Z","size":22363,"stargazers_count":485,"open_issues_count":10,"forks_count":59,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-23T11:22:17.533Z","etag":null,"topics":["assimp","inverse-kinematics","robotics","ros","rust","rust-lang","urdf","visualization","xacro"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openrr.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,"zenodo":null}},"created_at":"2017-08-15T15:11:04.000Z","updated_at":"2025-04-20T10:03:41.000Z","dependencies_parsed_at":"2024-04-25T06:30:25.991Z","dependency_job_id":"c47a3e13-e0cd-48f3-9be7-a48d40e4b133","html_url":"https://github.com/openrr/urdf-viz","commit_stats":{"total_commits":431,"total_committers":10,"mean_commits":43.1,"dds":0.5498839907192575,"last_synced_commit":"35b04bcc12f9c26132a1fd8a18dcd8e2d8001c36"},"previous_names":["otl/urdf-viz"],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Furdf-viz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Furdf-viz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Furdf-viz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Furdf-viz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openrr","download_url":"https://codeload.github.com/openrr/urdf-viz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149958,"owners_count":22022851,"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":["assimp","inverse-kinematics","robotics","ros","rust","rust-lang","urdf","visualization","xacro"],"created_at":"2024-08-01T17:01:19.032Z","updated_at":"2025-05-14T13:07:09.006Z","avatar_url":"https://github.com/openrr.png","language":"Rust","funding_links":[],"categories":["Rust","URDF","Robot Operating System"],"sub_categories":["Tools"],"readme":"# urdf-viz\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/openrr/urdf-viz/ci.yml?branch=main\u0026logo=github)](https://github.com/openrr/urdf-viz/actions) [![crates.io](https://img.shields.io/crates/v/urdf-viz.svg?logo=rust)](https://crates.io/crates/urdf-viz) [![docs](https://docs.rs/urdf-viz/badge.svg)](https://docs.rs/urdf-viz) [![discord](https://dcbadge.vercel.app/api/server/8DAFFKc88B?style=flat)](https://discord.gg/8DAFFKc88B)\n\nVisualize [URDF(Unified Robot Description Format)](http://wiki.ros.org/urdf) file.\n`urdf-viz` is written in Rust-lang.\n\n## Install\n\n### Install with `cargo`\n\nIf you are using rust-lang already and `cargo` is installed, you can install by `cargo install`.\n\n```bash\ncargo install urdf-viz\n```\n\nIf you want to use mesh other than `.obj`, `.stl`, and `.dae` files, you need to install\nwith assimp like below.\n\n```bash\ncargo install urdf-viz --features assimp\n```\n\n### Pre-requirements for build\n\n#### Common\n\nIf you want to use `--features assimp` to use mesh other than `.obj`, `.stl`, and `.dae` files, you need [cmake](https://cmake.org/download/).\n\n#### On Linux\n\nIf you have not installed ROS, you may need `cmake`, `xorg-dev`, `glu` to\ncompile `assimp-sys` and `glfw-sys`.\n\n```bash\nsudo apt-get install cmake xorg-dev libglu1-mesa-dev\n```\n\n### Download binary\n\nYou can download prebuilt binaries from the [release page](https://github.com/openrr/urdf-viz/releases).\nPrebuilt binaries are available for macOS, Linux, and Windows (static executable).\n\n### Install via Homebrew\n\nYou can install urdf-viz using [Homebrew tap on macOS and Linux](https://github.com/openrr/homebrew-tap/blob/main/Formula/urdf-viz.rb):\n\n```sh\nbrew install openrr/tap/urdf-viz\n```\n\n## How to use\n\n`urdf-viz` command will be installed.\nIt needs `rosrun` and `rospack` to resolve `package://` in `\u003cmesh\u003e` tag, and\nit uses `xacro` to convert `.xacro` file into urdf file.\nIt means you need `$ source ~/catkin_ws/devel/setup.bash` or something before using `urdf-viz`.\n\n```bash\nurdf-viz URDF_FILE.urdf\n```\n\nIt is possible to use xacro file directly.\nIt will be converted by `rosrun xacro xacro` inside of `urdf-viz`.\n\n```bash\nurdf-viz XACRO_FILE.urdf.xacro\n```\n\nIf your xacro file has some arguments, you can pass them by `--xacro-args` option.\n\n```bash\nurdf-viz XACRO_FILE.urdf.xacro --xacro-args arg1=value arg2=value\n```\n\nFor other options, please read the output of `-h` option.\n\n```bash\nurdf-viz -h\n```\n\nIf there are no \"package://\" in mesh tag, and don't use xacro you can skip install of ROS.\n\nIf there are \"package://\" in mesh tag, but path or URL to package is known and\ndon't use xacro you can also skip install of ROS [by replacing package with path\nor URL](https://github.com/openrr/urdf-viz/pull/176).\n\n## GUI Usage\n\nIn the GUI, you can do some operations with keyboard and mouse.\n\n* `l` key to reload the urdf from file\n* `c` key to toggle collision model or visual mode\n* Move a joint\n  * set the angle of a joint by `Up`/`Down` key\n  * `Ctrl` + Drag to move the angle of a joint\n  * change the joint to be moved by `o` (`[`) and `p` (`]`)\n* Inverse kinematics (only positions)\n  * `Shift` + Drag to use inverse kinematics(Y and Z axis)\n  * `Shift` + `Ctrl` + Drag to use inverse kinematics(X and Z axis)\n  * change the move target for inverse kinematics by `,` or `.`\n* `r` key to set random joints\n* `z` key to reset joint positions and origin\n* Move view point\n  * Mouse Right Drag to translate view camera position\n  * Mouse Left Drag to look around\n  * Scroll to zoom in/out\n\n## Web I/O interface\n\nYou can set/get the joint angles using http/JSON.\nDefault port number is 7777. You can change it by `-p` option.\n(`jq` is used for JSON formatter in the following examples)\n\n### Set joint angles\n\nPOST the JSON data, which format is like below. You have to specify the names of joints and positions (angles).\nThe length of `names` and `positions` have to be the same. You don't need write\nall joint names, it means you can specify a part of the joints.\n\n```json\n{\n  \"names\": [\"joint_name1\", \"joint_name2\"],\n  \"positions\": [0.5, -0.1]\n}\n```\n\nYou can try it using `curl`.\n\n```bash\n$ curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '{\"names\": [\"r_shoulder_yaw\", \"r_shoulder_pitch\"], \"positions\": [0.8, -0.8]}' http://127.0.0.1:7777/set_joint_positions | jq\n{\n  \"is_ok\": true,\n  \"reason\": \"\"\n}\n```\n\n### Get joint angles as JSON\n\nThe result JSON format of getting the joint angles is the same as the *Set* method.\n\n```bash\n$ curl http://127.0.0.1:7777/get_joint_positions | jq\n{\n  \"names\": [\n    \"r_shoulder_yaw\",\n    \"r_shoulder_pitch\",\n    \"r_shoulder_roll\",\n    \"r_elbow_pitch\",\n    \"r_wrist_yaw\",\n    \"r_wrist_pitch\",\n    \"l_shoulder_yaw\",\n    \"l_shoulder_pitch\",\n    \"l_shoulder_roll\",\n    \"l_elbow_pitch\",\n    \"l_wrist_yaw\",\n    \"l_wrist_pitch\"\n  ],\n  \"positions\": [\n    0.8,\n    -0.8,\n    -1.3447506,\n    -1.6683152,\n    -1.786362,\n    -1.0689334,\n    0.11638665,\n    -0.5987091,\n    0.7868867,\n    -0.027412653,\n    0.019940138,\n    -0.6975361\n  ]\n}\n```\n\n### Set Robot Origin\n\n```bash\n$ curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '{\"position\":[0.2,0.0,0.0],\"quaternion\":[0.0,0.0,0.0,1.0]}' http://127.0.0.1:7777/set_robot_origin\n{\"is_ok\":true,\"reason\":\"\"}\n```\n\nThe order of the quaternion elements is `w, i, j, k`.\n\n### Get Robot Origin\n\n```bash\n$ curl http://127.0.0.1:7777/get_robot_origin\n{\"position\":[0.2,0.0,0.0],\"quaternion\":[1.0,0.0,0.0,0.0]}\n```\n\n### Get URDF Text\n\n```bash\ncurl http://127.0.0.1:7777/get_urdf_text\n```\n\n## Gallery\n\n![sawyer_1.png](img/sawyer_1.png)\n![sawyer_2.png](img/sawyer_2.png)\n\n![nextage_1.png](img/nextage_1.png)\n![nextage_2.png](img/nextage_2.png)\n\n![hsr_1.png](img/hsr_1.png)\n![hsr_2.png](img/hsr_2.png)\n\n![ubr1_1.png](img/ubr1_1.png)\n![ubr1_2.png](img/ubr1_2.png)\n\n![pepper_1.png](img/pepper_1.png)\n![pepper_2.png](img/pepper_2.png)\n\n![pr2_1.png](img/pr2_1.png)\n![pr2_2.png](img/pr2_2.png)\n\n![thormang3_1.png](img/thormang3_1.png)\n![thormang3_2.png](img/thormang3_2.png)\n\n## Dependencies\n\n* [kiss3d](https://github.com/sebcrozet/kiss3d): `urdf-viz` is strongly depend on `kiss3d`, which is super easy to use, great 3D graphic engine.\n* [nalgebra](https://github.com/sebcrozet/nalgebra): linear algebra library.\n* [k](https://github.com/openrr/k): kinematics library which is based on [nalgebra](https://github.com/sebcrozet/nalgebra). It can load URDF files using `urdf-rs`.\n* [mesh-loader](https://github.com/openrr/mesh-loader): Mesh files (`.obj`, `.stl`, and `.dae`) loader.\n* [urdf-rs](https://github.com/openrr/urdf-rs): URDF file loader.\n* [structopt](https://github.com/TeXitoi/structopt): super easy command line arguments parser.\n\n## `OpenRR` Community\n\n[Here](https://discord.gg/8DAFFKc88B) is a discord server for `OpenRR` users and developers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenrr%2Furdf-viz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenrr%2Furdf-viz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenrr%2Furdf-viz/lists"}