condynsate
We present a Python-based, open-source software package called condynsate (control and dynamics simulator) designed to ease the creation of computation-based dynamics and control demonstrations, assignments, and projects. Guided by a simulation and role-play pedagogy, projects built with condynsate mimic the experience of simulation-based games to enhance learning and retention.
With a physics engine provided by PyBullet and 3D visualization provided by MeshCat, condynsate implements real-time simulation of stl and obj defined rigid bodies and urdf defined articulated bodies. It allows users to interact with simulation results through a browser-based 3D viewer to visualize simulations, a built-in animator to plot arbitrary simulation states, and a keyboard module that allows detection of key press events. These features equip condynsate with a broad scope of applicability by guaranteeing that any dynamic system that can be described by a urdf file, a file format created by Open Robotics for the Robot Operating System software, is supported.
Documentation, tutorials, and examples were generated with the intent of educating instructors on the usage of condynsate to develop teaching demonstrations. The five included tutorials walk through the development of condynsate-based projects, including the simulation environment, design and implementation of mechanical systems, application of internal and external forces and torques to the mechanical systems, real-time visualization and animation, keyboard interactivity, and methods of data collection.
In addition, at least one example of usage is included for each of the five major modules: the Keyboard module, which provides keyboard interactivity; the Visualizer module, which provides 3D visualization; the Animator module, which provides GUI-based plotting; the Simulator module, which provides the physics simulation environment; and the Project module, which provides automatic interfacing with all other modules for easy project development.
condynsate was built by G. Schaer and funded by the Computational Tools for Dynamics and Control grant through the University of Illinois Urbana-Champaign Grainger College of Engineering Academy for Excellence in Engineering Education (AE3) Strategic Instructional Innovations Program (SIIP).
All materials, including the package and example usage, have been made publicly available at https://github.com/condynsate/condynsate and are licensed under the GPL-3.0-only and MIT licenses. To install, type
python3 -m pip install condynsate
in a Python-enabled terminal.
Contents
- Installation
- The condynsate Package
- The project Subpackage
- The simulator Subpackage
- The visualizer Subpackage
- The visualizer Module
- The Visualizer Class
VisualizerVisualizer.set_grid()Visualizer.set_axes()Visualizer.set_background()Visualizer.set_spotlight()Visualizer.set_ptlight_1()Visualizer.set_ptlight_2()Visualizer.set_amblight()Visualizer.set_dirnlight()Visualizer.set_cam_position()Visualizer.set_cam_target()Visualizer.set_cam_zoom()Visualizer.set_cam_frustum()Visualizer.add_object()Visualizer.set_transform()Visualizer.set_material()Visualizer.reset()Visualizer.terminate()
- The Visualizer Class
- The visualizer Module
- The animator Subpackage
- The keyboard Subpackage
- Examples
- Tutorials