Comments (2)
Hi there!
I am one of the programmer of pyomeca, but not so much of pyomeca itself, so please pardon myself if I am give edgy advices!
So depending on what you are trying to actually achieve, it seems that an actual kinematics model could be interesting (using for instance bioviz or opensim), instead of directly plotting the joint in the 3d space.
If plotting in 3d space is actually what you want to do, the easiest way is to declare them as Markers
in pyomeca.
To declare markers in pyomeca, the most direct way is to use the from
methods (such as: pyomeca.Markers.from_csv
). But they can also be directly declared from a numpy array as such:
import numpy as np
import pyomeca
# generate some data
n_joints = 15
n_frames = 100
data = np.random.rand(3, n_joints, n_frames) * 1000 # Generate XYZ for all the joints center for each frame
# Convert them to pyomeca
d = pyomeca.Markers(data)
Then you can use bioviz to print them in the 3d space (please note, this is not the intended way to use bioviz, as it is supposed to be used from a bioMod file, but it can be bypass like that:
from bioviz.biorbd_vtk import VtkModel, VtkWindow, Mesh
# Create a windows with a nice gray background
vtk_window = VtkWindow(background_color=(0.5, 0.5, 0.5))
# Add marker holders to the window
vtk_markers = VtkModel(vtk_window, markers_color=(1, 0, 0), markers_size=10.0, markers_opacity=1, rt_length=100)
# Animate in loop
i = 0
while vtk_window.is_active:
vtk_markers.update_markers(d.isel(time=[i]))
vtk_window.update_frame()
i += 1
if i >= n_frames:
i = 0
For the question in regards pyosym, I cannot help much as I never used it myself. But as far as I am concerned, you can launch every filter of Opensim from that interface
Hope this helps!
from pyomeca.
I will give this a shot! Thank you!!
from pyomeca.
Related Issues (20)
- Review: Running EMG Example HOT 2
- Review: Additional examples for other data HOT 2
- Marker visualization HOT 3
- Pyomeca on Google Colab? HOT 2
- derivative method in newest version
- latest supported python version HOT 1
- troubles with xarrays and findpeaks HOT 3
- Slicing data using the square brackets HOT 1
- How to install Pyomeca from the Pycharm Terminal for Win 10. HOT 11
- Dependencies error HOT 5
- Unable to import ezc3d HOT 1
- Problem With Google Colab Import HOT 4
- `conda install -c conda-forge bioviz` fails in Python3.10 with error `ResolvePackageNotFound: - python=3.1` HOT 1
- . HOT 3
- delsys c3d HOT 6
- rototrans matmul HOT 2
- accessing Subject Properties in c3d files HOT 3
- resultant velocity - trubles with calling xarrays with same commands as in older pyomeca version. HOT 4
- Recover the trajectory color HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyomeca.