stack-of-tasks / pinocchio

A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
http://stack-of-tasks.github.io/pinocchio/
BSD 2-Clause "Simplified" License
1.92k stars 395 forks source link

Show multiple states of the same robot model in the same scene #1979

Closed eirtech closed 1 year ago

eirtech commented 1 year ago

Hi,

First, I want to thank you for your great work.

I want to show the same robot model in the same scene but in different states. I am not sure how to make it with meshcatvisulizer. I already tried to make 2 model, collisionModel, etc. variables, for example 2 times to show 2 different state of the robot. but was not successful. Would you please help me in this regard?

Thanks in advance.

jcarpent commented 1 year ago

Hi @eirtech ,

Here is a tiny example https://github.com/stack-of-tasks/pinocchio/blob/a8ba226fc99213b66c98bcbe425827a633cde41d/examples/meshcat-viewer.py#L65