get contact forces from model plugin

asked 2017-05-30 09:07:55 -0500

Hello,

I'm trying to get the contact forces between my robot and the rest of the world. In this tutorial, they explain how to do do it using by using a contact sensor and by writing a dedicated plugin.

However, I do already have a plugin to control my robot (it's a model plugin), and I would like to get access on current collision forces by calling some function(s) whenever I want (for example at each call of "OnUpdate" of the model).

Of course, I might write a separate plugin coupled with a contact sensor, and then use a message passing protocol, but it seems a bit complicated, and I'd rather having everything in a single program.

Do you have some idea how I could do it?

Thank you very much in advance

Félix

edit retag flag offensive close merge delete
{"cc_re__cc_re__cc_by_sa_3_0_le": ["/what-is-wrong-with-my-contact-sensor-code/\">What is wrong with my Contact Sensor Code?</a> </p> <p> <a href=\"/question/614/how-to-convert-world-contact-positions-to-robots-local-coordinate/\">How to convert world contact positions to robot&#39;s local coordinate?</a> </p> <p> <a href=\"/question/8897/force-base_link-to-stay-at-0/\">Force base_link to stay at 0</a> </p> </div> </div> </div> </div> <!-- template footer.html --> <div id=\"ground\"> <div class=\"content-wrapper\"> <div class=\"copyright\"> <a href=\"http://creativecommons.org/licenses/by-sa/3.0/legalcode\"> <img\n                            class=\"license-logo\"\n                            src=\"/m/default/media/images/cc-by-sa.png?v=2\"\n                            title=\"cc-by-sa\"\n                            alt=\"cc-by-sa\"\n                        /> </a>\n                \n                Copyright Askbot, 2010-2011. Content on this site is licensed under a <a href=\"http://creativecommons.org/licenses/by-sa/3.0/legalcode\">Creative Commons Attribution Share Alike 3.0</a> license.\n\n            </div> <di", "html --> <div id=\"ground\"> <div class=\"content-wrapper\"> <div class=\"copyright\"> <a href=\"http://creativecommons.org/licenses/by-sa/3.0/legalcode\"> <img\n                            class=\"license-logo\"\n                            src=\"/m/default/media/images/cc-by-sa.png?v=2\"\n                            title=\"cc-by-sa\"\n                            alt=\"cc-by-sa\"\n                        /> </a>\n                \n                Copyright Askbot, 2010-2011. Content on this site is licensed under a <a href=\"http://creativecommons.org/licenses/by-sa/3.0/legalcode\">Creative Commons Attribution Share Alike 3.0</a> license.\n\n            </div> <div class=\"footer-links\" > <a href=\"/about/\">about</a><span class=\"link-separator\"> |</span> <a href=\"/faq/\">faq</a><span class=\"link-separator\"> |</span> <a href=\"/help/\" title=\"help\">help</a> <span class=\"link-separator\"> |</span> <a href=\"/privacy/\">privacy policy</a><span class=\"link-separator\"> |</span> <a href=\"/terms/\">terms of service</a> </div> <div class=\"powered-link\"> <a href=\"http://askbot.com\" target=\"_b"], "copyright__copyright__copyright": ["odel plugin), and I would like to get access on current collision forces by calling some function(s) whenever I want (for example at each call of \"OnUpdate\" of the model).\n\nOf course, I might write a separate plugin coupled with a contact sensor, and then use a message passing protocol, but it seems a bit complicated, and I'd rather having everything in a single program.\n\nDo you have some idea how I could do it?\n\nThank you very much in advance\n\nF\u00e9lix\n\nedit retag flag offensive close merge delete", "odel plugin), and I would like to get access on current collision forces by calling some function(s) whenever I want (for example at each call of \"OnUpdate\" of the model).\n\nOf course, I might write a separate plugin coupled with a contact sensor, and then use a message passing protocol, but it seems a bit complicated, and I'd rather having everything in a single program.\n\nDo you have some idea how I could do it?\n\nThank you very much in advance\n\nF\u00e9lix\n\nedit retag flag offensive close merge delete"]}