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

C++ to Python conversion crash #160

Closed
YorchMcM opened this issue Feb 20, 2023 · 3 comments
Closed

C++ to Python conversion crash #160

YorchMcM opened this issue Feb 20, 2023 · 3 comments

Comments

@YorchMcM
Copy link

The function io.read_vector_history_from_file crashes when used on Python and gives the following error:

TypeError: Unable to convert function return value to a Python type! The signature was
(vector_size: int, file_name: str) -> Dict[float, Eigen::Matrix<double,-1,1,0,-1,1>]

Something similar happens with the function numerical_simulation.propagation.get_zero_normal_mode_rotational_state, although the error reads somewhat different:

TypeError: Unable to convert function return value to a Python type! The signature was
(bodies: tudatpy.kernel.numerical_simulation.environment.SystemOfBodies, integrator_settings: tudat::numerical_integrators::IntegratorSettings, propagator_settings: tudat::propagators::SingleArcPropagatorSettings<double,double>, body_mean_rotational_rate: float, dissipation_times: List[float], propagate_undamped: bool = True) -> Tuple[numpy.ndarray[numpy.float64[m, 1]], List[Tuple[Dict[float, numpy.ndarray[numpy.float64[m, 1]]], Dict[float, numpy.ndarray[numpy.float64[m, 1]]]]], List[Tuple[Dict[float, numpy.ndarray[numpy.float64[m, 1]]], Dict[float, numpy.ndarray[numpy.float64[m, 1]]]]]]

I've been told you are aware of this and that for some people this doesn't happen. I attach the contents of my conda environment so that hopefully the problematic module(s) can be identified.

@larshinueber larshinueber transferred this issue from tudat-team/tudat-space Aug 18, 2024
@larshinueber
Copy link
Contributor

The exposure of read_vector_history_from_file will be fixed in #217.
@DominicDirkx I couldnt find any reference to get_zero_normal_mode_rotational_state. Has this function been renamed or removed?

@DominicDirkx
Copy link
Member

This function is now called get_damped_proper_mode_initial_rotational_state. Thanks for trying to fix this!

@larshinueber
Copy link
Contributor

Thanks! It seems that this has been fixed in the meantime (checked with the dev version) and there is even an example using the function: https://docs.tudat.space/en/latest/_src_getting_started/_src_examples/tudatpy-examples/propagation/coupled_translational_rotational_dynamics.html#Getting-rid-of-the-normal-modes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

No branches or pull requests

3 participants