Skip to main content

View Animator

This package allows you to programmatically change the camera view for a variety of environments (for example pybullet simulation, and RViz visualization).

Installation

TODO after packaging for PYPI

Usage

The core of it is an animator object and its update() method. You can either update() the animator manually, or automatically in a separate daemon thread.

Example automatic orbiting animation

from view_animator import animate_view_in_background
from view_animator.pybullet_animator import PybulletOrbitter
import pybullet as p

p.connect(p.GUI)
# other simulator configurations

# animate an orbit in the background at a distance of 0.5 away from the origin
orbiter = PybulletOrbitter(update_period=0.01, dist=0.5, target=(0, 0, 0))
animate_view_in_background(orbiter)
# set up objects

p.setRealTimeSimulation(1)
while True:
    # do sim computations
    time.sleep(0.001)

dO08ur.gif

Manual updating of an RViz orbiter

from view_animator.rviz_animator import RVizOrbiter
import rospy

orbiter = RVizOrbiter(period=5, world_frame="world")
rate = rospy.Rate(1 / orbiter.update_period)
while not rospy.is_shutdown():
    # visualization and other processing
    orbiter.update()
    rate.sleep()

Animators

While you can subclass view_animator.base_animator.ViewAnimator directly to suit your specific environment and desired animation, there are a few predefined animators listed below. Note that you do not have to have the environment installed to install this package.

Pybullet

Install pybullet with pip install pybullet

  • view_animator.pybullet_animator.PybulletOrbitter for orbitting around a position with fixed pitch at a constant rate

RViz

Requires the rviz_animated_view_controller plugin that can be installed with

sudo apt install ros-<ros-distro>-rviz-animated-view-controller

e.g.

sudo apt install ros-noetic-rviz-animated-view-controller
  • view_animator.rviz_animator.RVizOrbitter for orbitting around a position with fixed pitch at a constant rate

Metadata

Release files for view-animator 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for view-animator 0.1.0
File Size Uploaded Provenance
view_animator-0.1.0.tar.gz 7.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for view-animator 0.1.0
File Interpreter ABI Platform
view_animator-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / view_animator-0.1.0.tar.gz

Download URL view_animator-0.1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
41a55a6b439df394666cd576df14df948fa440155b5378e88bdc4ee5501c3c9c
BLAKE2b-256 checksum
How to use checksums
7d2426bec7e8436fc1da08af92563e249ed0e66f4dbc25c02dd04c89fff4d5be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / view_animator-0.1.0-py3-none-any.whl

Download URL view_animator-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d03540770975f3761d229d4ed7e6172d80a82753adf08e4f5ab5880a2dec62ad
BLAKE2b-256 checksum
How to use checksums
9e0c3bf86e5845d9694f4384accd8e3b4b111972db814aef9d1512322cb8cd47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for view-animator 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page