Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable vector of times as input to at_time #212

Open
scharalambous-sony opened this issue Dec 5, 2024 · 2 comments
Open

Enable vector of times as input to at_time #212

scharalambous-sony opened this issue Dec 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@scharalambous-sony
Copy link

Hi,

How can one modify at_time to accept a vector of times to obtain a whole trajectory at once?
I am using the Python wrapper

Thanks in advance

@pantor pantor added the enhancement New feature or request label Dec 6, 2024
@pantor
Copy link
Owner

pantor commented Dec 6, 2024

What is wrong about iterating over the vector in Python? Seems to be a one-liner:

trajectory_states = [traj.at_time(t) for t in times]

@scharalambous-sony
Copy link
Author

scharalambous-sony commented Dec 6, 2024

The only issue is computational time. That adds at least len(times) x Python function call overhead seconds of computational time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants