You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I wanted to add a new drone that implemented some additional features, such as having a time delay to the propeller motor response or adding some aerodynamic forces such as drag. It seems like there are 2 options:
I would have to create a new DroneEntity subclass for the drone and a new subclass that inherits from RigidSolver that, when add_entity() gets called, adds my new drone entity instead of the original DroneEntity to the simulation. And then I would also have to override scene.add_entity somehow to make sure my new solver gets used.
I could handle all of the additional features outside of the DroneEntity class. So for adding a time delay to the propellers, I would manage that myself outside of the object by changing how I call set_propellels_rpm.
In either case, if I wanted to add some additional aerodynamic forces, I would have to do something like drone_entity.solver._func_apply_external_force(self, pos, force, link_idx, batch_idx). But, if my understanding of taichi is correct, I can't call that externally since it's a taichi function. And the only kernel method to apply an external force seems to be control_dofs_force in RigidSolver, which has additional side effects that might be undesirable, such as changing the control_mode of a dof (I don't fully understand what that does, though).
Adding new features in this way seems a bit messy. Any ideas or recommendations?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I wanted to add a new drone that implemented some additional features, such as having a time delay to the propeller motor response or adding some aerodynamic forces such as drag. It seems like there are 2 options:
DroneEntity
subclass for the drone and a new subclass that inherits fromRigidSolver
that, whenadd_entity()
gets called, adds my new drone entity instead of the originalDroneEntity
to the simulation. And then I would also have to overridescene.add_entity
somehow to make sure my new solver gets used.DroneEntity
class. So for adding a time delay to the propellers, I would manage that myself outside of the object by changing how I callset_propellels_rpm
.In either case, if I wanted to add some additional aerodynamic forces, I would have to do something like
drone_entity.solver._func_apply_external_force(self, pos, force, link_idx, batch_idx)
. But, if my understanding of taichi is correct, I can't call that externally since it's a taichi function. And the only kernel method to apply an external force seems to becontrol_dofs_force
inRigidSolver
, which has additional side effects that might be undesirable, such as changing the control_mode of a dof (I don't fully understand what that does, though).Adding new features in this way seems a bit messy. Any ideas or recommendations?
Beta Was this translation helpful? Give feedback.
All reactions