Git Product home page Git Product logo

Comments (4)

hammoudbilal avatar hammoudbilal commented on July 21, 2024

this is indeed the case, setting the contact force to zero in case of an average pulling force fixes the bouncing issue in the ball drop test.
https://github.com/andreadelprete/consim/blob/bhammoud_cpp_exp_integrator/src/simulator.cpp#L362

friction cone is implemented, i need to write an example before I do a pull request

from consim.

andreadelprete avatar andreadelprete commented on July 21, 2024

The easiest solution I can think of is to set f_projection during checking the friction cone to zero in case this occurs. and use
dv_projection = Minv*(tau - h + J.T * f_projection)
however, I cannot think of a solution for the case when there is no cone violation.

we could use this method to integrate all the time, but we lose the advantage of the closed form second order solution for the positions.

It's true that by using this approach we lose the closed-form solution for integrating the robot configuration, which is a pity. However, I don't know how much we gain by using the double integral rather than either i) neglecting the contribution of accelerations when integrating positions, or ii) compute an approximate double integral based on the assumption that contact forces are constant at their average value (computed with the integral). The second option would be something like this:

int_x = compute_integral(...);
f_avg = D*int_x/dt + K*p0;
f_proj = project_inside_cone(f_avg);
dv_mean = dv_bar + Minv * J.T * f_proj
v_mean = v + 0.5*dt*dv_mean
v += dt*dv_mean
q = se3.integrate(model, q, v_mean*dt)

I expect this method to give results that are very similar to the ones we get with the double integral, but this should be checked.

from consim.

hammoudbilal avatar hammoudbilal commented on July 21, 2024

for now I have it implemented this way. However this reduces the time step we have to use to keep the simulation perfectly matching with euler simulation. I still have some code cleaning to do, I will do a pull request tomorrow.

For the projection, what I do is compute the angle using atan2(fy_avg, fx_ang)
then project mu*fz on the x&y direction whenever it violates the cone, is this the proper way of implementing it ? or is there a more formal way of how people usually do it ?

from consim.

andreadelprete avatar andreadelprete commented on July 21, 2024

for now I have it implemented this way. However this reduces the time step we have to use to keep the simulation perfectly matching with euler simulation.

Yes, this is the only advantage of using a small time step even for a linear system: more accurate contact detection. The only workaround I can see would be to try and detect the exact time of contact switch and then use adaptive time steps. However, I don't think that's what we wanna do right now.

For the projection, what I do is compute the angle using atan2(fy_avg, fx_ang)
then project mu*fz on the x&y direction whenever it violates the cone, is this the proper way of implementing it ? or is there a more formal way of how people usually do it ?

It looks fine to me!

from consim.

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.