{"id":19138025,"url":"https://github.com/lemonpi/view_animator","last_synced_at":"2025-08-07T17:43:03.661Z","repository":{"id":65803707,"uuid":"599821530","full_name":"LemonPi/view_animator","owner":"LemonPi","description":"Programmatically change the camera view for a variety of environments","archived":false,"fork":false,"pushed_at":"2023-02-10T02:16:56.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T18:39:37.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LemonPi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-02-10T00:20:30.000Z","updated_at":"2023-04-09T05:35:39.000Z","dependencies_parsed_at":"2023-02-23T02:45:33.536Z","dependency_job_id":null,"html_url":"https://github.com/LemonPi/view_animator","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"e84c90a4c4edf6406f1b55009dd4442f7ef585b7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LemonPi/view_animator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2Fview_animator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2Fview_animator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2Fview_animator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2Fview_animator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LemonPi","download_url":"https://codeload.github.com/LemonPi/view_animator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2Fview_animator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262076911,"owners_count":23255087,"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-11-09T06:41:28.476Z","updated_at":"2025-06-26T13:33:17.211Z","avatar_url":"https://github.com/LemonPi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## View Animator\nThis package allows you to programmatically change the camera view for a variety of environments \n(for example pybullet simulation, and RViz visualization).\n\n## Installation\n```shell\npip install view-animator\n```\nEach animator may have specific environment installation pre-requisites, listed below.\n\n## Usage\nThe core of it is an animator object and its `update()` method. You can either `update()` the animator\nmanually, or automatically in a separate daemon thread.\n\nExample automatic orbiting animation\n\n```python\nfrom view_animator import animate_view_in_background\nfrom view_animator.pybullet_animator import PybulletOrbitter\nimport pybullet as p\n\np.connect(p.GUI)\n# other simulator configurations\n\n# animate an orbit in the background at a distance of 0.5 away from the origin\n# one orbit will be completed in 10 seconds and by default will loop forever\norbiter = PybulletOrbitter(update_period=0.01, dist=0.5, target=(0, 0, 0), period=10)\nanimate_view_in_background(orbiter)\n# set up objects\n\np.setRealTimeSimulation(1)\nwhile True:\n    # do sim computations\n    time.sleep(0.001)\n```\n![dO08ur.gif](https://imgpile.com/images/dO08ur.gif)\n\nManual updating of an RViz orbiter\n\n```python\nfrom view_animator.rviz_animator import RVizOrbiter\nimport rospy\n\n# the target specified will be relative to the world_frame\norbiter = RVizOrbiter(period=5, world_frame=\"world\")\nrate = rospy.Rate(1 / orbiter.update_period)\nwhile not rospy.is_shutdown():\n    # visualization and other processing\n    orbiter.update()\n    rate.sleep()\n```\n## Animators\nWhile you can subclass `view_animator.base_animator.ViewAnimator` directly to suit your specific environment\nand desired animation, there are a few predefined animators listed below. Note that you do not have to\nhave the environment installed to install this package.\n\n### Pybullet\nInstall pybullet with\n```pip install pybullet```\n- `view_animator.pybullet_animator.PybulletOrbitter` for orbitting around a position with fixed pitch at a constant rate\n\n### RViz\nRequires the `rviz_animated_view_controller` plugin that can be installed with\n```shell \nsudo apt install ros-\u003cros-distro\u003e-rviz-animated-view-controller\n```\ne.g.\n```shell\nsudo apt install ros-noetic-rviz-animated-view-controller\n```\n\n- `view_animator.rviz_animator.RVizOrbitter` for orbitting around a position with fixed pitch at a constant rate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonpi%2Fview_animator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemonpi%2Fview_animator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonpi%2Fview_animator/lists"}