-
Notifications
You must be signed in to change notification settings - Fork 65
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
Dynamic footprint? #53
Comments
You'd probably want to create a model plugin that expects a model with bodies of particular names "left leg" "right leg" "torso". I would recommend having maybe a body with the torso that you move around on the "3d" layer (that 3d sensors can see), to track where the person is (visually for debugging in rviz/flatland viz). Each leg could just be a polygon or circle body (density 0 may help) that's either attached to the torso body either by explicitly setting the relative position during the plugin's BeforePhysicsStep, or by using a joint. See tricycle_drive.cpp for examples of using You can also see the Tween plugin's BeforePhysicsStep where it manually sets the position of the body that it manages. I wouldn't recommend doing it that way since this breaks the interactive marker integration, unless you take into account relative motion that might be introduced. I'm hoping to update the Tween plugin at some point to fix this (#29). This way your person objects may interact nicely with the interactive mark integration. Flatland is a pretty thin layer on top of Box2D (it could have been named "Box2D with TF, Yaml loading, and Pluginlib" reasonably accurately), so feel free to check out the box2d manual: http://box2d.org/manual.pdf to get a better idea of how to muck with the underlying physics entities. If this seems daunting, this is also something I've wanted to add for a while, so feel free to submit a partial implementation and I can try to help out. Alternatively, I may have time this weekend to work on a bare bones version of this. |
First of all thanks for the detailed reply.
I think, I might need another joint. If you have any more suggestions, please don't hesitate. But I might also dig into box2d. |
I found a way to accomplish it. I didn't use any joints and set the velocity and position of each body separately. It's maybe not the nicest way and I still have to check if it slows down the simulation essentially. Thanks for your support so far! |
I would like to simulate a walking person (i.e. legs) with two circles, moving back and forward over time. Is it possible to have dynamic models with changing footprints? I didn't find the appropriate interface...
The text was updated successfully, but these errors were encountered: