-
Notifications
You must be signed in to change notification settings - Fork 114
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
Problem with sm.pi #499
Comments
This also seems to be present on Windows, not Linux. |
I do use Windows. |
Error from the file:
|
From https://stackoverflow.com/a/26065595:
|
C++20 has some math constants: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made some simulation, where I used sm.pi to form the EOMs using Kane's method as usual.
I then tried to integrate it, using pydy.System
When I added this line:
sys.generate_ode_function(generator='cython', verbose=False)
I got an error, without this line, it worked fine.
24-0ß5-13 error with sm_pi.txt
Timo then suggested I add these lines:
old_c_source_template = CMatrixGenerator._c_source_template
CMatrixGenerator._c_source_template = "#define M_PI 3.14159265358979323846\n" + old_c_source_template
This solved the problem for me. (alternatively, when I replaced sm.pi by np.pi it also worked)
So, while my problem was solved, maybe it could be corrected permanently.
Thanks for looking into it!
The text was updated successfully, but these errors were encountered: