-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
common_objects: getSharedRobotModelLoader fix deadlock #734
Conversation
I'll do a new patch release for both galactic and rolling after this get merged |
Codecov Report
@@ Coverage Diff @@
## main #734 +/- ##
=======================================
Coverage 54.22% 54.22%
=======================================
Files 192 192
Lines 20230 20230
=======================================
Hits 10968 10968
Misses 9262 9262 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this PR MGI demos were broken, this fixes them nicely and gets them working again. I think we should merge this as soon as possible and make a release.
moveit_ros/planning_interface/common_planning_interface_objects/src/common_objects.cpp
Outdated
Show resolved
Hide resolved
moveit_ros/planning_interface/common_planning_interface_objects/src/common_objects.cpp
Show resolved
Hide resolved
72df706
to
a37132f
Compare
This wasn't backported to Galactic, right? I'll either have to build MoveIt manually or upgrade to rolling? |
Hi @shuhaowu, Galactic has been branched of fairly recently, thus this exists in Galactic. Let us know if you have any troubles. |
Thanks for the quick response. I created my own move group interface demo code based on the MoveGroupInterface C++ tutorial on the moveit2_tutorial and the code hangs on constructor for MoveGroupInterface. I used gdb to figure out that it's stuck at It is possible that I'm doing something wrong with my modifications to that demo code, although I only really changed the group name and loaded my own robot descriptions (i.e. I'm using my own robot, instead of panda). If that is the case, I haven't figured out why. I'm going to try moveit from a source build to see if that makes a difference. If that doesn't help, maybe I can run the moveit2_tutorial code directly to see why my setup fails. I'll try to report back at some point. |
Actually MoveIt2 built faster than I thought it would. I just tried the MoveGroupInterface code with the latest main commit for MoveIt2 and I see messages like |
Nice. I plan on blooming moveit this week for galactic and rolling which means that at the next sync you should be able to use it without building from source. |
@shuhaowu glad your problem has been resolved and build was fast! We also publish source based docker images that is pre-built for you [here](https://hub.docker.com/r/moveit/moveit2/tags. |
Thanks for the response guys. My problem is not entirely resolve, as another issue has popped up. The latest build of MoveIt2 appears to segfault in the move_group for me:
Not sure if this is a known issue. Perhaps I'm building it wrong somehow. Will have to report back. If it is indeed a real issue, I'll see if I can get a coredump and create a separate issue. |
Do you have moveit installed from debians ? can you try removing it |
Nope. I reset my container without moveit installed to build. The only moveit related packages are the description packages installed via rosdep:
Don't think they cause a problem. That said, I've added There's the following in the logs:
I thought controller manager is not strictly necessary if you want to use it to only plan? it does say FATAL above so maybe not? That said, if it is FATAL, presumably it should crash when that log is emitted, as opposed to continue and eventually reach a segfault? |
Seems like an upstream problem with rclcpp. See this example program and this comment upstream: See this comment upstream: ros2/rclcpp#450 (comment). I'll file a bug there I guess... Meanwhile, I guess I'll have to configure
Running this:
I filed an issue upstream: ros2/rclcpp#1869 |
To loop around back to this, it looks like FATAL should not crash the program. This means there's a minor moveit bug here. I can create an issue tracking this in a bit. |
Description
Fix a deadlock introduced by my previous PR by locking the mutex inside
getSharedRobotModelLoader
and calling it fromgetSharedRobotModel
that locks the same mutex, other solutions could be by providing a different mutex forrobot_model_loaders_
or adding agetSharedRobotModelLoaderLockless
function that will be called insidegetSharedRobotModel
I did also replace the
boost::*
namespace withstd::*
Checklist