Fix seg fault with attached objects during motion execution (backport #3466)#3470
Merged
Fix seg fault with attached objects during motion execution (backport #3466)#3470
Conversation
(cherry picked from commit c81ac91)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jazzy #3470 +/- ##
==========================================
- Coverage 46.18% 45.80% -0.38%
==========================================
Files 718 718
Lines 62661 62647 -14
Branches 7582 7586 +4
==========================================
- Hits 28932 28687 -245
- Misses 33565 33795 +230
- Partials 164 165 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bmagyar
approved these changes
May 13, 2025
MarqRazz
approved these changes
May 13, 2025
Eldgar
pushed a commit
to Eldgar/moveit2
that referenced
this pull request
May 24, 2025
…moveit#3284) (moveit#3320) * Revert "Fix RobotState::getRigidlyConnectedParentLinkModel() (moveit#2985)" This reverts commit 1f23344. * Merge PR moveit#3388: Generalize RobotState::setFromIK() So far, setFromIK only accepted target (link) frames that were rigidly connected to a solver's tip frame. This, for example, excluded the fingertip of an actuated gripper, because that would be separated by an active joint from the arm's tooltip. However, as long as this joint is not part of the JMG, the corresponding transform can be considered as fixed as well. This PR generalizes the functions getRigidlyConnectedParentLinkModel() in RobotState and RobotModel to receive an optional JMG pointer. If present, only (active) joints from that group are considered non-fixed. This PR also enables subframe support for setFromIK - simply by using getRigidlyConnectedParentLinkModel(), which already supported that. There is one drawback of this approach: A repeated application of setFromIK with the same target frame and JMG (as in computeCartesianPath()), will repeat the search for the common fixed parent link. Additionally, the passed RobotState needs to be up-to-date. We could mitigate this by pulling the corresponding code into a separate function and calling it once in computeCartesianPath(). * Merge PR moveit#3470: Avoid global transforms in getRigidlyConnectedParentLinkModel() Fixes moveit#3388 * Merge pull request moveit#3539 from v4hn/find-links-with-slashes-again find links with slashes again * Ports to ROS2 and fixes problems introduced in merge conflicts. * Fixes formatting. * Makes robot_state_test.cpp include gmock. * Updates trajectory_msgs::JointTrajectory to trajectory_msgs::msg::JointTrajectory. * Adds braces to make clang-tidy happy. * Removes test-only arguments; adds more comments. * Fixes formatting. * Fixes formatting. * Adds missing class scope. --------- Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de> Co-authored-by: Michael Görner <me@v4hn.de> (cherry picked from commit 1794b8e) Co-authored-by: Mark Johnson <104826595+rr-mark@users.noreply.github.com>
medvedevigorek
pushed a commit
to AivotRobotics/moveit2
that referenced
this pull request
May 29, 2025
…(backport moveit#3284) (moveit#3319) * Reverts moveit#2985, Ports moveit moveit#3388 moveit#3470 moveit#3539 (moveit#3284) * Revert "Fix RobotState::getRigidlyConnectedParentLinkModel() (moveit#2985)" This reverts commit 1f23344. * Merge PR moveit#3388: Generalize RobotState::setFromIK() So far, setFromIK only accepted target (link) frames that were rigidly connected to a solver's tip frame. This, for example, excluded the fingertip of an actuated gripper, because that would be separated by an active joint from the arm's tooltip. However, as long as this joint is not part of the JMG, the corresponding transform can be considered as fixed as well. This PR generalizes the functions getRigidlyConnectedParentLinkModel() in RobotState and RobotModel to receive an optional JMG pointer. If present, only (active) joints from that group are considered non-fixed. This PR also enables subframe support for setFromIK - simply by using getRigidlyConnectedParentLinkModel(), which already supported that. There is one drawback of this approach: A repeated application of setFromIK with the same target frame and JMG (as in computeCartesianPath()), will repeat the search for the common fixed parent link. Additionally, the passed RobotState needs to be up-to-date. We could mitigate this by pulling the corresponding code into a separate function and calling it once in computeCartesianPath(). * Merge PR moveit#3470: Avoid global transforms in getRigidlyConnectedParentLinkModel() Fixes moveit#3388 * Merge pull request moveit#3539 from v4hn/find-links-with-slashes-again find links with slashes again * Ports to ROS2 and fixes problems introduced in merge conflicts. * Fixes formatting. * Makes robot_state_test.cpp include gmock. * Updates trajectory_msgs::JointTrajectory to trajectory_msgs::msg::JointTrajectory. * Adds braces to make clang-tidy happy. * Removes test-only arguments; adds more comments. * Fixes formatting. * Fixes formatting. * Adds missing class scope. --------- Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Michael Görner <me@v4hn.de> (cherry picked from commit 1794b8e) * Resolves merge conflicts. (moveit#3323) --------- Co-authored-by: Mark Johnson <104826595+rr-mark@users.noreply.github.com>
rhaschke
added a commit
to rhaschke/moveit2
that referenced
this pull request
Jun 6, 2025
…moveit#3284) * Revert "Fix RobotState::getRigidlyConnectedParentLinkModel() (moveit#2985)" This reverts commit 1f23344. * Merge PR moveit#3388: Generalize RobotState::setFromIK() So far, setFromIK only accepted target (link) frames that were rigidly connected to a solver's tip frame. This, for example, excluded the fingertip of an actuated gripper, because that would be separated by an active joint from the arm's tooltip. However, as long as this joint is not part of the JMG, the corresponding transform can be considered as fixed as well. This PR generalizes the functions getRigidlyConnectedParentLinkModel() in RobotState and RobotModel to receive an optional JMG pointer. If present, only (active) joints from that group are considered non-fixed. This PR also enables subframe support for setFromIK - simply by using getRigidlyConnectedParentLinkModel(), which already supported that. There is one drawback of this approach: A repeated application of setFromIK with the same target frame and JMG (as in computeCartesianPath()), will repeat the search for the common fixed parent link. Additionally, the passed RobotState needs to be up-to-date. We could mitigate this by pulling the corresponding code into a separate function and calling it once in computeCartesianPath(). * Merge PR moveit#3470: Avoid global transforms in getRigidlyConnectedParentLinkModel() Fixes moveit#3388 * Merge pull request moveit#3539 from v4hn/find-links-with-slashes-again find links with slashes again * Ports to ROS2 and fixes problems introduced in merge conflicts. * Fixes formatting. * Makes robot_state_test.cpp include gmock. * Updates trajectory_msgs::JointTrajectory to trajectory_msgs::msg::JointTrajectory. * Adds braces to make clang-tidy happy. * Removes test-only arguments; adds more comments. * Fixes formatting. * Fixes formatting. * Adds missing class scope. --------- Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai>
Markus-Simonsen
pushed a commit
to Markus-Simonsen/moveit2
that referenced
this pull request
Aug 12, 2025
…moveit#3284) * Revert "Fix RobotState::getRigidlyConnectedParentLinkModel() (moveit#2985)" This reverts commit 1f23344. * Merge PR moveit#3388: Generalize RobotState::setFromIK() So far, setFromIK only accepted target (link) frames that were rigidly connected to a solver's tip frame. This, for example, excluded the fingertip of an actuated gripper, because that would be separated by an active joint from the arm's tooltip. However, as long as this joint is not part of the JMG, the corresponding transform can be considered as fixed as well. This PR generalizes the functions getRigidlyConnectedParentLinkModel() in RobotState and RobotModel to receive an optional JMG pointer. If present, only (active) joints from that group are considered non-fixed. This PR also enables subframe support for setFromIK - simply by using getRigidlyConnectedParentLinkModel(), which already supported that. There is one drawback of this approach: A repeated application of setFromIK with the same target frame and JMG (as in computeCartesianPath()), will repeat the search for the common fixed parent link. Additionally, the passed RobotState needs to be up-to-date. We could mitigate this by pulling the corresponding code into a separate function and calling it once in computeCartesianPath(). * Merge PR moveit#3470: Avoid global transforms in getRigidlyConnectedParentLinkModel() Fixes moveit#3388 * Merge pull request moveit#3539 from v4hn/find-links-with-slashes-again find links with slashes again * Ports to ROS2 and fixes problems introduced in merge conflicts. * Fixes formatting. * Makes robot_state_test.cpp include gmock. * Updates trajectory_msgs::JointTrajectory to trajectory_msgs::msg::JointTrajectory. * Adds braces to make clang-tidy happy. * Removes test-only arguments; adds more comments. * Fixes formatting. * Fixes formatting. * Adds missing class scope. --------- Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai>
helen9975
pushed a commit
to personalrobotics/moveit2
that referenced
this pull request
Feb 17, 2026
…moveit#3284) * Revert "Fix RobotState::getRigidlyConnectedParentLinkModel() (moveit#2985)" This reverts commit 1f23344. * Merge PR moveit#3388: Generalize RobotState::setFromIK() So far, setFromIK only accepted target (link) frames that were rigidly connected to a solver's tip frame. This, for example, excluded the fingertip of an actuated gripper, because that would be separated by an active joint from the arm's tooltip. However, as long as this joint is not part of the JMG, the corresponding transform can be considered as fixed as well. This PR generalizes the functions getRigidlyConnectedParentLinkModel() in RobotState and RobotModel to receive an optional JMG pointer. If present, only (active) joints from that group are considered non-fixed. This PR also enables subframe support for setFromIK - simply by using getRigidlyConnectedParentLinkModel(), which already supported that. There is one drawback of this approach: A repeated application of setFromIK with the same target frame and JMG (as in computeCartesianPath()), will repeat the search for the common fixed parent link. Additionally, the passed RobotState needs to be up-to-date. We could mitigate this by pulling the corresponding code into a separate function and calling it once in computeCartesianPath(). * Merge PR moveit#3470: Avoid global transforms in getRigidlyConnectedParentLinkModel() Fixes moveit#3388 * Merge pull request moveit#3539 from v4hn/find-links-with-slashes-again find links with slashes again * Ports to ROS2 and fixes problems introduced in merge conflicts. * Fixes formatting. * Makes robot_state_test.cpp include gmock. * Updates trajectory_msgs::JointTrajectory to trajectory_msgs::msg::JointTrajectory. * Adds braces to make clang-tidy happy. * Removes test-only arguments; adds more comments. * Fixes formatting. * Fixes formatting. * Adds missing class scope. --------- Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#3327 introduced a bug where motion execution can segfault by attempting to indexing into arrays of zero length.
I assume this is because MTC sends execution requests where only the planing scene in modified, so trajectory lengths are zero. I also added some guards in robot_state to make sure we are not adding null objects to the
attached_bodieslist/map.This is an automatic backport of pull request #3466 done by [Mergify](https://mergify.com).