Giter Site home page Giter Site logo

Comments (4)

edward9503 avatar edward9503 commented on August 18, 2024

@jhwangbo

from raisimlib.

jhwangbo avatar jhwangbo commented on August 18, 2024

There is no reaction torque from a point. A point cannot apply torque.

You have to add all contact forces to get the sum.

from raisimlib.

edward9503 avatar edward9503 commented on August 18, 2024

@jhwangbo
Thanks for the reply. In my code, the way to get the contact force for a surface contact is:

  size_t armEE_B_idx = anymals[1]->getBodyIdx("bracelet_link");
  armEEContactForceB_mrt.setZero(); 
  for(auto& contact_: anymals[1]->getContacts()) {
    if (contact_.skip()) continue; /// if the contact is internal, one contact point is set to 'skip'
      if (armEE_B_idx == contact_.getlocalBodyIndex()){
        armEEContactForceB_mrt = std::pow(-1, !contact_.isObjectA()) * contact_.getContactFrame().e().transpose() * contact_.getImpulse().e() / dt;
      }
  }

But the results turn out to be 3X1 vector, which is not for the corner point separately. In this case:

  1. Is it the summed force of the surface contact?
  2. How to get the corner point contact force separately?
    Thanks.

from raisimlib.

jhwangbo avatar jhwangbo commented on August 18, 2024
  1. if all four points are in contact, the will be in anymals[1]->getContacts(). Then you have to sum them up with your code
  2. You are already doing that with your code

from raisimlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.