meshcat-cpp icon indicating copy to clipboard operation
meshcat-cpp copied to clipboard

[Question]: Pointers on how to have a CapsuleGeometry supported for set_object

Open wpumacay opened this issue 1 year ago • 5 comments

Hi, I got to the point that I needed to create Capsules for my simulation, and I was wondering what parts in the code should I change to support creating capsules. Could you give some pointers to what I should change to obtain this result?.

Thanks in advance

wpumacay avatar Mar 05 '24 20:03 wpumacay

https://github.com/ami-iit/meshcat-cpp/blob/master/include/MeshcatCpp/Shape.h#L57

Islam0mar avatar Sep 09 '24 10:09 Islam0mar

fyi @GiulioRomualdi

traversaro avatar Sep 09 '24 15:09 traversaro

Oh, yes I followed that path, but it seems that there's an issue with the version of threejs bundled into the main.min.js. It doesn't recognize the CapsuleGeometry. I updated the version of threejs, but then got some issues with the packet of data sent to the meshcat server. It seems that we have to update some parts of meshcatcpp to make it work with a newer version of threejs. Did u run into a similar issue when trying to add this new geometry?. I think it's a whole process, as the folks in drake had a similar issue.

wpumacay avatar Sep 09 '24 20:09 wpumacay

Could you link drake issue.

Islam0mar avatar Sep 09 '24 23:09 Islam0mar

Sure.

https://github.com/RobotLocomotion/drake/issues/17149

This tracks the changes for Capsule support:

https://github.com/RobotLocomotion/drake/pull/17319

wpumacay avatar Sep 10 '24 00:09 wpumacay