### Description `RobotState::setFromIK()` returns false when the `tip` frame passed is a subframe. This is due to the method [only checking if the frame is the name of an attached body](https://github.com/moveit/moveit2/blob/ad0431b095955c03f3b26521562fb445873b7b6c/moveit_core/robot_state/src/robot_state.cpp#L1669-L1695). This is in contrast to the ROS1 code, which [calls `getRigidlyConnectedParentLinkModel()`](https://github.com/moveit/moveit/blob/f1a607129a6b5183c9296b29e0d126d9b48e7ea8/moveit_core/robot_state/src/robot_state.cpp#L1710-L1733), which [is subframe aware](https://github.com/moveit/moveit/blob/f1a607129a6b5183c9296b29e0d126d9b48e7ea8/moveit_core/robot_state/src/robot_state.cpp#L833). The code is a bit different in ROS2, however, `RobotState` [already has a method for looking up frames with subframe awareness](https://github.com/moveit/moveit2/blob/ad0431b095955c03f3b26521562fb445873b7b6c/moveit_core/robot_state/src/robot_state.cpp#L1082-L1148). As such, I think the call to `hasAttachedBody()` should be replaced with `getFrameTransform()`. ### ROS Distro Humble ### OS and version Ubuntu 22.04 ### Source or binary build? Binary ### If binary, which release version? 2.5.5 ### If source, which branch? N/A ### Which RMW are you using? None ### Steps to Reproduce 1. Call `RobotState::setFromIK()` where the `tip` parameter is a subframe 2. The code [will error and return false](https://github.com/moveit/moveit2/blob/ad0431b095955c03f3b26521562fb445873b7b6c/moveit_core/robot_state/src/robot_state.cpp#L1682-L1683) ### Expected behavior The call should recognise that the tip is a subframe, return true, and set the robot state accordingly. This is consistent with ROS1 behaviour. ### Actual behavior The code prints an error "The following Pose Frame does not exist: <subframe>", and returns false. ### Backtrace or Console output _No response_
Activity