Closed whtqh closed 2 years ago
Could you open a PR and provides the requested feature? On our side, we have limited resources to handle such kind of request.
Thanks in advanced for your contribution
We have implemented the display of cones in Crocoddyl (using Meshcat). This PR is under review, however, I could point out to the code if this helps you.
@cmastalli Why did you put that in Croco and not Pinocchio?
@cmastalli Could you transfer it to Pinocchio then?
Haha, thanks a lot! I am amazed at such a quick response and it's my pleasure to make any tiny contribution. Btw, I haven't implemented an arrow shape cause I am still a fresh bird for pinocchio~ Pinocchio and Crocoddyl are both great repos to learn something!
@cmastalli Why did you put that in Croco and not Pinocchio?
We have to take friction cone information via Crocoddyl API. I believe it could potentially remove it with the new contact API from Pinocchio v3.
We also have implemented other display options that could be potentially moved to Pinocchio, e.g., swing trajectory, contact forces. Note that we have done this for both: GV and Meshcat.
@cmastalli Could you transfer it to Pinocchio then?
Could you let me know where I should include this? (I could try to find a time for doing)
Haha, thanks a lot! I am amazed at such a quick response and it's my pleasure to make any tiny contribution. Btw, I haven't implemented an arrow shape cause I am still a fresh bird for pinocchio~ Pinocchio and Crocoddyl are both great repos to learn something!
You might be faster than me as I have limited time. This is how we do it in Crocoddyl. Here, we create a cone: https://github.com/cmastalli/crocoddyl/blob/dbe58bd83c8acb6c8835ca6d0925f5a933eec4c8/bindings/python/crocoddyl/__init__.py#L383-L393. And then, we update its information here: https://github.com/cmastalli/crocoddyl/blob/dbe58bd83c8acb6c8835ca6d0925f5a933eec4c8/bindings/python/crocoddyl/__init__.py#L354-L361.
I am not familiar with the Pinocchio API. But, it shouldn't be that hard to do it in Pinocchio.
@cmastalli Could you transfer it to Pinocchio then?
Could you let me know where I should include this? (I could try to find a time for doing)
I personally think that cone shape is easy to add(2 lines should be ok), but actually I want to realize an arrow(just like what in rviz) in meshcat, so I need some time to find a proper way, too.
@ManifoldFR Do you have such tools in your toolbox?
@ManifoldFR Do you have such tools in your toolbox?
I don't, though it would be good to add
Copy display-shapes.py to display-shapes-meshcat.py with a tiny change, and the result looks like ↓
And a real arrow should be another problem, thus not discussed here anymore.
So, seems to work properly, no?
So, seems to work properly, no?
I think cone could be resolved by my latest PR, arrow should be added later.
Cone shape is supported in HPP-FCL, however, the cone is replaced by a cylinder in Meshcat-python We can still transform cone shape to cylinder in meshcat_visualizer.py by add the code below:
Hope it will be updated in the near future, and more basic shapes like arrow and line will be supported, too.
Thanks!