Reputation: 139
I have a robot in my simulation that carries objects to and from places. I would like to spawn an object at a certain position with an initial velocity of 0. The trigger would most likely be a collision detection or when the previous object reaches a certain location. I would also like to despawn objects after being used or if it falls off the robot's end effector (to prevent core dumps after the object drops)
Is there a method in drake to continuously spawn and despawn objects?
Thank you
Upvotes: 0
Views: 117
Reputation: 678
Drake doesn't have a way to spawn/despawn objects automatically. A few possibilities:
*
). Detect triggering events using monitor() or witness functions, activate/deactivate objects to emulate spawn/despawn.*
Getting the inactive objects to sit still may take some effort. You could do it with a controller, or by creating a ForceElement that acts like a spring/damper until disabled with a boolean state variable. Others may have better ideas for that.
Upvotes: 0