Coder Social home page Coder Social logo

Comments (5)

Levaru avatar Levaru commented on June 13, 2024

I was able to narrow the problem down to this function: Line in Question

Is there maybe a variable that is being modified by multiple threads or is this caused by something else entirely?

from moveit_grasps.

Levaru avatar Levaru commented on June 13, 2024

After some debugging and commenting out lines of code I can indeed confirm that searchPositionIK() is the culprit here. I don't know if this is a data race or if the ik solver just hangs for another reason. I solved this issue by replacing KDL with the Trac-Ik plugin. I would really appreciate it, if someone could double check this!

from moveit_grasps.

davetcoleman avatar davetcoleman commented on June 13, 2024

@Levaru thanks for reporting this and updating us on the progress. could you suggest a PR to fix this issue? it sounds like an issue with KDL and multi-threading, correct? so maybe a patch is needed for KDL...

We have used KDL with this project a lot, though, and haven't had this issue. Additionally, TracIK actually just uses two threads under the hood, one uses KDL...

from moveit_grasps.

Levaru avatar Levaru commented on June 13, 2024

@davetcoleman i'm not sure how a fix would look like to be honest. This data race issue started happening once I moved to a PC with more cores and thus more threads were created (12) for the multithreaded filtering. A good way to check for this data race is to wrap the filterGrasps() function in a while(true) loop and then just let it run.

I believe that searchPositionIK() doesn't timeout in one of the threads for some reason and thus blocks the whole loop from finishing.

As for TracIK: Because of an increased delay in cartesian path planning, I replaced it by loading the lma_kinematics_plugin/LMAKinematicsPlugin which is a standard IK solver plugin included in MoveIt. It turned out to be thread-safe and was just as fast as KDL.

I hope this information helped!

from moveit_grasps.

JafarAbdi avatar JafarAbdi commented on June 13, 2024

Hi @Levaru,

I'm working on solving this issue, I tested the grasp_filter_demo on my PC with 12 thread and it didn't hang, this demo uses Franka Emika’s Panda robotics arm; do you mind sharing the code you are working on right now or anything that would help .? so I could debug it more to see why the hang is happening and to see how I could fix it,

Thanks

from moveit_grasps.

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.