Dear all,
I am new to project chrono, I have installed pychrono via anaconda on
windows and I have been running some tests.
My goal for the moment would be to run a MB simulation of an inverted
pendulum, with the later goal of producing a simulation of an inverted
pendulum on a cart.
I have seen that at the path "demos\chrono-tensorflow\envs" there is
already available a script that should already do the latter.
The problem I'm having is that the demo does not seem to run on the version
of pychrono I am using (the latest build for win). I will now refer to the
files env_test.py and chtrain_pendulum.py .
The first issue I face is with:
self.body_rod_shape = chrono.ChVisualShapeCylinder()
self.body_rod_shape.GetCylinderGeometry().p1= self.cyl_base1
self.body_rod_shape.GetCylinderGeometry().p2= self.cyl_base2
self.body_rod_shape.GetCylinderGeometry().rad= self.radius_rod
For which I get the error telling me that the ChVisualShapeCylinder has no
attribute GetCylinderGeometry.
I have worked around this problem by just assigning a radius and height to
the first of those 4 lines and discarding the other 3, not sure if that is
a good solution.
The problem that I have not be able to fix is related to
ImposeAbsoluteTransform
which I found in rows 143 and 147 of the chtrain_pendulum.py file. By
looking at the documentation for the C++ version, that method is supposed
to take as argument a ChFrame, whereas in the demo the argument given is a
ChCoordsysd built with a ChVector3d.
ImposeAbsoluteTransform(chrono.ChCoordsysd(chrono.ChVector3d(0,0,0)))
This gives an error so I tried to build a chframe as follows:
ImposeAbsoluteTransform(chrono.ChFrame(chrono.ChCoordsysd(chrono.ChVector3d(
0,0,0))))
but the error is telling me that ChFrame does not exist in pychrono.
How can I fix this issue? Is there anywhere a specific documentation for
pychrono or should I switch to the C++ version?
I am sorry if I was unclear and I am of course available to give more
information about this. Thank you in advance.
Best regards,
Marco
--
You received this message because you are subscribed to the Google Groups
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/9c38cb0a-d450-4c42-90bd-13833456c537n%40googlegroups.com.